# Linear transformations and matrices

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

This guide covers core properties of linear transformations, 2x2 matrix representation, composition of transformations via matrix multiplication, inverse transformations, and common geometric transformations aligned to AP Precalculus Unit 4 expectations.

**Prerequisites:** Basic matrix addition and multiplication; 2D vector arithmetic; Function composition and inverse properties; [AP Precalculus Unit 4 Overview](https://www.owlsprep.com/study/ap-precalculus-u4-overview/)

## Learning objectives

- Define linear transformations and verify linearity properties
- Construct 2x2 matrix representations of 2D linear transformations
- Calculate matrix products for composite linear transformations
- Find inverse 2x2 matrices for invertible linear transformations
- Identify and work with common geometric linear transformations

## Definition and Matrix Representation

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

**Linear Transformation** — A function mapping 2D input vectors to 2D output vectors that satisfies two core properties for all vectors $\vec{u}, \vec{v}$ and all scalars $c$: additivity $T(\vec{u} + \vec{v}) = T(\vec{u}) + T(\vec{v})$ and homogeneity $T(c\vec{v}) = cT(\vec{v})$

*Notation:* $T: \mathbb{R}^2 \to \mathbb{R}^2$

*Example:* Any transformation of the form $T(x,y) = (ax+by, cx+dy)$ is linear

By linearity, any input vector can be written as a combination of the standard basis vectors $\begin{bmatrix}1 \\ 0\end{bmatrix}$ and $\begin{bmatrix}0 \\ 1\end{bmatrix}$, so:

$$T\left(\begin{bmatrix}x \\ y\end{bmatrix}\right) = xT\left(\begin{bmatrix}1 \\ 0\end{bmatrix}\right) + yT\left(\begin{bmatrix}0 \\ 1\end{bmatrix}\right)$$

This means outputs of the transformation on the standard basis vectors become the **columns** of the transformation matrix. For $T(x,y) = (T_x(x,y), T_y(x,y))$, the matrix is:

$$A = \begin{bmatrix} T_x(1,0) & T_x(0,1) \\ T_y(1,0) & T_y(0,1) \end{bmatrix}$$

> **tip**
>
> If you need to confirm if a transformation is linear, test it on the zero vector first. If $T(\vec{0}) \neq \vec{0}$, it is automatically non-linear, no further testing needed.

**Worked example:** Find the matrix representation of the linear transformation $T(x,y) = (4x - 3y, 2x + y)$

1. Evaluate $T$ at the first standard basis vector $\begin{bmatrix}1 \\ 0\end{bmatrix}$:
2. $$T(1,0) = (4(1) - 3(0), 2(1) + 0) = (4, 2), which becomes the first column of the matrix$$
3. Evaluate $T$ at the second standard basis vector $\begin{bmatrix}0 \\ 1\end{bmatrix}$:
4. $$T(0,1) = (4(0) - 3(1), 2(0) + 1) = (-3, 1), which becomes the second column of the matrix$$
5. Assemble and verify the matrix:
6. $$A = \begin{bmatrix}4 & -3 \\ 2 & 1\end{bmatrix}, \quad A\begin{bmatrix}x \\ y\end{bmatrix} = \begin{bmatrix}4x - 3y \\ 2x + y\end{bmatrix}$$

> **Exam tip:** Always test the zero vector first to rule out non-linear transformations quickly.

## Composition and Matrix Multiplication

When applying two linear transformations in sequence (first $T_1$, then $T_2$), the combined transformation $T_2 \circ T_1 = T_2(T_1(\vec{v}))$ is also linear. If $T_1$ has matrix $A_1$ and $T_2$ has matrix $A_2$, the matrix for the combined transformation is the product $A_2 A_1$, from the associative property of matrix multiplication.

> **warning**
>
> Matrix multiplication is not commutative! The first transformation applied always goes on the **right** side of the product, and the second transformation on the left.

For two 2x2 matrices, the product $BA$ is calculated by taking the dot product of each row of $B$ with each column of $A$:

$$B = \begin{bmatrix}e & f \\ g & h\end{bmatrix}, A = \begin{bmatrix}a & b \\ c & d\end{bmatrix}, \quad BA = \begin{bmatrix}ea + fc & eb + fd \\ ga + hc & gb + hd\end{bmatrix}$$

**Worked example:** Let $T_1$ be reflection over the y-axis (matrix $A = \begin{bmatrix}-1 & 0 \\ 0 & 1\end{bmatrix}$) and $T_2$ be dilation by a factor of 3 (matrix $B = \begin{bmatrix}3 & 0 \\ 0 & 3\end{bmatrix}$). Find the matrix for the transformation that first reflects over the y-axis, then dilates by 3.

1. Confirm the order: first $T_1$, then $T_2$ = composition $T_2 \circ T_1$, so the product is $BA$, not $AB$.
2. Calculate entry-by-entry:
3. $$(3)(-1) + (0)(0) = -3, \quad (3)(0) + (0)(1) = 0 \\ (0)(-1) + (3)(0) = 0, \quad (0)(0) + (3)(1) = 3$$
4. The resulting product matrix is:
5. $$BA = \begin{bmatrix}-3 & 0 \\ 0 & 3\end{bmatrix}$$
6. Verification with input $\begin{bmatrix}2 \\ 4\end{bmatrix}$ confirms the result matches sequential transformation.

> **Exam tip:** Always write your order explicitly before multiplying to eliminate order errors.

## Inverse Transformations and Determinants

A linear transformation is invertible if it is one-to-one and onto, meaning every output vector maps back to exactly one input vector. For a 2x2 matrix $A = \begin{bmatrix}a & b \\ c & d\end{bmatrix}$, invertibility is determined by the determinant $\det(A) = ad - bc$. If $\det(A) \neq 0$, $A$ is invertible; if $\det(A) = 0$, the transformation cannot be reversed.

The inverse matrix $A^{-1}$ represents the inverse transformation that undoes $T$, satisfying $AA^{-1} = A^{-1}A = I$, where $I = \begin{bmatrix}1 & 0 \\ 0 & 1\end{bmatrix}$ is the identity matrix. The formula for the inverse of a 2x2 matrix is:

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

**Worked example:** Find the inverse of the transformation matrix $A = \begin{bmatrix}2 & 1 \\ 3 & 4\end{bmatrix}$, then verify that $AA^{-1} = I$.

1. Calculate the determinant first:
2. $$\det(A) = (2)(4) - (1)(3) = 8 - 3 = 5 \neq 0, \text{ so inverse exists}$$
3. Apply the inverse formula: swap diagonal entries, flip off-diagonal signs, divide by determinant:
4. $$A^{-1} = \frac{1}{5}\begin{bmatrix}4 & -1 \\ -3 & 2\end{bmatrix} = \begin{bmatrix}\frac{4}{5} & -\frac{1}{5} \\ -\frac{3}{5} & \frac{2}{5}\end{bmatrix}$$
5. Verify the product to confirm:
6. $$\begin{bmatrix}2 & 1 \\ 3 & 4\end{bmatrix}\begin{bmatrix}\frac{4}{5} & -\frac{1}{5} \\ -\frac{3}{5} & \frac{2}{5}\end{bmatrix} = \begin{bmatrix}1 & 0 \\ 0 & 1\end{bmatrix} = I$$

> **Exam tip:** Memorize standard geometric transformation matrices (rotation, reflection, dilation) to save time when solving these problems.

## AP-Style Concept Check

**Check your understanding**

Test your understanding of core concepts:

1. Which of the following transformations is a linear transformation?

   - A) $T(x,y) = (3x, y^2)$
   - B) $T(x,y) = (2x + 5y, x - 4y)$
   - C) $T(x,y) = (x + 2, y - 3)$
   - D) $T(x,y) = (xy, 3x)$

   *Why:* Eliminate C first: $T(0,0) = (2,-3) \neq (0,0)$, so it is non-linear. A fails homogeneity, D fails additivity. Only B satisfies both linearity properties.

## Common pitfalls

- **Wrong:** Swapping the order of matrix multiplication for composition, writing $A_1 A_2$ for a transformation that applies $T_1$ first then $T_2$.
  - Why it fails: Students confuse function notation: $f \circ g = f(g(x))$, so the first function applied is the inner function, which ends up on the right in matrix form.
  - Correct: Always label the order explicitly: 'First $T_1$, then $T_2$ = $T_2(T_1(\vec{v})) = A_2 A_1 \vec{v}$, so matrix product is $A_2 A_1$.'
- **Wrong:** Forgetting to divide the inverse matrix by the determinant when calculating $A^{-1}$.
  - Why it fails: Students remember to swap $a$ and $d$ and flip signs of $b$ and $c$, but omit the scaling factor of $1/\det(A)$.
  - Correct: After swapping and changing signs, always write the $1/(ad-bc)$ factor outside the matrix before simplifying entries.
- **Wrong:** Calling translation a linear transformation.
  - Why it fails: Translations are affine transformations, which look linear, but they do not satisfy the linearity properties.
  - Correct: Always check $T(\vec{0})$: if $T(\vec{0}) \neq \vec{0}$, mark the transformation as non-linear immediately.
- **Wrong:** Placing the outputs of the standard basis vectors as rows instead of columns in the transformation matrix.
  - Why it fails: Students mix up the standard convention for matrix representation.
  - Correct: Always remember: output of $(1,0)$ is the first column, output of $(0,1)$ is the second column. Test with a general vector to confirm if unsure.
- **Wrong:** Using the wrong sign for $\sin\theta$ in the rotation matrix.
  - Why it fails: Students mix up the direction of rotation.
  - Correct: The standard matrix is defined for counterclockwise $\theta$; for clockwise rotation, substitute $-\theta$, which flips the sign of the two $\sin$ entries.

## Cheatsheet

| Category | Formula | Notes |
| --- | --- | --- |
| Linear Transformation Properties | $T(\vec{u}+\vec{v})=T(\vec{u})+T(\vec{v}),\ T(c\vec{v})=cT(\vec{v})$ | $T(\vec{0})=\vec{0}$ is required for linearity |
| Transformation Matrix Construction | Column 1 = $T\begin{bmatrix}1\\0\end{bmatrix}$, Column 2 = $T\begin{bmatrix}0\\1\end{bmatrix}$ | Outputs of basis vectors are columns, not rows |
| 2x2 Matrix Multiplication | $\begin{bmatrix}e&f\\g&h\end{bmatrix}\begin{bmatrix}a&b\\c&d\end{bmatrix} = \begin{bmatrix}ea+fc&eb+fd\ga+hc&gb+hd\end{bmatrix}$ | Dot product of rows of first matrix with columns of second |
| Composition Order | First $T_1$, then $T_2$: Matrix = $A_2A_1$ | First transformation matrix goes on the right |
| Dilation by factor $k$ | $\begin{bmatrix}k&0\\0&k\end{bmatrix}$ | Scaling about the origin |
| Rotation counterclockwise by $\theta$ | $\begin{bmatrix}\cos\theta & -\sin\theta \\ \sin\theta & \cos\theta\end{bmatrix}$ | For clockwise rotation, substitute $-\theta$ |
| 2x2 Determinant | $\det\begin{bmatrix}a&b\\c&d\end{bmatrix} = ad-bc$ | $\det = 0$ means matrix is not invertible |
| 2x2 Inverse Matrix | $A^{-1} = \frac{1}{ad-bc}\begin{bmatrix}d & -b \\ -c & a\end{bmatrix}$ | Only for 2x2 matrices with non-zero determinant |

## What's next

This topic is the foundation for the remaining content of AP Precalculus Unit 4, including using matrices to solve systems of linear equations and model multi-variable contextual relationships. Next, you will apply linear transformation and matrix conventions to solve linear systems and model real-world processes with multiple input variables. Without mastering the order rules, matrix construction, and inverse formulas covered here, you will constantly make avoidable sign and order errors when working with matrix systems. This topic also provides foundational knowledge for college-level linear algebra, computer graphics, and data science, where linear transformations are core analytical tools.

- [Matrices as functions](https://www.owlsprep.com/study/ap-precalculus-u4-matrices-as-functions/)
- [Matrices Modeling Contexts](https://www.owlsprep.com/study/ap-precalculus-u4-matrices-modeling-contexts/)

---

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-linear-transformations-and-matrices/
