Practice Maths

Solving Systems with Matrices

Key Terms

Matrix equation AX = B
A = coefficient matrix; X = column of unknowns; B = column of constants.
Inverse method
X = A−1B (valid when det(A) ≠ 0).
Unique solution
det(A) ≠ 0 → exactly one solution.
No solution
det(A) = 0 and the system is inconsistent (e.g. parallel lines).
Infinite solutions
det(A) = 0 and the system is consistent (e.g. coincident lines).
Gaussian elimination
Row-reduce the augmented matrix [A|B] using: swap rows, multiply a row by a non-zero scalar, add a multiple of one row to another.

Solving Linear Systems — Key Methods

Matrix equation form: A system of equations can be written as AX = B, where A is the coefficient matrix, X is the column of unknowns, and B is the right-hand side column.

Inverse method (2×2): If det(A) ≠ 0, then A is invertible and the unique solution is X = A−1B.

For a 2×2 matrix: If A = [[a,b],[c,d]], then A−1 = (1/det(A)) [[d,−b],[−c,a]] where det(A) = ad − bc.

Unique solution: det(A) ≠ 0 → exactly one solution.

No solution: det(A) = 0 and the system is inconsistent → the lines are parallel.

Infinite solutions: det(A) = 0 and the system is consistent → the lines coincide.

Gaussian elimination: Augmented matrix [A|B] is row-reduced to echelon form using row operations: swap rows, multiply a row by a non-zero scalar, add a multiple of one row to another.

3×3 systems: Write the augmented matrix and row-reduce to solve for three unknowns.

Worked Example 1 — Inverse Matrix Method (2×2)

Solve: 3x + y = 7, x − 2y = 1.

Write as AX = B: A = [[3,1],[1,−2]], X = [[x],[y]], B = [[7],[1]].

det(A) = 3(−2) − 1(1) = −6 − 1 = −7 ≠ 0, so a unique solution exists.

A−1 = (1/−7)[[−2,−1],[−1,3]] = [[2/7, 1/7],[1/7, −3/7]]

X = A−1B = [[2/7, 1/7],[1/7, −3/7]] [[7],[1]] = [[(14+1)/7],[(7−3)/7]] = [[15/7],[4/7]]

x = 15/7, y = 4/7. Check: 3(15/7) + 4/7 = 45/7 + 4/7 = 49/7 = 7 ✓

Worked Example 2 — Gaussian Elimination (3×3)

Solve: x + y + z = 6, 2x − y + z = 3, x + 2y − z = 2.

Augmented matrix: [[1,1,1|6],[2,−1,1|3],[1,2,−1|2]]

R2 ← R2 − 2R1: [[1,1,1|6],[0,−3,−1|−9],[1,2,−1|2]]

R3 ← R3 − R1: [[1,1,1|6],[0,−3,−1|−9],[0,1,−2|−4]]

R3 ← 3R3 + R2: [[1,1,1|6],[0,−3,−1|−9],[0,0,−7|−21]]

From row 3: −7z = −21 → z = 3. From row 2: −3y − 3 = −9 → y = 2. From row 1: x = 6 − 2 − 3 = 1.

Solution: x = 1, y = 2, z = 3.

Hot Tip: Always check det(A) before using the inverse method. If det(A) = 0, the inverse does not exist and you must determine whether the system has no solution (inconsistent) or infinitely many solutions (dependent) by examining the augmented matrix. The two cases look identical until you inspect the augmented rows carefully.

From Equations to Matrices

Every system of linear equations can be encoded as a single matrix equation AX = B. For a 2×2 system like ax + by = e and cx + dy = f, we form the coefficient matrix A = [[a,b],[c,d]], the variable vector X = [[x],[y]], and the constant vector B = [[e],[f]]. Multiplying A by X reproduces the original equations row by row: the first row of A times X gives ax + by, and the second row gives cx + dy. This compact notation is not merely cosmetic — it transforms the problem of solving equations into a problem of matrix arithmetic, unlocking powerful algebraic and computational tools.

The same idea extends to systems of 3 equations in 3 unknowns: AX = B where A is 3×3, X is 3×1, and B is 3×1. The matrix framework scales elegantly to any number of equations and unknowns, making it the foundation of modern numerical computation.

The Inverse Matrix Method

For a 2×2 system AX = B, if det(A) ≠ 0 then A is invertible and we can multiply both sides on the left by A−1: A−1(AX) = A−1B, giving (A−1A)X = A−1B, so IX = A−1B, and therefore X = A−1B. The formula A−1 = (1/det(A))[[d,−b],[−c,a]] gives the inverse directly for a 2×2 matrix [[a,b],[c,d]].

This is analogous to solving the scalar equation ax = b by dividing: x = b/a = a−1b. The critical caveat is that in matrix algebra, multiplication is not commutative, so we must carefully multiply on the left by A−1 on both sides.

The inverse method is elegant and efficient for 2×2 systems. However, computing inverses of large matrices is computationally expensive, so Gaussian elimination is preferred for 3×3 and larger systems.

Gaussian Elimination

Gaussian elimination (row reduction) is the systematic procedure for solving any linear system by transforming the augmented matrix [A|B] into row echelon form using three elementary row operations: (1) swap two rows; (2) multiply a row by a non-zero scalar; (3) add a multiple of one row to another row. These operations do not change the solution set of the system — they simply rewrite the equations in an equivalent, easier-to-solve form.

Once the augmented matrix is in echelon form (zeros below the main diagonal), we can read off the solution by back-substitution: solve the last equation for the last variable, substitute into the second-to-last equation to find the second-to-last variable, and so on. This process is systematic and guaranteed to find the solution (or identify when none exists) in a finite number of steps.

For a 3×3 system, the goal is to produce an upper-triangular augmented matrix. Each elimination step uses a “pivot” (the leading non-zero entry in a row) to create zeros below it in the same column. Careful choice of row operations keeps the arithmetic manageable.

Types of Solutions

A system of two linear equations in two unknowns has a geometric interpretation: each equation defines a straight line in the plane. The solution is the set of points where the lines intersect. There are three possibilities: (1) the lines intersect at a single point → unique solution; (2) the lines are parallel (same slope, different intercepts) → no solution (inconsistent); (3) the lines are identical (same slope, same intercept) → infinitely many solutions (dependent system).

The determinant of A detects which case applies: if det(A) ≠ 0, the lines intersect uniquely; if det(A) = 0, the lines are either parallel or coincident, and you must inspect the augmented matrix to distinguish the two subcases. In an inconsistent system, row reduction produces a row like [0, 0 | c] with c ≠ 0, which represents the impossible equation 0 = c. In a dependent system, a row of all zeros [0, 0 | 0] appears, indicating a free variable.

For 3×3 systems, the geometric picture is three planes in space. The solution can be a single point (unique), a line (infinitely many, one free variable), a plane (infinitely many, two free variables), or empty (inconsistent). The augmented row-reduction procedure identifies all these cases.

3×3 Systems and Back-Substitution

For three equations in three unknowns, write the augmented 3×4 matrix and apply row operations to obtain zeros below the main diagonal. Once in echelon form, solve by back-substitution. The final row gives the value of the last variable directly; substitute into the previous row to get the next variable; substitute into the first row to get the first variable. Check all three values in the original equations before writing your final answer.

When a row of the form [0, 0, 0 | 0] appears during elimination, there is a free variable: the system has infinitely many solutions, typically expressed as a parametric family. When a row [0, 0, 0 | c] with c ≠ 0 appears, the system is inconsistent and has no solution.

Mastery Practice

  1. Fluency

    Q1 — Writing a System as AX = B

    Write the system 4x − y = 10, 2x + 3y = 8 in matrix form AX = B. State the matrices A, X, and B.

  2. Fluency

    Q2 — Solving by Inverse Matrix (2×2)

    Solve the system 2x + y = 5, x − y = 1 using the matrix inverse method.

  3. Fluency

    Q3 — Gaussian Elimination (2×2)

    Use Gaussian elimination to solve: x + 3y = 7, 2x − y = 4.

  4. Fluency

    Q4 — Solving a 3×3 System by Back-Substitution

    A system has been row-reduced to the augmented matrix [[1, 2, −1 | 4], [0, 1, 3 | 5], [0, 0, 2 | 6]]. Find x, y, and z by back-substitution.

  5. Understanding

    Q5 — Full Gaussian Elimination (3×3)

    Use Gaussian elimination to solve the system: x + 2y − z = 3, 2x − y + z = 6, 3x + y + 2z = 13.

  6. Understanding

    Q6 — Identifying an Inconsistent System

    Determine whether the system 2x + 4y = 6, x + 2y = 5 has a unique solution, no solution, or infinitely many solutions. Justify your answer.

  7. Understanding

    Q7 — Identifying a System with Infinite Solutions

    Solve the system 3x − y = 6, 6x − 2y = 12 and describe the solution set geometrically.

  8. Understanding

    Q8 — Finding k for a Special System

    Find the value of k for which the system kx + 2y = 4, 3x + ky = 6 has (a) no unique solution, and (b) determine for each such k whether there is no solution or infinitely many.

  9. Problem Solving

    Q9 — Modelling a Real Situation (3×3 System)

    A chemist mixes three solutions. Solution A is 10% acid, Solution B is 20% acid, Solution C is 50% acid. She needs 100 mL total, with 30 mL of acid, and she uses twice as much of B as A. Find the volume of each solution.

  10. Problem Solving

    Q10 — Analysing Solution Types for a Parameter

    Consider the system x + 2y + z = 4, 2x + 3y + z = 6, x + y + (k−1)z = k. Find all values of k for which the system has: (a) a unique solution, (b) infinitely many solutions, (c) no solution.