Matrices to solve a system of equations