Study Web

Matrices

1.7.3 Cramer's Rule

Cramer's rule for solving n linear equations in n unknowns using determinants — 2×2 and 3×3 examples including electric circuit current problems.

1.7.3 Cramer's Rule

Cramer's rule solves AX = B where A is square (n×n) and det(A) ≠ 0.

Theorem 1.1 — Cramer's Rule:
The solution xi is given by:
xi = det(Ai)det(A)
where Ai is A with its i-th column replaced by B.

Cramer's Rule for 2 Unknowns

AX = B:   a₁x + b₁y = c₁  and  a₂x + b₂y = c₂

x = |c₁,b₁; c₂,b₂||a₁,b₁; a₂,b₂|    y = |a₁,c₁; a₂,c₂||a₁,b₁; a₂,b₂|

Example 1.20 — Electric circuit: 8i₁ − 3i₂ = −2 and −3i₁ + 10i₂ = 6

det(A) = |8,−3; −3,10| = 80 − 9 = 71
A₁ = replace col 1 with B: |−2,−3; 6,10| = −20+18 = −2
A₂ = replace col 2 with B: |8,−2; −3,6| = 48−6 = 42
i₁ = −271 ≈ −0.028 A    i₂ = 4271 ≈ 0.592 A

Cramer's Rule for 3 Unknowns

xi = det(Ai)det(A)   for i = 1, 2, 3

Example 1.21 — 3-mesh circuit:
10i₁ − 3i₂ − i₃ = 3, −3i₁ + 14i₂ − 2i₃ = −6, −i₁ − 2i₂ + 6i₃ = 4

det(A) = |10,−3,−1; −3,14,−2; −1,−2,6| = 720
det(A₁) = |3,−3,−1; −6,14,−2; 4,−2,6| = 200
det(A₂) = |10,3,−1; −3,−6,−2; −1,4,6| = −202
det(A₃) = |10,−3,3; −3,14,−6; −1,−2,4| = 446
i₁
200720 ≈ 0.278 A
i₂
−202720 ≈ −0.281 A
i₃
446720 ≈ 0.619 A
When to use Cramer's rule: Works only for square, non-singular systems. For large n, Gaussian elimination is faster. Cramer's rule is elegant for 2×2 and 3×3 systems, especially in engineering applications (electric circuits, structural analysis).

Exercise Answers (1.3)

  • 2x+3y=8; 4x+5y=14 → x=1, y=2
  • 2x−y=5; 3x+2y=4 → x=2, y=−1