AP Precalculus · Functions involving parameters, vectors and matrices
Matrices and linear transformations
1Matrices and their arithmetic
A matrix is a rectangular array of numbers. An $m \times n$ matrix has $m$ rows and $n$ columns.
- Addition and scalar multiplication work entry by entry (matrices must be the same size to add).
- Multiplication $AB$: the entry in row $i$, column $j$ is the dot product of row $i$ of $A$ with column $j$ of $B$. It requires (columns of $A$) = (rows of $B$).
- Matrix multiplication is not commutative: usually $AB \ne BA$.
$A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$, $B = \begin{bmatrix} 0 & 1 \\ 5 & -1 \end{bmatrix}$.
- Row 1 of $A$ with columns of $B$: $1(0) + 2(5) = 10$; $1(1) + 2(-1) = -1$.
- Row 2: $3(0) + 4(5) = 20$; $3(1) + 4(-1) = -1$.
- $AB = \begin{bmatrix} 10 & -1 \\ 20 & -1 \end{bmatrix}$.
Check yourself
Can a 2 × 3 matrix be multiplied by a 3 × 4 matrix?
Show the answer
Yes, giving a 2 × 4 matrix
Inner dimensions match.
2Determinants and inverses
For $A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$:
- Determinant: $\det A = ad - bc$.
- If $\det A \ne 0$, the inverse is $A^{-1} = \frac{1}{ad - bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}$, and $AA^{-1} = A^{-1}A = I$ (the identity $\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$).
- If $\det A = 0$, $A$ has no inverse.
$A = \begin{bmatrix} 4 & 7 \\ 2 & 6 \end{bmatrix}$.
- $\det A = 24 - 14 = 10$.
- $A^{-1} = \frac{1}{10}\begin{bmatrix} 6 & -7 \\ -2 & 4 \end{bmatrix}$.
Solving systems: $2x + y = 5$ and $x - y = 1$ can be written $A\mathbf{x} = \mathbf{b}$ with $A = \begin{bmatrix} 2 & 1 \\ 1 & -1 \end{bmatrix}$. Then $\mathbf{x} = A^{-1}\mathbf{b}$, giving $x = 2$, $y = 1$.
Check yourself
The determinant of [[3, 5], [1, 2]] is:
Show the answer
1
6 − 5.
3Linear transformations
A $2 \times 2$ matrix $A$ defines a linear transformation $L(\mathbf{x}) = A\mathbf{x}$ that maps each point (vector) in the plane to a new point. The columns of $A$ are the images of $\langle 1, 0 \rangle$ and $\langle 0, 1 \rangle$.
Common transformations:
- Rotation by $\theta$ anticlockwise: $\begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}$.
- Reflection in the x-axis: $\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}$; in $y = x$: $\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$.
- Dilation by factor $k$: $\begin{bmatrix} k & 0 \\ 0 & k \end{bmatrix}$.
rotate $(3, 1)$ by $90°$.
- $\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}\begin{bmatrix} 3 \\ 1 \end{bmatrix} = \begin{bmatrix} -1 \\ 3 \end{bmatrix}$.
Area: a transformation multiplies areas by $|\det A|$. If $\det A < 0$, orientation is reversed (as in a reflection).
Composition: doing $B$ then $A$ corresponds to the product $AB$.
A matrix sends the unit square to a parallelogram; areas scale by |det A|
Check yourself
The transformation with matrix [[2, 0], [0, 3]] multiplies areas by:
Show the answer
6
|det| = 6.
4Matrices as models of change
A transition matrix describes how quantities move between states each step.
each year 90% of city residents stay and 10% move to the suburbs; 80% of suburban residents stay and 20% move to the city.
- With $\mathbf{x} = \begin{bmatrix} \text{city} \\ \text{suburb} \end{bmatrix}$: $T = \begin{bmatrix} 0.9 & 0.2 \\ 0.1 & 0.8 \end{bmatrix}$.
- Start: $\begin{bmatrix} 600 \\ 400 \end{bmatrix}$ (thousands). Next year: $T\mathbf{x} = \begin{bmatrix} 540 + 80 \\ 60 + 320 \end{bmatrix} = \begin{bmatrix} 620 \\ 380 \end{bmatrix}$.
- After $n$ years: $T^n\mathbf{x}$. Over time the populations approach a steady state where $T\mathbf{x} = \mathbf{x}$: here city $\frac{2}{3}$, suburbs $\frac{1}{3}$ of the total.
Check yourself
In a transition matrix model, the state after 3 steps is:
Show the answer
T³x
Apply T three times.
5Going deeper: multiplying, inverting and seeing what a matrix does to the plane
A matrix with m rows and n columns is m × n. Matrices of the same size add entry by entry. A scalar multiplies every entry.
Multiplication: AB is defined when the number of columns of A equals the number of rows of B. The entry in row i, column j is the dot product of row i of A with column j of B. In general AB ≠ BA.
$A = \begin{bmatrix} 2 & 1 \\ 1 & 3 \end{bmatrix}$, $B = \begin{bmatrix} 0 & 4 \\ 5 & -1 \end{bmatrix}$.
- $AB = \begin{bmatrix} 2(0) + 1(5) & 2(4) + 1(-1) \\ 1(0) + 3(5) & 1(4) + 3(-1) \end{bmatrix} = \begin{bmatrix} 5 & 7 \\ 15 & 1 \end{bmatrix}$.
- $BA = \begin{bmatrix} 4 & 12 \\ 9 & 2 \end{bmatrix}$: different.
Determinant of a 2 × 2 matrix: $\det\begin{bmatrix} a & b \\ c & d \end{bmatrix} = ad - bc$.
Inverse: exists only if the determinant is not zero:
$$A^{-1} = \frac{1}{ad - bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}$$
and $AA^{-1} = I$, the identity matrix.
for A above.
- det A = 6 − 1 = 5.
- $A^{-1} = \frac{1}{5}\begin{bmatrix} 3 & -1 \\ -1 & 2 \end{bmatrix}$.
Solving a system: write AX = B; then $X = A^{-1}B$.
2x + y = 5 and x + 3y = 10.
- $X = \frac{1}{5}\begin{bmatrix} 3 & -1 \\ -1 & 2 \end{bmatrix}\begin{bmatrix} 5 \\ 10 \end{bmatrix} = \frac{1}{5}\begin{bmatrix} 5 \\ 15 \end{bmatrix}$.
- x = 1, y = 3. Check: 2 + 3 = 5; 1 + 9 = 10.
Matrices as transformations: a 2 × 2 matrix maps each vector $\vec{v}$ to $A\vec{v}$.
- The first column is where $\langle 1, 0\rangle$ goes; the second column is where $\langle 0, 1\rangle$ goes.
- The origin stays fixed; lines map to lines.
A applied to $\langle 1, 2\rangle$: $\begin{bmatrix} 2(1) + 1(2) \\ 1(1) + 3(2) \end{bmatrix} = \langle 4, 7\rangle$.
Standard transformation matrices
- Dilation by k: $\begin{bmatrix} k & 0 \\ 0 & k \end{bmatrix}$.
- Reflection over the x-axis: $\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}$; over the y-axis: $\begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix}$; over y = x: $\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$.
- Rotation counterclockwise by θ: $\begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}$. For 90°: $\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}$, sending (x, y) to (−y, x).
The determinant's meaning: |det A| is the factor by which areas are multiplied.
- det = 5: the unit square maps to a parallelogram of area 5.
- Negative determinant: orientation is reversed (a reflection is involved).
- det = 0: the plane is squashed onto a line (or a point); the transformation cannot be undone, so there is no inverse.
Composition: applying A then B is the matrix product BA (the first transformation is written on the right).
rotate 90° counterclockwise, then reflect over the x-axis.
- $\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} = \begin{bmatrix} 0 & -1 \\ -1 & 0 \end{bmatrix}$.
- (x, y) goes to (−y, −x): a reflection over the line y = −x.
Modeling change between states: a transition matrix moves a population from one state to the next.
each year 90% of city residents stay and 10% move to the suburbs; 80% of suburban residents stay and 20% move to the city. Start with 100 (thousand) in the city and 200 in the suburbs.
- $\begin{bmatrix} 0.9 & 0.2 \\ 0.1 & 0.8 \end{bmatrix}\begin{bmatrix} 100 \\ 200 \end{bmatrix} = \begin{bmatrix} 130 \\ 170 \end{bmatrix}$.
- The total (300) is unchanged. Repeating the multiplication gives later years; the populations approach a steady state (200 and 100).
Common mistakes
- Multiplying entry by entry.
- Assuming AB = BA.
- Composing transformations in the wrong order.
- Forgetting to divide by the determinant in the inverse.
- Trying to invert a matrix with determinant zero.
Check yourself
A 2 × 2 matrix has determinant 0. What does this tell you?
Show the answer
The matrix has no inverse, and the transformation collapses the plane onto a line or point
A zero area-scale factor means information is lost, so the transformation cannot be reversed.
6For top marks
- Check dimensions before multiplying; write products in the correct order.
- Compute the determinant first to decide whether an inverse exists.
- Identify transformations by finding where $\langle 1, 0 \rangle$ and $\langle 0, 1 \rangle$ go.
- Interpret $|\det A|$ as an area scale factor and its sign as orientation.
"Since $\det\begin{bmatrix} 2 & 4 \\ 1 & 2 \end{bmatrix} = 0$, the transformation squashes the plane onto a line and has no inverse."
Check yourself
A 2 × 2 matrix with determinant 0:
Show the answer
Has no inverse
Division by zero.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera