Cramer's rule
Write the system as A·x = b. For two equations a₁x + b₁y = c₁ and a₂x + b₂y = c₂, the determinant is D = a₁b₂ − a₂b₁. Replace the x column with the constants to get Dx = c₁b₂ − c₂b₁, and the y column to get Dy = a₁c₂ − a₂c₁. Then x = Dx ÷ D and y = Dy ÷ D.
Three equations work the same way with 3×3 determinants, expanded as a(ei − fh) − b(di − fg) + c(dh − eg).
If D = 0 there is no single answer. The calculator then row-reduces the system: if the constants contradict the equations, there is no solution; if one equation is a combination of the others, there are infinitely many.
Worked example
Solve 2x + 3y = 8 and x − y = −1. D = 2 × (−1) − 1 × 3 = −5. Dx = 8 × (−1) − (−1) × 3 = −5 and Dy = 2 × (−1) − 1 × 8 = −10.
So x = −5 ÷ −5 = 1 and y = −10 ÷ −5 = 2. Check: 2(1) + 3(2) = 8.
Coin and age word problems
Coin problem: 20 dimes and quarters are worth $3.80. With x dimes and y quarters, x + y = 20 and 10x + 25y = 380 (in cents). Solving gives 8 dimes and 12 quarters. Answers that are not whole, non-negative counts are rejected.
Age problem: A is 3 times as old as B, and in 10 years A will be twice as old as B. Then A = 3B and A + 10 = 2(B + 10), so B = 10 and A = 30. Use a negative number of years for statements about the past.
| Problem | Equation 1 | Equation 2 |
|---|---|---|
| Coins | x + y = total count | v₁x + v₂y = total value |
| Ages (ratio now) | A = pB + q | A + N = r(B + N) + s |
| Ages (sum now) | A + B = T | A + N = r(B + N) + s |