Solving a System of Equations with Matrices
The idea
A system of linear equations can be written as a single matrix equation AX=B, where A holds the coefficients, X the unknowns, and B the right-hand sides. Solving usually just means eliminating variables the same way you would without matrix notation, the matrix is just a compact way to organize the equations.
Worked example
Solve the system:
x−y+z=4,x+y+z=2,2x+y−3z=0Solution: Subtracting the first equation from the second eliminates x and z at once:
(x+y+z)−(x−y+z)=2−4⇒2y=−2⇒y=−1Substituting y=−1 into the second equation gives x+z=3. Substituting into the third gives 2x−3z=1. Using x=3−z:
2(3−z)−3z=1⇒6−5z=1⇒z=1⇒x=2So x=2, y=−1, z=1.
Continue learning
The matrix method only produces a unique solution when the coefficient matrix isn't singular, checking that comes down to a basic square-matrix property.