# Matrices

> AP Precalculus · Unit 4: Functions Involving Parameters, Vectors, and Matrices
> Source: https://www.owlsprep.com/study/ap-precalculus-u4-matrices/

This module covers matrix notation, basic operations, 2×2 determinants, inverse matrices, and solving 2×2 linear systems aligned to AP Precalculus CED Unit 4, with worked examples and study tips.

**Prerequisites:** [Systems of linear equations in two variables](https://www.owlsprep.com/study/ap-precalculus-u4-systems-of-linear-equations/); [Basic vector dot product operations](https://www.owlsprep.com/study/ap-precalculus-u4-vector-operations/); Algebraic properties of real number multiplication

## Learning objectives

- Define matrices and their dimensions and notation
- Perform core matrix operations (addition, scalar multiplication, multiplication)
- Calculate 2×2 determinants and inverse matrices
- Solve 2×2 linear systems using inverse matrices

## Matrix Basics: Definition and Notation

A matrix is a rectangular array of numbers (called entries or elements) arranged in ordered rows and columns. The dimension (size) of a matrix is written as $m \times n$, where $m$ is the number of rows and $n$ the number of columns.

An individual entry is written as $a_{ij}$, where $i$ is the row number and $j$ is the column number of the entry. For example, $a_{23}$ refers to the entry in the second row, third column. Matrices are used to compactly organize data, represent linear systems, and describe linear transformations, core topics in AP Precalculus Unit 4.

> **info**
>
> Note: Unit 4 (including matrices) is not assessed on the AP Precalculus Exam — the College Board Course and Exam Description limits the exam to Units 1–3. Matrices are taught at teacher discretion, as enrichment that builds a foundation for later STEM courses like linear algebra.

**Matrix** — A rectangular array of entries arranged in $m$ rows and $n$ columns, used to organize data and represent linear relationships.

*Notation:* $m \times n$

## Entry-Wise Operations: Addition and Scalar Multiplication

The simplest matrix operations are entry-wise: addition, subtraction, and scalar multiplication. Matrix addition is only defined for two matrices of the same dimension (same number of rows and columns). To add two matrices, you add corresponding entries: $(A + B)_{ij} = a_{ij} + b_{ij}$. Subtraction follows the same rule: $(A - B)_{ij} = a_{ij} - b_{ij}$.

Scalar multiplication involves multiplying an entire matrix by a single constant (called a scalar). To perform scalar multiplication, multiply every entry in the matrix by the scalar: $(kA)_{ij} = k \cdot a_{ij}$ for any scalar $k$ and any matrix $A$.

These operations follow most familiar rules of real number algebra: addition is commutative and associative, and scalar multiplication distributes over matrix addition.

**Worked example:** Given $A = \begin{bmatrix} 2 & -1 \\ 0 & 3 \end{bmatrix}$ and $B = \begin{bmatrix} -4 & 2 \\ 1 & -2 \end{bmatrix}$, compute $3A - 2B$.

1. First confirm dimensions: both $A$ and $B$ are $2 \times 2$, so the operation is valid.
2. Calculate $3A$ by multiplying each entry of $A$ by 3:

   $$3A = \begin{bmatrix} 3(2) & 3(-1) \\ 3(0) & 3(3) \end{bmatrix} = \begin{bmatrix} 6 & -3 \\ 0 & 9 \end{bmatrix}$$
3. Calculate $2B$ by multiplying each entry of $B$ by 2:

   $$2B = \begin{bmatrix} 2(-4) & 2(2) \\ 2(1) & 2(-2) \end{bmatrix} = \begin{bmatrix} -8 & 4 \\ 2 & -4 \end{bmatrix}$$
4. Subtract entry-wise to get the final result:

   $$3A - 2B = \begin{bmatrix} 6 - (-8) & -3 - 4 \\ 0 - 2 & 9 - (-4) \end{bmatrix} = \begin{bmatrix} 14 & -7 \\ -2 & 13 \end{bmatrix}$$

> **Exam tip:** Always check matrix dimensions before performing any operation. Questions often include "undefined" as a multiple-choice option to test whether you know addition is only allowed for same-dimension matrices.

## Matrix Multiplication and 2×2 Determinants

Matrix multiplication is *not* entry-wise, and follows different rules. To multiply matrix $A$ by matrix $B$ to get $AB$, the number of columns in $A$ must equal the number of rows in $B$. If $A$ is $m \times n$ and $B$ is $n \times p$, the product $AB$ will be $m \times p$.

The entry at position $(i,j)$ in $AB$ is the dot product of the $i$-th row of $A$ and the $j$-th column of $B$:

$$(AB)_{ij} = \sum_{k=1}^n a_{ik}b_{kj}$$

> **warning**
>
> A critical property of matrix multiplication is that it is **not commutative**: $AB \neq BA$ in most cases, so you can never swap the order of multiplication.

For a square matrix (equal number of rows and columns, e.g. $2 \times 2$), we calculate a determinant, a single scalar value that tells us whether the matrix has an inverse. For a $2 \times 2$ matrix, the determinant is:

$$\det(A) = ad - bc \quad \text{for} \quad A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$$

If $\det(A) = 0$, the matrix is called singular and has no inverse. If $\det(A) \neq 0$, the matrix is invertible.

**Worked example:** Given $A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$ and $B = \begin{bmatrix} 0 & -1 \\ 2 & 5 \end{bmatrix}$, calculate $AB$ and $\det(A)$.

1. Check dimensions: both are $2 \times 2$, so multiplication is valid, and the product is also $2 \times 2$.
2. Calculate entry (1,1): dot product of row 1 of A, column 1 of B: $(1)(0) + (2)(2) = 4$.
3. Calculate entry (1,2): dot product of row 1 of A, column 2 of B: $(1)(-1) + (2)(5) = 9$.
4. Calculate entry (2,1): dot product of row 2 of A, column 1 of B: $(3)(0) + (4)(2) = 8$.
5. Calculate entry (2,2): dot product of row 2 of A, column 2 of B: $(3)(-1) + (4)(5) = 17$.
6. Combine entries to get $AB$, then calculate $\det(A)$:

   $$AB = \begin{bmatrix} 4 & 9 \\ 8 & 17 \end{bmatrix}, \quad \det(A) = (1)(4) - (2)(3) = -2$$

> **Exam tip:** Always remember the "row-first, column-second" rule for matrix multiplication: the (i,j) entry comes from the i-th row of the first matrix and j-th column of the second. Swapping these gives incorrect entries.

## Inverse Matrices and Solving 2×2 Linear Systems

For an invertible $2 \times 2$ matrix $A$, the inverse matrix $A^{-1}$ satisfies the property $AA^{-1} = A^{-1}A = I$, where $I$ is the 2×2 identity matrix:

$$I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$$

The identity matrix acts as the multiplicative identity for matrices, just like 1 does for real numbers. The formula for the inverse of a $2 \times 2$ matrix is:

$$A^{-1} = \frac{1}{\det(A)} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} \quad \text{for} \quad A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$$

One of the most common applications of inverse matrices is solving 2×2 systems of linear equations. Any linear system can be rewritten in compact matrix form:

$$A\vec{x} = \vec{b}, \quad A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, \quad \vec{x} = \begin{bmatrix} x \\ y \end{bmatrix}, \quad \vec{b} = \begin{bmatrix} e \\ f \end{bmatrix}$$

If $A$ is invertible, we can multiply both sides by $A^{-1}$ on the left to get $\vec{x} = A^{-1}\vec{b}$, which directly gives the solution for $x$ and $y$.

**Worked example:** Solve the system $\begin{cases} 2x + 3y = 12 \\ x - 2y = -1 \end{cases}$ using an inverse matrix.

1. Write the system in matrix form:

   $$A = \begin{bmatrix} 2 & 3 \\ 1 & -2 \end{bmatrix}, \quad \vec{b} = \begin{bmatrix} 12 \\ -1 \end{bmatrix}$$
2. Calculate the determinant to check invertibility:

   $$\det(A) = (2)(-2) - (3)(1) = -7 \neq 0, so the inverse exists$$
3. Apply the inverse formula:

   $$A^{-1} = \frac{1}{-7} \begin{bmatrix} -2 & -3 \\ -1 & 2 \end{bmatrix} = \begin{bmatrix} 2/7 & 3/7 \\ 1/7 & -2/7 \end{bmatrix}$$
4. Multiply by $\vec{b}$ to get the solution vector $\vec{x}$:

   $$\vec{x} = \begin{bmatrix} (2/7)(12) + (3/7)(-1) \\ (1/7)(12) + (-2/7)(-1) \end{bmatrix} = \begin{bmatrix} 21/7 \\ 14/7 \end{bmatrix} = \begin{bmatrix} 3 \\ 2 \end{bmatrix}$$
5. The solution is $x=3$, $y=2$, which checks out when substituted back into the original equations.

**Check your understanding**

Test your understanding with this AP-style multiple choice question:

1. Given $A = \begin{bmatrix} -2 & 1 \\ 3 & 0 \end{bmatrix}$ and $B = \begin{bmatrix} 4 & -1 \\ -2 & 3 \end{bmatrix}$, what is the entry in the second row, first column of $2A + AB$?

   - -2
   - 6
   - 10
   - The expression is undefined

   *Answer:* 10

   *Why:* The (2,1) entry of $2A$ is $2 \cdot 3 = 6$. The (2,1) entry of $AB$ is the dot product of row 2 of A and column 1 of B: $(3)(4) + (0)(-2) = 12$. Adding gives $6 + 12 = 10$.

> **Exam tip:** When writing the inverse matrix, don't forget the negative signs on $b$ and $c$ after swapping $a$ and $d$ — this is the most common error here.

## Common pitfalls

- **Wrong:** Adding matrices of different dimensions (e.g., adding a 2×2 and 2×3 matrix by adding matching entries and leaving the last column unchanged)
  - Why it fails: Students confuse matrix addition with matrix multiplication (which only requires matching inner dimensions) and assume any addition is allowed if rows match
  - Correct: Always confirm both matrices have the same number of rows *and* columns before adding; if not, the sum is undefined
- **Wrong:** Swapping the order of matrix multiplication, e.g., simplifying $AB + AC$ as $(B + C)A$ or assuming $AB = BA$
  - Why it fails: Students incorrectly transfer the commutative property of real number multiplication to matrices
  - Correct: Never swap the order of matrix multiplication unless the matrices are explicitly inverses of each other
- **Wrong:** Calculating the determinant of $\begin{bmatrix} a & b \\ c & d \end{bmatrix}$ as $ad + bc$, or keeping positive signs for $b$ and $c$ in the inverse matrix
  - Why it fails: Students misremember the sign conventions for determinant and inverse formulas
  - Correct: Every time you calculate a determinant, say "ad minus bc" to confirm the sign; for inverse, explicitly mark the negative signs for $b$ and $c$ before proceeding
- **Wrong:** When solving $A\vec{x} = \vec{b}$, multiplying the inverse on the right to get $\vec{x} = \vec{b}A^{-1}$ instead of $\vec{x} = A^{-1}\vec{b}$
  - Why it fails: Students are used to commutativity of real numbers and don't prioritize order for inverse multiplication
  - Correct: Always multiply the inverse on the *left* of both sides of the matrix equation to cancel $A$ on the left of $\vec{x}$
- **Wrong:** Claiming an inverse exists when the determinant is zero, or trying to calculate an inverse with a denominator of zero
  - Why it fails: Students forget what the determinant tells us about invertibility
  - Correct: Always calculate the determinant first; if it equals zero, state the matrix is singular, no inverse exists, and the system has no unique solution

## Cheatsheet

| Category | Formula/Rule | Notes |
| --- | --- | --- |
| Matrix Dimensions | $m \times n$ | $m$ = number of rows, $n$ = number of columns; addition requires matching $m$ and $n$ |
| Matrix Addition | $(A+B)_{ij} = A_{ij} + B_{ij}$ | Only valid for same-dimension matrices |
| Scalar Multiplication | $(kA)_{ij} = k \cdot A_{ij}$ | Valid for any matrix and scalar $k$ |
| Matrix Multiplication | $(AB)_{ij} = \sum_{k=1}^n A_{ik}B_{kj}$ | Valid only if columns of $A$ = rows of $B$; $AB \neq BA$ generally |
| 2×2 Determinant | $\det\begin{bmatrix}a & b \\ c & d\end{bmatrix} = ad - bc$ | $\det(A) = 0$ means no inverse exists |
| 2×2 Inverse Matrix | $A^{-1} = \frac{1}{\det(A)}\begin{bmatrix}d & -b \\ -c & a\end{bmatrix}$ | Only valid when $\det(A) \neq 0$; $AA^{-1} = A^{-1}A = I$ |
| 2×2 Identity Matrix | $I = \begin{bmatrix}1 & 0 \\ 0 & 1\end{bmatrix}$ | Multiplicative identity: $AI = IA = A$ |
| Linear System Solution | $A\vec{x} = \vec{b} \implies \vec{x} = A^{-1}\vec{b}$ | Only applies when $A$ is invertible |

## What's next

Matrices are the foundation for linear algebra, which you will use extensively if you move on to AP Calculus, college statistics, data science, or engineering. Within AP Precalculus Unit 4, this topic is a prerequisite for studying linear transformations of vectors, which rely on matrix multiplication to map input vectors to output vectors. Without mastering matrix operations, determinants, and inverses, you will not be able to analyze linear transformations or solve parameterized linear systems that appear later in the unit, tying together the unit's core themes of parameters, vectors, and linear relationships.

- [The inverse and determinant of a matrix](https://www.owlsprep.com/study/ap-precalculus-u4-the-inverse-and-determinant-of/)
- [Linear transformations and matrices](https://www.owlsprep.com/study/ap-precalculus-u4-linear-transformations-and-matrices/)
- [Matrices as functions](https://www.owlsprep.com/study/ap-precalculus-u4-matrices-as-functions/)

---

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/ap-precalculus-u4-matrices/
