- Practice
- About 18 min
- 5 practice questions
Matrices, determinants and Cramer's rule
Define a matrix and a determinant, evaluate 2 × 2 and 3 × 3 determinants, and solve systems of linear equations by Cramer's rule, including a shopping problem with three unknown prices.
If something looks wrong, please tell us.
By the end of this lesson you can
- Define a matrix, a square matrix and a determinant.
- Evaluate 2 × 2 and 3 × 3 determinants step by step.
- Solve two or three linear equations by Cramer's rule and check the answer.
- Set up an everyday pricing problem as a system of equations.
Economic models often have several unknowns linked by several equations: prices of several goods, outputs of several industries. Matrices give a tidy way to write such systems, and Cramer's rule gives a step-by-step way to solve them.
Matrices and determinants
A matrix (plural: matrices) is a rectangular array of numbers arranged in rows and columns within brackets. If the number of rows equals the number of columns, it is a square matrix; a matrix with 3 rows and 3 columns is of order 3 × 3. Every square matrix has a determinant: the same numbers written between vertical lines, which works out to a single number. The determinant of matrix A is written |A|.
2 × 2: |a b; c d| = ad − bc. 3 × 3 (expanding along the first row a₁ b₁ c₁): |A| = a₁(b₂c₃ − b₃c₂) − b₁(a₂c₃ − a₃c₂) + c₁(a₂b₃ − a₃b₂). Note the signs + − +.
Worked example 1: a 2 × 2 determinant
Rows (5, −2) and (3, 4). Step 1: product of the main diagonal: 5 × 4 = 20. Step 2: product of the other diagonal: (−2) × 3 = −6. Step 3: subtract: 20 − (−6) = 20 + 6 = 26.
Worked example 2: a 3 × 3 determinant
Rows (2, 1, 3), (0, 4, −1), (5, 2, 1). Step 1, first term: 2 × (4 × 1 − (−1) × 2) = 2 × (4 + 2) = 12. Step 2, second term: −1 × (0 × 1 − (−1) × 5) = −1 × (0 + 5) = −5. Step 3, third term: 3 × (0 × 2 − 4 × 5) = 3 × (0 − 20) = −60. Step 4, add: 12 − 5 − 60 = −53. Check by the diagonal method: downward products 2·4·1 + 1·(−1)·5 + 3·0·2 = 8 − 5 + 0 = 3; upward products 3·4·5 + 2·(−1)·2 + 1·0·1 = 60 − 4 + 0 = 56; 3 − 56 = −53 ✓.
Cramer's rule
Cramer's rule, named after Gabriel Cramer (1704-1752), solves a system of n linear equations in n unknowns. Let Δ be the determinant of the coefficients. Form Δx by replacing the x-column with the constants on the right-hand side; form Δy and Δz the same way. Then x = Δx ÷ Δ, y = Δy ÷ Δ, z = Δz ÷ Δ. If Δ = 0, the rule cannot be used, because the system has no unique solution (the Tamil Nadu textbook says the solution does not exist).
Cramer's rule step by step
- Write in matrix form Coefficients on the left, constants on the right.
- Find Δ If Δ = 0, stop: no unique solution.
- Find Δx, Δy, Δz Replace one column at a time by the constants.
- Divide x = Δx ÷ Δ and so on.
- Check Put the values back into every equation.
Worked example 3: two equations
Solve 2x + 3y = 13 and 4x − y = 5. Step 1, Δ: rows (2, 3), (4, −1): 2(−1) − 3(4) = −2 − 12 = −14. Δ ≠ 0, so a unique solution exists. Step 2, Δx: rows (13, 3), (5, −1): 13(−1) − 3(5) = −13 − 15 = −28. Step 3, Δy: rows (2, 13), (4, 5): 2(5) − 13(4) = 10 − 52 = −42. Step 4: x = −28 ÷ −14 = 2; y = −42 ÷ −14 = 3. Check: 2(2) + 3(3) = 4 + 9 = 13 ✓; 4(2) − 3 = 5 ✓.
Worked example 4: three unknown prices
Three friends shop at the same stationery stall (illustrative). Kavin buys 1 pen, 2 pencils and 1 eraser for ₹23; Divya buys 2 pens, 1 pencil and 3 erasers for ₹34; Selvi buys 3 pens, 4 pencils and 2 erasers for ₹56. Let a pen cost x, a pencil y and an eraser z. Equations: x + 2y + z = 23; 2x + y + 3z = 34; 3x + 4y + 2z = 56.
Δ (rows 1 2 1 / 2 1 3 / 3 4 2) = 1(1·2 − 3·4) − 2(2·2 − 3·3) + 1(2·4 − 1·3) = 1(−10) − 2(−5) + 1(5) = −10 + 10 + 5 = 5. Δx (rows 23 2 1 / 34 1 3 / 56 4 2) = 23(2 − 12) − 2(68 − 168) + 1(136 − 56) = −230 + 200 + 80 = 50. Δy (rows 1 23 1 / 2 34 3 / 3 56 2) = 1(68 − 168) − 23(4 − 9) + 1(112 − 102) = −100 + 115 + 10 = 25. Δz (rows 1 2 23 / 2 1 34 / 3 4 56) = 1(56 − 136) − 2(112 − 102) + 23(8 − 3) = −80 − 20 + 115 = 15.
Answer: x = 50 ÷ 5 = ₹10 (pen), y = 25 ÷ 5 = ₹5 (pencil), z = 15 ÷ 5 = ₹3 (eraser). Check: 10 + 10 + 3 = 23 ✓; 20 + 5 + 9 = 34 ✓; 30 + 20 + 6 = 56 ✓.
Key takeaways: a determinant turns a square matrix into one number. For 2 × 2 it is ad − bc; for 3 × 3 expand along the first row with signs + − +. Cramer's rule gives each unknown as Δ(that unknown) ÷ Δ, and fails when Δ = 0. Always check by substitution.
Check your understanding
-
1. A matrix with the same number of rows and columns is called:
- A row matrix
- A determinant
- A square matrix
- A function
Show answer
Answer: C. When rows equal columns (2 × 2, 3 × 3 and so on) the matrix is square, and only a square matrix has a determinant.
-
2. Evaluate the determinant with rows (3, 4) and (2, 6).
- 26
- 10
- −10
- 18
Show answer
Answer: B. ad − bc = 3 × 6 − 4 × 2 = 18 − 8 = 10. Adding the products instead of subtracting gives 26.
-
3. Evaluate the determinant with rows (1, 0, 2), (3, 1, 0), (0, 2, 1).
- 13
- 11
- −11
- 7
Show answer
Answer: A. 1(1·1 − 0·2) − 0(3·1 − 0·0) + 2(3·2 − 1·0) = 1(1) − 0 + 2(6) = 1 + 12 = 13.
-
4. Using Cramer's rule on x + y = 7 and x − y = 1, what is x?
- 3
- 1
- 7
- 4
Show answer
Answer: D. Δ = 1(−1) − 1(1) = −2. Δx = 7(−1) − 1(1) = −8. x = −8 ÷ −2 = 4. Then y = 3; check: 4 + 3 = 7 and 4 − 3 = 1 ✓.
-
5. When can Cramer's rule NOT be used to find a unique solution?
- When the constants are all positive
- When the coefficient determinant Δ equals zero
- When there are three equations
- When Δx is negative
Show answer
Answer: B. Each unknown is a ratio with Δ in the denominator. If Δ = 0 the division is impossible and the system has no unique solution.
Sign in to keep track of the lessons you finish.