Cramer's Rule solves a square system using only determinants. Let D be the determinant of the coefficient matrix. To find a variable, replace that variable's column with the constants, take the determinant, and divide by D. So x=DDx, y=DDy, and for three variables z=DDz.
For a 3×3 matrix with rows (a,b,c), (d,e,f) and (g,h,i), expand along the first row to get a(ei−fh)−b(di−fg)+c(dh−eg). Keep the alternating +,−,+ signs.
Worked example. Solve 2x+3y=12 and x−y=1. Then D=2(−1)−3(1)=−5. Replace the x column with (12,1), so Dx=12(−1)−3(1)=−15 and x=−5−15=3. Replace the y column instead, so Dy=2(1)−12(1)=−10 and y=−5−10=2. That matches the elimination answer from 9.1.
If D=0, Cramer's Rule doesn't apply, because the system has no solution or infinitely many. Use row reduction to find out which one.
- Determinant: A single number computed from a square matrix that is nonzero exactly when the matrix is invertible.
- Cofactor expansion: Finding a determinant by adding the entries of a row multiplied by their cofactors. Each cofactor uses the determinant of a smaller matrix and the sign (−1)i+j(-1)^{i+j}(−1)i+j for row iii and column jjj.
- Cramer's Rule: A formula that gives each variable as a ratio of two determinants.
Check yourself: In Cramer's Rule for a three-variable system, which column do you replace to find y? (Answer: The second column, the one holding the y coefficients, gets replaced with the constants.)
| Method | Works best when | Watch out for |
|---|
| Substitution | A variable has a coefficient of 1 or -1, or the system is nonlinear | Substituting the whole expression, including signs |
| Elimination | Two or three equations are in standard form | Sign errors when multiplying and subtracting |
| Gaussian elimination | The system is large or may not have a unique solution | Applying each row operation to the entire row |
| Inverse matrix | Several systems share the same coefficient matrix | Multiplying in the order $A^{-1}B$, and checking the determinant first |
| Cramer's Rule | You need one variable or the system is small | It fails when $D = 0$ and gets slow for big systems |