# Matrices: algebra, determinant and inverse

> IB Mathematics Applications and Interpretation HL · IB Math AI HL
> Source: https://www.owlsprep.com/study/ib-math-ai-hl-u1-matrices-algebra-determinant-and-inverse/

This module covers core matrix arithmetic, determinant calculation for 2x2 and 3x3 matrices, inverse matrix derivation, and applications to solve linear systems aligned with IB AI HL requirements.

**Prerequisites:** [Basic arithmetic operations and order of operations](https://www.owlsprep.com/study/ib-math-ai-hl-u1-basic-arithmetic-review/); [Systems of linear equations with 2 and 3 variables](https://www.owlsprep.com/study/ib-math-ai-hl-u1-simultaneous-linear-equations/)

## Learning objectives

- Perform standard matrix arithmetic operations (addition, scalar multiplication, matrix multiplication) for up to 3x3 matrices
- Calculate the determinant of 2x2 and 3x3 matrices using cofactor expansion and shortcut rules
- Find the inverse of non-singular 2x2 and 3x3 matrices to solve systems of linear equations
- Identify singular matrices and explain their real-world implications in transformation and data modelling contexts

## Basic Matrix Algebra Operations

Matrices are rectangular arrays of numbers used to store and manipulate structured data, from survey results to geometric transformation coordinates. All operations follow strict dimension rules that you must verify before performing calculations.

**Matrix Dimension** — A matrix with $m$ rows and $n$ columns. Operations like addition and subtraction can only be performed on matrices of identical dimensions.

*Notation:* $m \times n$

- Scalar multiplication multiplies every element in the matrix by a constant scalar value
- Matrix addition adds corresponding elements of two equal-dimension matrices
- To multiply matrix $A$ (size $m \times n$) by matrix $B$ (size $n \times p$), the inner dimensions must match, and the output is size $m \times p$

**Worked example:** Given $A = \begin{pmatrix} 2 & 3 \\ 1 & 4 \end{pmatrix}$ and $B = \begin{pmatrix} 5 & 1 \\ 0 & 2 \end{pmatrix}$, calculate $2A + AB$

1. First calculate scalar multiple 2A:
2. $$2A = 2 \times \begin{pmatrix} 2 & 3 \\ 1 & 4 \end{pmatrix} = \begin{pmatrix} 4 & 6 \\ 2 & 8 \end{pmatrix}$$
3. Next calculate matrix product AB using dot products:
4. $$AB = \begin{pmatrix} (2*5 + 3*0) & (2*1 + 3*2) \\ (1*5 +4*0) & (1*1 +4*2) \end{pmatrix} = \begin{pmatrix} 10 & 8 \\ 5 &9 \end{pmatrix}$$
5. Sum the two resulting matrices:
6. $$2A + AB = \begin{pmatrix} 4+10 & 6+8 \\ 2+5 & 8+9 \end{pmatrix} = \begin{pmatrix} 14 & 14 \\7 &17 \end{pmatrix}$$

**Check your understanding**

Confirm your understanding of matrix operation rules:

1. What is the required dimension of the second matrix to multiply a 3x2 matrix by it?

   - 2x3
   - 3x2
   - 2x2
   - 3x3

   *Why:* The inner dimensions (columns of first matrix, rows of second) must match, so 2 rows for the second matrix is required.

> **Exam tip:** IB exam mark schemes almost always award 1 method mark for correctly verifying matrix dimensions before attempting multiplication.

*Calculator:* allowed

## Calculating Determinants of 2x2 and 3x3 Matrices

The determinant is a single scalar value calculated for any square matrix, that describes the scaling factor of a geometric transformation, and tells you whether the matrix has a valid inverse.

**Derivation:** Derive the 2x2 determinant formula

*Starting from:* 2x2 matrix $A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}$

1. The determinant is defined as the difference between the product of the main diagonal elements and the product of the off-diagonal elements
2. $$det(A) = ad - bc$$

*Conclusion:* A 2x2 matrix is singular if $ad = bc$.

**Worked example:** Calculate the determinant of $A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}$

1. Use the 3x3 shortcut rule: sum of products of down-right diagonals minus sum of products of down-left diagonals
2. $$det(A) = (1*5*9 + 2*6*7 + 3*4*8) - (3*5*7 + 2*4*9 + 1*6*8)$$
3. $$det(A) = (45 + 84 + 96) - (105 + 72 + 48) = 225 - 225 = 0$$
4. This matrix is singular, so no inverse exists.

> **tip**
>
> For 3x3 matrices, the shortcut rule is 3x faster than cofactor expansion and reduces arithmetic error risk for exam calculations.

*Calculator:* allowed

## Finding the Inverse of Non-Singular Matrices

**Matrix Inverse** — The unique matrix such that multiplying $A$ by $A^{-1}$ returns the identity matrix: $A A^{-1} = A^{-1} A = I_n$

*Notation:* $A^{-1}$

**Exam command terms**

IB exam command terms for inverse questions have strict marking expectations:

- **Find the inverse** — Full working for determinant and adjugate must be shown, even if you use a GDC to verify

- **Show that A is invertible** — You only need to prove det(A) ≠ 0, no full inverse calculation required

**Worked example:** Find the inverse of 2x2 matrix $A = \begin{pmatrix} 3 & 1 \\ 5 & 2 \end{pmatrix}$

1. First calculate the determinant:
2. $$det(A) = (3*2) - (1*5) = 6 -5 = 1$$
3. Swap the main diagonal elements, negate the off-diagonal elements:
4. $$adjugate(A) = \begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix}$$
5. Multiply the adjugate by 1/det(A):
6. $$A^{-1} = \frac{1}{1} \times \begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix} = \begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix}$$
7. Verify: $A A^{-1} = \begin{pmatrix} 3*2 +1*(-5) & 3*(-1) +1*3 \\5*2 +2*(-5) &5*(-1)+2*3 \end{pmatrix} = I_2$

*Calculator:* graphing_only

## Solving Linear Systems Using Inverse Matrices

You can rewrite any 3-variable linear system in the matrix form $AX = B$, where $A$ is the coefficient matrix, $X$ is the variable vector, and $B$ is the constant term vector. Left-multiplying both sides by $A^{-1}$ gives the solution directly as $X = A^{-1}B$.

**Worked example:** Solve the system $2x + y = 5$, $3x - 2y = -3$ using inverse matrices

1. Write the system in $AX=B$ form:
2. $$\begin{pmatrix} 2 & 1 \\ 3 & -2 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 5 \\ -3 \end{pmatrix}$$
3. Calculate det(A) = (2*-2) - (1*3) = -4 -3 = -7
4. Find $A^{-1} = \frac{1}{-7} \begin{pmatrix} -2 & -1 \\ -3 & 2 \end{pmatrix}$
5. Calculate $X = A^{-1} B$:
6. $$\begin{pmatrix} x \\ y \end{pmatrix} = \frac{1}{-7} \begin{pmatrix} -2*5 + (-1)*(-3) \\ -3*5 + 2*(-3) \end{pmatrix} = \begin{pmatrix} 1 \\ 3 \end{pmatrix}$$
7. Final solution: $x=1, y=3$

*Calculator:* allowed

## Common pitfalls

- **Wrong:** Multiplying matrices element-wise instead of using the dot product rule
  - Why it fails: Confusing matrix multiplication with scalar multiplication, leading to completely incorrect outputs
  - Correct: Always calculate each output element as the dot product of the corresponding row from the first matrix and column from the second
- **Wrong:** Forgetting to swap top-left and bottom-right elements when calculating 2x2 inverse
  - Why it fails: Mixing up the adjugate step for 2x2 matrices, leading to an inverse that does not produce the identity when multiplied by the original
  - Correct: For 2x2 matrix $\begin{pmatrix}a&b\\c&d\end{pmatrix}$, inverse is $\frac{1}{ad-bc} \begin{pmatrix}d&-b\\-c&a\end{pmatrix}$
- **Wrong:** Attempting to invert a singular matrix with determinant zero
  - Why it fails: Assuming all square matrices have an inverse, leading to division by zero errors
  - Correct: First calculate the determinant; if it equals zero, state the matrix is singular and no inverse exists
- **Wrong:** Mixing up the order of matrices when solving $AX = B$ as $X = B^{-1}A$
  - Why it fails: Matrix multiplication is not commutative, so order of operations cannot be swapped
  - Correct: Left-multiply both sides by $A^{-1}$ to get the valid solution $X = A^{-1} B$
- **Wrong:** Ignoring sign rules for cofactors when calculating 3x3 determinant
  - Why it fails: Cofactor signs alternate in a checkerboard pattern, so skipping negative signs gives a wrong determinant value
  - Correct: Follow the sign matrix $(+, -, + / -, +, - / +, -, +)$ for all cofactor expansion steps

## Cheatsheet

| Operation | 2x2 Rule | 3x3 Shortcut | Key Note |
| --- | --- | --- | --- |
| Matrix Addition | Add corresponding elements, same dimensions required | Add corresponding elements, same dimensions required | Commutative |
| Matrix Multiplication | Dot product of rows and columns | Dot product of rows and columns | Not commutative |
| Determinant | $ad - bc$ | Sum of down diagonals minus sum of up diagonals | Zero = singular |
| Inverse | $\frac{1}{det(A)} \begin{pmatrix}d&-b\\-c&a\end{pmatrix}$ | $\frac{1}{det(A)} \times \text{adjugate matrix}$ | Only exists if $det(A) \neq 0$ |

## What's next

Mastering matrix algebra, determinants and inverses is the foundational skill you will rely on for upcoming AI HL topics including transformation matrices, Markov chain modelling, and network analysis, all of which are heavily weighted in Paper 3 data-focused questions. You will be able to use these tools to solve real-world problems ranging from population flow modelling to cost optimization for business datasets, which are common contexts for IB AI HL exam questions. Before moving on, ensure you can quickly verify your inverse calculations by multiplying the original matrix with its calculated inverse to confirm you get the identity matrix.

---

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-ai-hl-u1-matrices-algebra-determinant-and-inverse/
