Solving two equations by the inverse
A shop sells pens and books. Two bills give two equations. Writing them as one matrix equation lets the inverse undo the mixing and reveal the prices.
A system a₁x + b₁y = c₁, a₂x + b₂y = c₂ is written as AX = B, where A holds the coefficients, X = [x ; y] and B = [c₁ ; c₂]. If |A| ≠ 0, the unique solution is X = A⁻¹B. If |A| = 0 look at (adj A)B: if it is not zero the system has no solution.
Formula: AX = B ⇒ X = A⁻¹ B
Rule 1: Solve by X = A⁻¹B — Find A⁻¹, then multiply by B.
- Easy: 2x + y = 7, x + y = 4: A⁻¹ = [1 −1 ; −1 2], X = [3 ; 1].
- Medium: 3x + 2y = 12, 4x + 3y = 17: A⁻¹ = [3 −2 ; −4 3], X = [2 ; 3].
- Exam-type: 2x + 4y = 10, x + 3y = 7: |A| = 2, A⁻¹ = ½ [3 −4 ; −1 2], X = [1 ; 2].
Rule 2: When |A| = 0 — Test the system with (adj A)B.
- Easy: x + 2y = 3, 2x + 4y = 7: |A| = 0 and (adj A)B = [−2 ; 1] is not zero, so there is no solution.
- Medium: x + 2y = 3, 2x + 4y = 6: |A| = 0 and (adj A)B = 0; the two equations are the same line, so there are infinitely many solutions.
- Exam-type: Substitute back: for X = [2 ; 3] we have 3(2) + 2(3) = 12 and 4(2) + 3(3) = 17.
The matrix method needs |A| ≠ 0; otherwise use another approach.
Writing X = BA⁻¹; the order must be A⁻¹B.
AX = B, so multiply by A⁻¹ on the left of both sides.
Practice questions
- 1Write x + 2y = 5, 3x − y = 1 in the form AX = B.
- 2Solve x + y = 5, x − y = 1 by the matrix method.
- 3Solve 3x + y = 10, x + y = 6.
- 4Solve 4x + 3y = 11, x + y = 3.
- 5Solve x + 3y = 11, 2x + 5y = 19.
- 6Does 2x + 3y = 5, 4x + 6y = 7 have a solution?
- 7For which k does kx + y = 3, 2x + y = 5 fail to have a unique solution?
- 8Two pens and three books cost ₹130; one pen and two books cost ₹80. Find the price of each.
Show answers (try them yourself first)
- 1A = [1 2 ; 3 −1], X = [x ; y], B = [5 ; 1]
- 2x = 3, y = 2
- 3|A| = 2, A⁻¹ = ½ [1 −1 ; −1 3], X = [2 ; 4], so x = 2, y = 4
- 4A⁻¹ = [1 −3 ; −1 4], X = [2 ; 1], so x = 2, y = 1
- 5|A| = −1, A⁻¹ = [−5 3 ; 2 −1], so x = 2, y = 3
- 6No: |A| = 0 and (adj A)B = [9 ; −6] is not zero
- 7|A| = k − 2 = 0 gives k = 2
- 8Pen ₹20, book ₹30 (check: 40 + 90 = 130, 20 + 60 = 80)
Solving three equations by the inverse
Three friends tell you the sums of pairs of their ages. From the three sums you can recover each age. Three equations are written as one matrix equation.
For three equations in x, y, z, A is a 3 × 3 matrix of coefficients, X = [x ; y ; z] and B holds the constants. When |A| ≠ 0, X = A⁻¹B with A⁻¹ = adj A / |A|. If |A| = 0 this method does not give a unique solution.
Formula: X = A⁻¹B = (adj A) B / |A|
Rule 1: Solve a 3 × 3 system — Find |A|, adj A, then multiply.
- Easy: x + y = 3, y + z = 5, x + z = 4 with A⁻¹ = ½ [1 −1 1 ; 1 1 −1 ; −1 1 1] gives X = [1 ; 2 ; 3].
- Medium: With A = [2 1 0 ; 1 3 2 ; 0 1 4] and B = [4 ; 9 ; 6], X = (1/16) [16 ; 32 ; 16] = [1 ; 2 ; 1].
- Exam-type: Check x = 1, y = 2, z = 1 in 2x + y = 4; x + 3y + 2z = 9; y + 4z = 6.
Rule 2: Check |A| first — A zero determinant means the method fails.
- Easy: [1 1 1 ; 2 2 2 ; 1 −1 0] has |A| = 0 because rows 1 and 2 are proportional.
- Medium: A system with |A| = 0 and (adj A)B not zero has no solution.
- Exam-type: A system whose first two equations have the same left side but different right sides is inconsistent.
Always substitute your answer back into all three equations.
Starting to multiply before checking |A| ≠ 0.
|A| first, adj A second, multiply third.
Practice questions
- 1For x − y + z = 2, y + z = 4, x + z = 5, find |A| and solve.
- 2Can x + y + z = 6, 2x + 2y + 2z = 12, x − y = 0 be solved by the inverse method? Why?
- 3Solve AX = [5 ; 11 ; 13] for A = [2 1 0 ; 1 3 2 ; 0 1 4].
- 4Solve x + y = 7, y + z = 9, x + z = 10.
- 5A pen and a pencil cost ₹9, a pencil and an eraser ₹7, a pen and an eraser ₹8. Find each price.
- 6Show that A = [1 1 0 ; 0 1 1 ; 1 0 1] gives a unique solution for every B.
- 7If |A| = 0 and (adj A)B is not the zero matrix, what can you say about AX = B?
- 8Decide whether x + y + z = 1, x + y + z = 2, x − y = 0 has a solution.
Show answers (try them yourself first)
- 1|A| = −1; the solution is x = 4, y = 3, z = 1
- 2No: |A| = 0 because rows 1 and 2 are proportional
- 3X = [2 ; 1 ; 3]
- 4x = 4, y = 3, z = 6
- 5Pen ₹5, pencil ₹4, eraser ₹3
- 6|A| = 2, which is not 0, so A⁻¹ exists and X = A⁻¹B is unique for every B
- 7The system is inconsistent (no solution)
- 8No solution: the first two equations contradict each other