Recipe
Solve a system by Cramer's rule
Use when: you have a square system A\mathbf x=\mathbf b with \det A\neq0 and want one variable in isolation, as a ratio of two determinants, without eliminating the whole system
Goal: every x_i, each computed as \det A_i(\mathbf b)/\det A, with A_i(\mathbf b) built by replacing exactly one column of A with \mathbf b
Taught in Cramer's rule and the adjugate
Quick recipe
-
1
Set up the coefficient matrix and the right-hand-side vector, then compute \det A.
Example
For x+2y=5,\ 3x-y=1: A=\begin{pmatrix}1&2\\3&-1\end{pmatrix}, \mathbf b=\begin{pmatrix}5\\1\end{pmatrix}, \det A=(1)(-1)-(2)(3)=-1-6=-7\neq0.
- \det A\neq0 — continue; a unique solution exists and Cramer's rule can find it.
- \det A=0 — stop; Cramer's rule doesn't apply, since every ratio below would divide by zero.
Why: every later step divides by \det A, so confirming it's nonzero first is what guarantees Cramer's rule has an answer to give at all.
-
2
For the variable x_i, copy A but replace its column i with \mathbf b, leaving every other column exactly as it was in A.
Example
Replacing column 1 (for x) with \mathbf b: A_1(\mathbf b)=\begin{pmatrix}5&2\\1&-1\end{pmatrix} — column 2 is untouched. Replacing column 2 (for y) with \mathbf b instead: A_2(\mathbf b)=\begin{pmatrix}1&5\\3&1\end{pmatrix} — column 1 is untouched.
Why: replacing exactly one column with \mathbf b is what isolates that one variable's contribution — every other column still carries the coefficients that pin the other variables in place.
-
3
Evaluate each column-replaced determinant the same way you computed \det A.
Example
\det A_1(\mathbf b) = (5)(-1)-(2)(1) = -5-2=-7, \qquad \det A_2(\mathbf b) = (1)(1)-(5)(3) = 1-15=-14Why: these are the only two extra numbers, besides \det A itself, that Cramer's rule needs — no elimination on the system ever happens.
-
4
Compute x_i = \det A_i(\mathbf b)/\det A for each i.
Example
x=\frac{\det A_1(\mathbf b)}{\det A}=\frac{-7}{-7}=1,\qquad y=\frac{\det A_2(\mathbf b)}{\det A}=\frac{-14}{-7}=2Why: this ratio is exactly what the theorem behind Cramer's rule guarantees equals x_i — nothing further to solve for once both determinants are known.
-
5
Plug every computed value back into every original equation, not just one of them.
Example
x+2y = 1+2(2) = 5 ✓, and 3x-y = 3(1)-2 = 1 ✓ — both original equations hold.
Why: this catches an arithmetic slip in any determinant before it gets reported as the final answer.
Common mistakes
- Replacing a ROW of A instead of a column — Cramer's rule always swaps a column for \mathbf b, never a row.
- Forgetting to check \det A\neq0 before dividing by it.
- Building A_2(\mathbf b) by editing the already-modified A_1(\mathbf b) instead of starting fresh from A each time, accidentally leaving \mathbf b sitting in two columns at once.
- Dividing \det A by \det A_i(\mathbf b) instead of the other way around.