Theory
The canteen bill puzzle
Two friends come back from Rupa's counter.
"2 samosas and 3 teas cost me ₹39."
"1 samosa and 2 teas cost me ₹23."
What does one samosa cost? You could substitute and rearrange, and under exam pressure, lose a sign somewhere in the middle. There is a route that is four short lines, no rearranging, and it runs on determinants. Gabriel Cramer found it in 1750.
Theory
Swap in the constants
Write the system as columns: an x column, a y column, and the answers column. Cramer's trick: to find x, take the coefficient grid and let the answers column sit in x's seat. To find y, let it sit in y's seat. Each swap makes a new determinant, and the ratios give the unknowns.
Theory
The rule, formally
For the system a₁x + b₁y = c₁ and a₂x + b₂y = c₂:
D = | a₁ b₁ | Dx = | c₁ b₁ | Dy = | a₁ c₁ |
| a₂ b₂ | | c₂ b₂ | | a₂ c₂ |
Then, provided D ≠ 0:
x = Dx / D and y = Dy / D
Dx is D with the x column replaced by the constants; Dy replaces the y column.
Follow along
Cramer in five moves
- Write D from the coefficients and evaluate it 2×2 determinant: ad - bc.
- Check D ≠ 0 If D = 0 there is no unique solution and Cramer's rule cannot be used. Say so and stop.
- Build Dx: constants into the x column The y column stays untouched.
- Build Dy: constants into the y column The x column stays untouched.
- Divide: x = Dx/D, y = Dy/D Then push x and y back into an original equation as a check.
Theory
Worked example: the canteen prices
System: 2x + 3y = 39 and x + 2y = 23 (x = samosa, y = tea).
D = | 2 3 | = 2·2 - 3·1 = 1
| 1 2 |
Dx = | 39 3 | = 39·2 - 3·23 = 78 - 69 = 9
| 23 2 |
Dy = | 2 39 | = 2·23 - 39·1 = 46 - 39 = 7
| 1 23 |
So x = 9/1 = ₹9 per samosa, y = 7/1 = ₹7 per tea. Check: 2·9 + 3·7 = 39. Correct.
Think first
Your turn
Solve with Cramer's rule, on paper:
x + y = 5
x - y = 1
Show the answer
D = | 1 1 | = -1 - 1 = -2
| 1 -1 |
Dx replaces the x column with (5, 1): 5·(-1) - 1·1 = -6, so x = -6/-2 = 3.
Dy replaces the y column: 1·1 - 5·1 = -4, so y = -4/-2 = 2.
Check: 3 + 2 = 5 and 3 - 2 = 1. Negative determinants along the way are perfectly normal, the divisions clean them up.
Quiz
Cramer's rule cannot be used when...
- D = 0
- the constants c₁, c₂ are zero
- the solution is negative
- the coefficients are fractions
Show the answer
D = 0
x = Dx/D divides by D, and dividing by zero is meaningless: D = 0 signals the lines are parallel or identical, so no unique solution exists. Zero constants are fine (the answers may just be 0), and negatives and fractions bother the rule not at all.
Quiz
To build Dx you replace...
- the column of x's coefficients with the constants
- the first row with the constants
- the column of y's coefficients with the constants
- the constants with zeros
Show the answer
the column of x's coefficients with the constants
Always a column, and specifically the column belonging to the unknown you are solving for. Replacing a row (option B) is the classic exam slip, and replacing y's column gives you Dy, the wrong unknown.
Watch out
Where marks leak
Sign slips inside 2×2 determinants (it is ad minus bc); replacing a row instead of a column when building Dx; and forgetting the final division by D, leaving Dx and Dy as the "answers". If D works out to 0, do not push on: write "D = 0, no unique solution, Cramer's rule not applicable" and collect the marks.
Theory
Where you will meet this again
Three unknowns work the same way with 3×3 determinants, one column swap per variable. Electrical engineers solve circuit equations with it. And notice the family resemblance: the inverse from your last topic also demanded |A| ≠ 0. Same gatekeeper, because X = A⁻¹B and Cramer's rule are two roads to the same answer.
Summary
Key takeaways
- Cramer's rule solves systems using determinants only: no substitution, no rearranging.
- D comes from the coefficients; Dx and Dy swap the constants into that unknown's column.
- x = Dx/D and y = Dy/D, valid only when D ≠ 0.
- D = 0 means no unique solution: state it and stop.
- Always verify by substituting back into an original equation.
- Memory hook: replace the column, divide by D.