Cramer’s Rule is a method for solving systems of linear equations using determinants. Instead of performing row operations or finding an inverse matrix, you compute several determinants and take their ratios. The formula gives each variable directly — no back-substitution needed.
Cramer’s Rule is named after Swiss mathematician Gabriel Cramer, who published it in 1750. While it is not the most efficient method for large systems, it is elegant, self-contained, and particularly useful for systems of 2 or 3 equations where you need only one of the variables.
Cramer’s Rule for 2x2 Systems
Consider the system:
a1x+b1y=c1
a2x+b2y=c2
The coefficient matrix is A=[a1a2b1b2] with determinant D=a1a2b1b2.
Cramer’s Rule states:
x=DDx,y=DDy
where:
D=det(A) — the determinant of the coefficient matrix
Dx — replace the x-column (first column) of A with the constants: Dx=c1c2b1b2
Dy — replace the y-column (second column) of A with the constants: Dy=a1a2c1c2
Memory aid: To find a variable, replace its column in the coefficient matrix with the constants column, compute the determinant, and divide by the original determinant D.
Example 1: Cramer’s Rule for a 2x2 System
Solve:
3x+2y=16
x−y=2
Step 1 — Compute D (determinant of the coefficient matrix):
D=312−1=3(−1)−2(1)=−3−2=−5
Since D=−5=0, the system has a unique solution and Cramer’s Rule applies.
Step 2 — Compute Dx (replace the x-column with the constants):
Dx=1622−1=16(−1)−2(2)=−16−4=−20
Step 3 — Compute Dy (replace the y-column with the constants):
Dy=31162=3(2)−16(1)=6−16=−10
Step 4 — Divide:
x=DDx=−5−20=4,y=DDy=−5−10=2
Answer:x=4, y=2
Verification:3(4)+2(2)=12+4=16 and 4−2=2.
Example 2: Another 2x2 System
Solve:
2x+5y=1
3x+7y=2
Compute the determinants:
D=2357=14−15=−1
Dx=1257=7−10=−3
Dy=2312=4−3=1
x=−1−3=3,y=−11=−1
Answer:x=3, y=−1
Verification:2(3)+5(−1)=6−5=1 and 3(3)+7(−1)=9−7=2.
Cramer’s Rule for 3x3 Systems
For a system of three equations in three unknowns:
a1x+b1y+c1z=d1
a2x+b2y+c2z=d2
a3x+b3y+c3z=d3
Cramer’s Rule states:
x=DDx,y=DDy,z=DDz
where:
D is the determinant of the 3×3 coefficient matrix
Dx replaces the first column with the constants [d1,d2,d3]T
Dy replaces the second column with the constants
Dz replaces the third column with the constants
Example 3: Cramer’s Rule for a 3x3 System
Solve:
x+y+z=6
2x−y+z=3
x+2y−z=5
Step 1 — Compute D:
D=1211−1211−1
Expand along the first row:
D=1(1−2)−1(−2−1)+1(4+1)=−1+3+5=7
Step 2 — Compute Dx (replace column 1 with constants):
Cramer’s Rule fails. To determine why, note that the second equation is exactly twice the first — the system is dependent with infinitely many solutions. But if the second equation were 2x+4y=7 instead, D would still be 0, yet the system would be inconsistent (no solution). Cramer’s Rule cannot tell you which.
The electrician found I1 without ever computing I2 or I3. This is the key advantage of Cramer’s Rule — targeted answers.
Common Mistakes
Replacing the wrong column. To find x, replace the first column (the x-coefficients) with the constants. To find y, replace the second column. Replacing the wrong column gives the wrong variable’s value.
Forgetting to check D=0. Always compute the main determinant D first. If D=0, stop — Cramer’s Rule does not apply.
Sign errors in 3x3 determinants. Each cofactor expansion involves a sign from the checkerboard pattern. One wrong sign propagates through the entire calculation.
Using Cramer’s Rule for large systems. A 4×4 system requires five 4×4 determinants. A 5×5 system requires six 5×5 determinants. The work grows factorially — use Gaussian elimination instead.
Practice Problems
Problem 1: Solve using Cramer’s Rule: 4x+y=9, x−3y=−1.
D=411−3=−12−1=−13
Dx=9−11−3=−27−(−1)=−27+1=−26
Dy=419−1=−4−9=−13
x=−13−26=2,y=−13−13=1
Answer:x=2, y=1
Verification:4(2)+1=9 and 2−3(1)=−1.
Problem 2: Use Cramer’s Rule to find only y in: 5x−2y=7, 3x+y=8.
D=53−21=5+6=11
Dy=5378=40−21=19
y=DDy=1119
Answer:y=1119
Problem 3: Solve using Cramer’s Rule: x+y+z=4, x−y+2z=5, 2x+y−z=1.
Problem 4: The system 2x+4y=6, x+2y=3 has D=0. Can you determine whether it is inconsistent or dependent?
Cramer’s Rule cannot determine this. However, notice that the first equation is exactly twice the second: 2(x+2y)=2(3)=6. The equations are identical, so the system is dependent with infinitely many solutions: x=3−2t, y=t for any real number t.
Problem 5: An electrician needs only I2 from the system 3I1+I2=7, I1−2I2=0. Find I2 using Cramer’s Rule.
D=311−2=−6−1=−7
DI2=3170=0−7=−7
I2=−7−7=1 amp
Answer:I2=1 amp
Key Takeaways
Cramer’s Rule solves a system by computing determinants: each variable equals the ratio of a modified determinant to the original determinant D
To find a specific variable, replace that variable’s column in the coefficient matrix with the constants column, compute the determinant, and divide by D
Cramer’s Rule works only when D=0 — when D=0, it fails and cannot distinguish between inconsistent and dependent systems
It is most practical for 2x2 and 3x3 systems and particularly useful when you need only one variable