Matrix Equation

Nonhomogeneous matrix equations of the form


can be solved by taking the matrix inverse to obtain


This equation will have a nontrivial solution iff the determinant det(A)!=0. In general, more numerically stable techniques of solving the equation include Gaussian elimination, LU decomposition, or the square root method.

For a homogeneous n×n matrix equation

 [a_(11) a_(12) ... a_(1n); a_(21) a_(22) ... a_(2n); | | ... |; a_(n1) a_(n2) ... a_(nn)][x_1; x_2; |; x_n]=[0; 0; |; 0]

to be solved for the x_is, consider the determinant

 |a_(11) a_(12) ... a_(1n); a_(21) a_(22) ... a_(2n); | | ... |; a_(n1) a_(n2) ... a_(nn)|.

Now multiply by x_1, which is equivalent to multiplying the first column (or any column) by x_1,

 x_1|a_(11) a_(12) ... a_(1n); a_(21) a_(22) ... a_(2n); | | ... |; a_(n1) a_(n2) ... a_(nn)|=|a_(11)x_1 a_(12) ... a_(1n); a_(21)x_1 a_(22) ... a_(2n); | | ... |; a_(n1)x_1 a_(n2) ... a_(nn)|.

The value of the determinant is unchanged if multiples of columns are added to other columns. So add x_2 times column 2, ..., and x_n times column n to the first column to obtain

 x_1|a_(11) a_(12) ... a_(1n); a_(21) a_(22) ... a_(2n); | | ... |; a_(n1) a_(n2) ... a_(nn)| 
 =|a_(11)x_1+a_(12)x_2+...+a_(1n)x_n a_(12) ... a_(1n); a_(21)x_1+a_(22)x_2+...+a_(2n)x_n a_(22) ... a_(2n); | | ... |; a_(n1)x_1+a_(n2)x_2+...+a_(nn)x_n a_(n2) ... a_(nn)|.

But from the original matrix, each of the entries in the first columns is zero since



 |0 a_(12) ... a_(1n); 0 a_(22) ... a_(2n); | | ... |; 0 a_(n2) ... a_(nn)|=0.

Therefore, if there is an x_1!=0 which is a solution, the determinant is zero. This is also true for x_2, ..., x_n, so the original homogeneous system has a nontrivial solution for all x_is only if the determinant is 0. This approach is the basis for Cramer's rule.

Given a numerical solution to a matrix equation, the solution can be iteratively improved using the following technique. Assume that the numerically obtained solution to


is x_1=x+deltax_1, where deltax_1 is an error term. The first solution therefore gives


where deltab is found by solving (10)


Combining (11) and (12) then gives


See also

Cramer's Rule, Gaussian Elimination, LU Decomposition, Matrix, Matrix Addition, Matrix Inequality, Matrix Inverse, Matrix Multiplication, Normal Equation, Square Root Method

Explore with Wolfram|Alpha

Cite this as:

Weisstein, Eric W. "Matrix Equation." From MathWorld--A Wolfram Web Resource.

Subject classifications