# Systems of linear equations

> IB Mathematics: Analysis and Approaches HL · Number & Algebra
> Source: https://www.owlsprep.com/study/ib-math-aa-hl-u1-systems-of-linear-equations/

This module covers 2- and 3-variable systems of linear equations, matrix representation, classification of solution types, and core solution methods tested frequently on IB AA HL exams.

**Prerequisites:** [Matrix arithmetic and inverse matrices](https://www.owlsprep.com/study/ib-math-aa-hl-u1-matrix-basics/); [Calculating determinants of square matrices](https://www.owlsprep.com/study/ib-math-aa-hl-u1-determinants/)

## Learning objectives

- Represent systems of linear equations in matrix and augmented matrix form
- Classify solution types (unique, infinite, no solution) using rank and determinant tests
- Solve 2x2 and 3x3 systems using inverse matrices, Cramer's rule, and Gaussian elimination
- Interpret the geometric meaning of different solution types
- Solve problems with unknown parameters for system consistency

## Matrix Representation and Geometric Interpretation

**Augmented Matrix** — For a system $A\mathbf{x} = \mathbf{b}$, the augmented matrix combines the coefficient matrix $A$ and constant vector $\mathbf{b}$ for row operations.

*Notation:* $\text{aug}(A|\mathbf{b})$

*Example:* For $2x + y = 5, x - 3y = -1$, $\text{aug}(A|\mathbf{b}) = \begin{pmatrix} 2 & 1 & 5 \\ 1 & -3 & -1 \end{pmatrix}$

Each linear equation in $n$ variables corresponds to a hyperplane in $n$-dimensional space. For 2 and 3 variables, this translates to lines (2D) and planes (3D), where the solution set is the intersection of these shapes.

- Unique solution: All shapes intersect at exactly one point
- Infinite solutions: Shapes intersect along a line or coincide completely
- No solution: There is no common intersection point for all equations

**Worked example:** Describe the geometric meaning of an inconsistent 2-variable system of linear equations.

1. Each linear equation in 2 variables represents a straight line in 2D space.
2. An inconsistent system has no solutions, so no point lies on both lines.
3. This only occurs when the two lines are parallel and distinct, with the same gradient but different intercepts.

> **Exam tip:** Always link algebraic solution type to geometric interpretation when asked — this is often a separate marking point.

## Solution Methods: Inverse Matrices and Cramer's Rule

For square systems ($n$ equations, $n$ variables) $A\mathbf{x} = \mathbf{b}$, if $A$ is invertible ($\det(A) \neq 0$), the system has a unique solution that can be found directly with inverse matrices or Cramer's rule.

**Cramer's Rule** — For a 3x3 system $A\mathbf{x} = \mathbf{b}$, replace the $i$-th column of $A$ with $\mathbf{b}$ to get $A_i$. The solution is $x_i = \frac{\det(A_i)}{\det(A)}$, for $\det(A) \neq 0$.

**Worked example:** Solve $2x + y = 7$, $x - 2y = 6$ using Cramer's rule.

1. Write coefficient matrix $A$ and constant vector $\mathbf{b}$:
2. $$A = \begin{pmatrix} 2 & 1 \\ 1 & -2 \end{pmatrix}, \quad \mathbf{b} = \begin{pmatrix} 7 \\ 6 \end{pmatrix}$$
3. Calculate $\det(A)$:
4. $$\det(A) = (2)(-2) - (1)(1) = -5 \neq 0$$
5. Create $A_1$ (replace column 1 with $\mathbf{b}$) and $A_2$ (replace column 2 with $\mathbf{b}$):
6. $$A_1 = \begin{pmatrix} 7 & 1 \\ 6 & -2 \end{pmatrix}, \quad A_2 = \begin{pmatrix} 2 & 7 \\ 1 & 6 \end{pmatrix}$$
7. Calculate determinants:
8. $$\det(A_1) = -20, \quad \det(A_2) = 5$$
9. Find solutions:
10. $$x = \frac{-20}{-5} = 4, \quad y = \frac{5}{-5} = -1$$

*Calculator:* allowed

## Row Reduction (Gaussian Elimination)

Gaussian elimination is the most flexible method for any system, including non-square systems and systems with no or infinite solutions. It uses elementary row operations to reduce the augmented matrix to row-echelon form, followed by back substitution to find solutions.

> **info**
>
> Elementary row operations never change the solution set of the system. Allowed operations: 1) Swap two rows, 2) Multiply a row by a non-zero constant, 3) Add a multiple of one row to another.

**Worked example:** Find all solutions of $x + 2y - z = 3$, $2x - y + 2z = 1$, $3x + y + z = 4$ using Gaussian elimination.

1. Write the augmented matrix:
2. $$\begin{pmatrix} 1 & 2 & -1 & 3 \\ 2 & -1 & 2 & 1 \\ 3 & 1 & 1 & 4 \end{pmatrix}$$
3. Eliminate $x$ from rows 2 and 3: $R_2 = R_2 - 2R_1$, $R_3 = R_3 - 3R_1$:
4. $$\rightarrow \begin{pmatrix} 1 & 2 & -1 & 3 \\ 0 & -5 & 4 & -5 \\ 0 & -5 & 4 & -5 \end{pmatrix}$$
5. Eliminate $y$ from row 3: $R_3 = R_3 - R_2$:
6. $$\rightarrow \begin{pmatrix} 1 & 2 & -1 & 3 \\ 0 & -5 & 4 & -5 \\ 0 & 0 & 0 & 0 \end{pmatrix}$$
7. The last row is all zeros, so we have one free variable. Let $z = t$, $t \in \mathbb{R}$.
8. Back substitute for $y$: $-5y + 4t = -5 \implies y = 1 - \frac{4}{5}t$
9. Back substitute for $x$: $x + 2\left(1 - \frac{4}{5}t\right) - t = 3 \implies x = 1 + \frac{13}{5}t$
10. The general infinite solution set is:
11. $$x = 1 + \frac{13}{5}t, \quad y = 1 - \frac{4}{5}t, \quad z = t, \quad t \in \mathbb{R}$$

> **Exam tip:** Always clearly state the free parameter and full general solution for infinite solution sets to earn full marks.

## Classifying Solution Types with the Rouché–Capelli Theorem

**Rouché–Capelli Theorem** — A system $A\mathbf{x} = \mathbf{b}$ has a solution if and only if $\text{rank}(A) = \text{rank}(\text{aug}(A|\mathbf{b}))$. If ranks are equal: (1) $\text{rank} = $ number of variables → unique solution, (2) $\text{rank} < $ number of variables → infinite solutions. If ranks are unequal → no solution.

**Worked example:** Find the value of $k$ for which the system has no solution: $x + 2y - 3z = 4$, $2x + 3y + 2z = 2$, $3x + 5y - kz = 8$.

1. Write the augmented matrix:
2. $$\begin{pmatrix} 1 & 2 & -3 & 4 \\ 2 & 3 & 2 & 2 \\ 3 & 5 & -k & 8 \end{pmatrix}$$
3. Row reduce: $R_2 = R_2 - 2R_1$, $R_3 = R_3 - 3R_1$, then $R_3 = R_3 - R_2$:
4. $$\rightarrow \begin{pmatrix} 1 & 2 & -3 & 4 \\ 0 & -1 & 8 & -6 \\ 0 & 0 & 1 - k & 2 \end{pmatrix}$$
5. For no solution, $\text{rank}(A) < \text{rank}(\text{aug})$. This occurs when the coefficient of $z$ is zero, but the constant term is non-zero.
6. Set $1 - k = 0 \implies k = 1$. For $k=1$, the last row becomes $[0 \ 0 \ 0 \ | \ 2]$, which is a contradiction, so there is no solution.

## Common pitfalls

- **Wrong:** Applying Cramer's rule when $\det(A) = 0$
  - Why it fails: Cramer's rule only works for systems with unique solutions, it cannot find infinite solutions or confirm inconsistency
  - Correct: Check $\det(A)$ first, use row reduction to classify solutions when $\det(A) = 0$
- **Wrong:** Assuming all systems with $\det(A) = 0$ are inconsistent
  - Why it fails: $\det(A) = 0$ only means there is no unique solution, the system can still have infinite solutions
  - Correct: Check the rank of the augmented matrix after row reduction to confirm inconsistency
- **Wrong:** Not including the free parameter when writing infinite solution sets
  - Why it fails: Examiners require the full general solution, not just a single particular solution
  - Correct: Introduce a free parameter for each non-pivot column, express all variables in terms of parameters
- **Wrong:** Multiplying a row by zero during row reduction
  - Why it fails: This erases all information from the row and changes the solution set of the system
  - Correct: Only multiply rows by non-zero constants when performing Gaussian elimination
- **Wrong:** Skipping verification of solutions for Cramer's rule
  - Why it fails: Small sign errors when calculating determinants lead to wrong solutions that are easy to miss
  - Correct: Always substitute your solution back into the original equations to check

## Cheatsheet

| Solution Type | Rank Condition | 3D Geometric Meaning |
| --- | --- | --- |
| Unique solution | $\text{rank}(A) = \text{rank}(\text{aug}) = 3$ | Three planes intersect at one point |
| Infinite solutions (line) | $\text{rank}(A) = \text{rank}(\text{aug}) = 2$ | Three planes intersect along a common line |
| Infinite solutions (plane) | $\text{rank}(A) = \text{rank}(\text{aug}) = 1$ | All three planes are coincident |
| No solution | $\text{rank}(A) < \text{rank}(\text{aug})$ | At least two planes are parallel or no common intersection |

## What's next

Systems of linear equations are the foundation for many further topics in IB AA HL, particularly vectors in 3D space, where you will use similar methods to find intersections of lines and planes. Solution type classification is also a core skill for problems involving eigenvalues and eigenvectors of matrices, and for solving systems of linear differential equations in later calculus units. Mastery of Gaussian elimination and rank-based classification will not only help you solve exam questions on this topic, but also save time on multi-step problems across the entire syllabus.

- [Functions](https://www.owlsprep.com/study/ib-math-aa-hl-u2-overview/)
- [Function definitions and notation](https://www.owlsprep.com/study/ib-math-aa-hl-u2-function-definitions-and-notation/)
- [Domain and Range](https://www.owlsprep.com/study/ib-math-aa-hl-u2-domain-and-range/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-aa-hl-u1-systems-of-linear-equations/
