Three equations in three unknowns can be solved by elimination, but the matrix method scales, and it answers a question elimination hides: whether a unique solution exists at all.
Matrix operations
Addition, subtraction and scalar multiplication work element by element, and need matrices of the same order. Multiplication takes a row from the left and a column from the right:
(m×n)×(n×p)=(m×p)
so two 3×3 matrices multiply to give another 3×3.
The identity matrix
I=100010001
leaves any matrix unchanged: AI=IA=A. It is the matrix equivalent of the number 1, and the definition of an inverse is
AA−1=A−1A=I
The determinant of a 3 × 3 matrix
Expand along the first row, alternating signs:
detadgbehcfi=aehfi−bdgfi+cdgeh
Each 2×2 determinant is the minor — what remains after deleting the row and column of that element.
Apply the sign pattern to get the cofactor matrix.
Transpose it.
For A=105216340, with detA=1:
The cofactor matrix is
−2418520−15−4−541
Transposing gives the adjoint, and dividing by detA=1 leaves
A−1=−2420−518−1545−41
Check by multiplying: AA−1=I ✓
Solving systems with matrices
x+y+z2x−y+zx+2y−z=6=3=2
becomes Ax=b:
1211−1211−1xyz=632
Multiplying on the left by A−1:
x=A−1b
The solution is x=1, y=2, z=3.
Check in all three equations: 1+2+3=6 ✓, 2−2+3=3 ✓, 1+4−3=2 ✓
Row reduction
For a single system, row reduction is quicker than inverting. Write the augmented matrix and use row operations to reach a triangle of zeros:
1211−1211−1632
The three legal operations are: swap two rows, multiply a row by a non-zero constant, and add a multiple of one row to another. None of them changes the solution.
R2−2R1 and R3−R1 give
1001−311−1−26−9−4
Then 3R3+R2 clears the last column:
1001−301−1−76−9−21
The last row reads −7z=−21, so z=3. Back-substituting into row 2: −3y−3=−9, so y=2. Then row 1 gives x=1 ✓
Consistency of a system
Situation
Solutions
detA=0
exactly one
detA=0, equations consistent
infinitely many
detA=0, equations inconsistent
none
A zero determinant means the equations are not independent — one is a combination of the others. Whether that leaves infinitely many solutions or none depends on the constants.
x+y=32x+2y=6
The second is just twice the first, so any point on the line satisfies both: infinitely many solutions.
x+y=32x+2y=7
The left sides are still proportional, but 2(x+y) must be 6, not 7. The equations contradict each other: no solution.