Linear Transformations and Their Matrices
Before The rule x goes to Ax is the matrix equation read as a way to move vectors. Builds on: The Matrix Equation Ax = b
Next Eigenvectors are the directions this rule only stretches, so this lesson leads to eigenvalues. Leads to: Eigenvalues and Eigenvectors
Before You Start: Prerequisite Check
Can you do these? (Click to reveal self-test)
Test yourself on these prerequisite skills:
Matrix-vector product: If $A = \begin{pmatrix}3&-1\\0&2\end{pmatrix}$ and $\mathbf{x} = \begin{pmatrix}1\\0\end{pmatrix}$, compute $A\mathbf{x}$.
Check
$A\begin{pmatrix}1\\0\end{pmatrix} = 1\begin{pmatrix}3\\0\end{pmatrix} + 0\begin{pmatrix}-1\\2\end{pmatrix} = \begin{pmatrix}3\\0\end{pmatrix}$. This is the first column of $A$.
Standard basis: Write out the standard basis vectors $\mathbf{e}_1$ and $\mathbf{e}_2$ of $\mathbb{R}^2$.
Check
$\mathbf{e}_1 = \begin{pmatrix}1\\0\end{pmatrix}$ and $\mathbf{e}_2 = \begin{pmatrix}0\\1\end{pmatrix}$.
Span: If $T(\mathbf{e}_1) = \begin{pmatrix}1\\2\end{pmatrix}$ and $T(\mathbf{e}_2) = \begin{pmatrix}3\\4\end{pmatrix}$, what vector does $A = [T(\mathbf{e}_1) \; T(\mathbf{e}_2)]$ give when you compute $A\begin{pmatrix}x_1\\x_2\end{pmatrix}$?
Check
$A\begin{pmatrix}x_1\\x_2\end{pmatrix} = x_1\begin{pmatrix}1\\2\end{pmatrix} + x_2\begin{pmatrix}3\\4\end{pmatrix} = \begin{pmatrix}x_1+3x_2\\2x_1+4x_2\end{pmatrix}$.
If you struggled: Review The Matrix Equation Ax = b.
Try This First
Let $T: \mathbb{R}^2 \to \mathbb{R}^2$ be defined by $T\begin{pmatrix}x_1\\x_2\end{pmatrix} = \begin{pmatrix}2x_1 + x_2 \\ x_1 - 3x_2\end{pmatrix}$.
Step 1. Compute $T(\mathbf{e}_1)$ and $T(\mathbf{e}_2)$.
Step 2. Form the matrix $A = [T(\mathbf{e}_1) \; T(\mathbf{e}_2)]$.
Step 3. Compute $A\begin{pmatrix}3\\-1\end{pmatrix}$ using the matrix, and also compute $T\begin{pmatrix}3\\-1\end{pmatrix}$ directly from the formula. Do both methods give the same result?
Show Solution
Step 1. \[ T(\mathbf{e}_1) = T\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}2(1)+0\\1-0\end{pmatrix} = \begin{pmatrix}2\\1\end{pmatrix} \] \[ T(\mathbf{e}_2) = T\begin{pmatrix}0\\1\end{pmatrix} = \begin{pmatrix}0+1\\0-3\end{pmatrix} = \begin{pmatrix}1\\-3\end{pmatrix} \]
Step 2. $A = \begin{pmatrix}2&1\\1&-3\end{pmatrix}$
Step 3. Via matrix: $A\begin{pmatrix}3\\-1\end{pmatrix} = \begin{pmatrix}6-1\\3+3\end{pmatrix} = \begin{pmatrix}5\\6\end{pmatrix}$.
Via formula: $T\begin{pmatrix}3\\-1\end{pmatrix} = \begin{pmatrix}2(3)+(-1)\\3-3(-1)\end{pmatrix} = \begin{pmatrix}5\\6\end{pmatrix}$.
They agree. The main point: once you know $T(\mathbf{e}_1)$ and $T(\mathbf{e}_2)$, you can compute $T$ at any vector by multiplying $A\mathbf{x}$. The transformation is completely encoded in its matrix.
The Fundamental Idea
A transformation $T: \mathbb{R}^n \to \mathbb{R}^m$ assigns to each input vector $\mathbf{x} \in \mathbb{R}^n$ an output vector $T(\mathbf{x}) \in \mathbb{R}^m$. This is a machine: input a vector, receive a vector.
The special class of linear transformations respects addition and scalar multiplication. This extra structure means the entire transformation is determined by a finite amount of data: what it does to the $n$ standard basis vectors of $\mathbb{R}^n$. Those $n$ images become the columns of the standard matrix of $T$.
Matrix multiplication $\mathbf{x} \mapsto A\mathbf{x}$ is the general form of every linear transformation from $\mathbb{R}^n$ to $\mathbb{R}^m$.
Prerequisite Map
Quick Reference
| Property | Value |
|---|---|
| Course | MATH 231 |
| Difficulty | Intermediate |
| Time | ~30 minutes |
| Source | Lay, Linear Algebra and Its Applications, Sections 1.8 and 1.9 |
Linearity Conditions
A transformation $T: \mathbb{R}^n \to \mathbb{R}^m$ is linear iff both hold:
| Condition | Formula |
|---|---|
| Preserves addition | $T(\mathbf{u} + \mathbf{v}) = T(\mathbf{u}) + T(\mathbf{v})$ |
| Preserves scalar mult. | $T(c\mathbf{u}) = c\, T(\mathbf{u})$ |
Standard Matrix
If $T: \mathbb{R}^n \to \mathbb{R}^m$ is linear, its standard matrix is: \[ A = [T(\mathbf{e}_1) \; T(\mathbf{e}_2) \; \cdots \; T(\mathbf{e}_n)] \] and $T(\mathbf{x}) = A\mathbf{x}$ for all $\mathbf{x}$.
Key Concepts
Definition of Linear Transformation
A transformation $T: \mathbb{R}^n \to \mathbb{R}^m$ is linear if it satisfies two properties for all $\mathbf{u}, \mathbf{v} \in \mathbb{R}^n$ and all scalars $c$:
- Additivity: $T(\mathbf{u} + \mathbf{v}) = T(\mathbf{u}) + T(\mathbf{v})$
- Homogeneity: $T(c\mathbf{u}) = c\,T(\mathbf{u})$
Equivalently, $T$ preserves all linear combinations: $T(c_1\mathbf{u} + c_2\mathbf{v}) = c_1 T(\mathbf{u}) + c_2 T(\mathbf{v})$.
Immediate consequence: Any linear transformation must send the zero vector to the zero vector, because $T(\mathbf{0}) = T(0 \cdot \mathbf{u}) = 0 \cdot T(\mathbf{u}) = \mathbf{0}$. If $T(\mathbf{0}) \neq \mathbf{0}$, the transformation is not linear.
Source: Lay, Linear Algebra and Its Applications, Section 1.8: Introduction to Linear Transformations.
The Standard Matrix
Theorem: Every linear transformation $T: \mathbb{R}^n \to \mathbb{R}^m$ has the form $T(\mathbf{x}) = A\mathbf{x}$ for a unique $m \times n$ matrix $A$.
Construction: $A$ is assembled by evaluating $T$ at each standard basis vector: \[ A = [T(\mathbf{e}_1) \; T(\mathbf{e}_2) \; \cdots \; T(\mathbf{e}_n)] \]
Each column $T(\mathbf{e}_j)$ is a vector in $\mathbb{R}^m$, so $A$ has $n$ columns and $m$ rows.
Why this works: Any $\mathbf{x} = x_1\mathbf{e}_1 + \cdots + x_n\mathbf{e}_n$, and by linearity: \[ T(\mathbf{x}) = x_1 T(\mathbf{e}_1) + \cdots + x_n T(\mathbf{e}_n) = A\mathbf{x} \]
So knowing $T$ on the $n$ standard basis vectors determines $T$ everywhere.
Source: Lay, Linear Algebra and Its Applications, Section 1.9: The Matrix of a Linear Transformation.
Geometric Transformations in $\mathbb{R}^2$
Each common geometric transformation corresponds to a specific standard matrix:
| Transformation | Standard Matrix |
|---|---|
| Rotation by $\theta$ counterclockwise | $\begin{pmatrix}\cos\theta & -\sin\theta \\ \sin\theta & \cos\theta\end{pmatrix}$ |
| Reflection across $x_1$-axis | $\begin{pmatrix}1 & 0 \\ 0 & -1\end{pmatrix}$ |
| Reflection across $x_2$-axis | $\begin{pmatrix}-1 & 0 \\ 0 & 1\end{pmatrix}$ |
| Horizontal shear by factor $k$ | $\begin{pmatrix}1 & k \\ 0 & 1\end{pmatrix}$ |
| Projection onto $x_1$-axis | $\begin{pmatrix}1 & 0 \\ 0 & 0\end{pmatrix}$ |
Deriving these: Apply the rule “column $j$ equals $T(\mathbf{e}_j)$” to each case.
Example: Rotation by $90°$ counterclockwise: $\mathbf{e}_1 = \begin{pmatrix}1\\0\end{pmatrix}$ maps to $\begin{pmatrix}0\\1\end{pmatrix}$ and $\mathbf{e}_2 = \begin{pmatrix}0\\1\end{pmatrix}$ maps to $\begin{pmatrix}-1\\0\end{pmatrix}$. So the matrix is $\begin{pmatrix}0&-1\\1&0\end{pmatrix}$.
Onto and One-to-One
Two properties describe the coverage and uniqueness of a linear transformation $T: \mathbb{R}^n \to \mathbb{R}^m$ with standard matrix $A$.
Onto (surjective): Every $\mathbf{b} \in \mathbb{R}^m$ is the image of at least one $\mathbf{x}$. Equivalently, the equation $T(\mathbf{x}) = \mathbf{b}$ has a solution for every $\mathbf{b}$.
- Matrix condition: $A$ has a pivot in every row.
One-to-one (injective): Every $\mathbf{b}$ is the image of at most one $\mathbf{x}$. Equivalently, $T(\mathbf{x}) = \mathbf{b}$ has at most one solution for every $\mathbf{b}$.
- Matrix condition: $A$ has a pivot in every column (the columns are linearly independent; $\text{Nul}(A) = \{\mathbf{0}\}$).
| Property | Matrix Condition | Geometric Meaning |
|---|---|---|
| Onto | Pivot in every row | Every target is reachable |
| One-to-one | Pivot in every column | Each target has a unique preimage (or none) |
Common Pitfalls
| Mistake | Why It Is Wrong | Correct Approach |
|---|---|---|
| Thinking “linear” means the graph is a straight line | A linear transformation sends zero to zero and preserves linear combinations; a translation $T(\mathbf{x}) = \mathbf{x} + \mathbf{c}$ is not linear (if $\mathbf{c} \neq \mathbf{0}$) even though it looks straight | Check the two linearity conditions; equivalently check $T(\mathbf{0}) = \mathbf{0}$ as a quick screen |
| Building the standard matrix from $T$ evaluated at arbitrary vectors | The standard matrix uses $T(\mathbf{e}_1), \ldots, T(\mathbf{e}_n)$ specifically | Evaluate $T$ at each standard basis vector and place the results as columns |
| Assuming onto implies one-to-one (or vice versa) | These are independent properties; a transformation can have either, both, or neither | Check pivot rows for onto; check pivot columns for one-to-one |
| Confusing $T: \mathbb{R}^n \to \mathbb{R}^m$ being one-to-one with $T$ being onto | $T: \mathbb{R}^2 \to \mathbb{R}^3$ can be one-to-one without being onto (3 dimensions to cover with only 2) | The sizes of domain and codomain constrain what is possible |
Why Translation Is Not a Linear Transformation
Let $T\begin{pmatrix}x_1\\x_2\end{pmatrix} = \begin{pmatrix}x_1 + 3\\x_2\end{pmatrix}$ (shift right by 3).
Check additivity: $T(\mathbf{u}+\mathbf{v}) = \begin{pmatrix}u_1+v_1+3\\u_2+v_2\end{pmatrix}$, but $T(\mathbf{u})+T(\mathbf{v}) = \begin{pmatrix}u_1+3\\u_2\end{pmatrix}+\begin{pmatrix}v_1+3\\v_2\end{pmatrix} = \begin{pmatrix}u_1+v_1+6\\u_2+v_2\end{pmatrix}$.
These are not equal ($+3$ vs. $+6$). Additivity fails. Translation is not linear.
Alternatively: $T(\mathbf{0}) = \begin{pmatrix}3\\0\end{pmatrix} \neq \mathbf{0}$. A linear transformation must send $\mathbf{0}$ to $\mathbf{0}$.
Practice Problems
Let $T: \mathbb{R}^2 \to \mathbb{R}^3$ be defined by $T\begin{pmatrix}x_1\\x_2\end{pmatrix} = \begin{pmatrix}x_1 - x_2 \\ 3x_1 \\ x_2 + 2x_1\end{pmatrix}$.
(a) Compute $T\begin{pmatrix}1\\0\end{pmatrix}$ and $T\begin{pmatrix}0\\1\end{pmatrix}$.
(b) Form the standard matrix $A$.
(c) Compute $T\begin{pmatrix}4\\-2\end{pmatrix}$ using $A$ and verify using the formula.
A linear transformation $T: \mathbb{R}^2 \to \mathbb{R}^3$ satisfies:
\[ T\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}2\\-1\\3\end{pmatrix} \quad \text{and} \quad T\begin{pmatrix}0\\1\end{pmatrix} = \begin{pmatrix}0\\4\\-2\end{pmatrix} \]
(a) Write the standard matrix $A$ of $T$.
(b) Compute $T\begin{pmatrix}3\\-2\end{pmatrix}$.
(c) Verify that $T\begin{pmatrix}3\\-2\end{pmatrix} = 3\,T\begin{pmatrix}1\\0\end{pmatrix} + (-2)\,T\begin{pmatrix}0\\1\end{pmatrix}$.
Let $T: \mathbb{R}^2 \to \mathbb{R}^3$ have standard matrix $A = \begin{pmatrix}1&3\\-1&1\\2&5\end{pmatrix}$.
(a) Row-reduce $A$.
(b) Is $T$ onto? Is $T$ one-to-one? Justify each answer using pivot positions.
Let $T: \mathbb{R}^2 \to \mathbb{R}^2$ reflect each vector across the line $x_2 = x_1$ (the diagonal).
(a) Where does $T$ send $\mathbf{e}_1 = \begin{pmatrix}1\\0\end{pmatrix}$? Where does it send $\mathbf{e}_2 = \begin{pmatrix}0\\1\end{pmatrix}$? (Draw a diagram to guide your thinking.)
(b) Write the standard matrix of $T$.
(c) Verify that the standard matrix correctly maps $\begin{pmatrix}3\\1\end{pmatrix}$ to its reflection across $x_2 = x_1$.
For each transformation below, determine whether it is linear. For those that are, write the standard matrix. For those that are not, give a specific counterexample to one of the linearity conditions.
(a) $T\begin{pmatrix}x_1\\x_2\end{pmatrix} = \begin{pmatrix}x_1 + 1 \\ 2x_2\end{pmatrix}$
(b) $T\begin{pmatrix}x_1\\x_2\end{pmatrix} = \begin{pmatrix}|x_1| \\ x_2\end{pmatrix}$
(c) $T\begin{pmatrix}x_1\\x_2\end{pmatrix} = \begin{pmatrix}5x_1 - 2x_2 \\ 3x_1 + x_2 \\ -x_2\end{pmatrix}$
Common Misconceptions
“linear transformation” means the graph is a straight line. A linear transformation from $\mathbb{R}^n$ to $\mathbb{R}^m$ sends zero to zero and respects all linear combinations. A translation $\mathbf{x} \mapsto \mathbf{x} + \mathbf{c}$ (with $\mathbf{c} \neq \mathbf{0}$) has a “straight line” graph but is not linear: it fails $T(\mathbf{0}) = \mathbf{0}$.
the standard matrix can be found without knowing the images of the basis vectors. The standard matrix is uniquely determined by the images $T(\mathbf{e}_1), \ldots, T(\mathbf{e}_n)$. Without this information, the matrix cannot be found. The formula or description of $T$ must be evaluated specifically at the standard basis vectors.
if a transformation is onto, it must be one-to-one, and vice versa. These are independent properties. A transformation $T: \mathbb{R}^2 \to \mathbb{R}^3$ can be one-to-one but not onto (2 independent columns in $\mathbb{R}^3$ cannot cover $\mathbb{R}^3$). Conversely, $T: \mathbb{R}^3 \to \mathbb{R}^2$ can be onto but not one-to-one (more columns than rows forces a free variable). For $T: \mathbb{R}^n \to \mathbb{R}^n$ (square matrix), the two properties coincide: a square matrix is one-to-one iff it is onto.
Mastery Checklist
Novice (Level 1-2):
Competent (Level 3-4):
Proficient (Level 5):
Mental Model
The Transformation Machine
A linear transformation is a machine that turns input vectors into output vectors. Linearity is the rule that the machine respects “blending”: if you blend two inputs and then run the blend through the machine, you get the same result as running each input through separately and then blending the outputs.
The standard matrix is the machine’s complete description: it stores what happens to the $n$ “simplest” inputs (the basis vectors). From those $n$ outputs, linearity forces the result at every other input. The machine is fully characterized by a finite table of data.
Onto and one-to-one describe the machine’s coverage: onto means every possible output is reachable; one-to-one means every reachable output comes from exactly one input.
Connections
Looking ahead in MATH 231:
- Matrix Operations and Invertibility: composing two linear transformations corresponds to multiplying their matrices
- The Invertible Matrix Theorem: a linear transformation $T: \mathbb{R}^n \to \mathbb{R}^n$ is both onto and one-to-one exactly when its standard matrix is invertible
Real-world connections:
- Computer graphics pipelines use linear transformations (rotation, scaling, shear) to manipulate objects; the standard matrix is the practical tool.
- In machine learning, the fully connected layers of a neural network are linear transformations followed by nonlinear activations; understanding the matrix is fundamental to training the network.
Source: Lay, Linear Algebra and Its Applications, Section 1.8: Introduction to Linear Transformations; Section 1.9: The Matrix of a Linear Transformation.
| Previous | Up | Next |
|---|---|---|
| Linear Independence | MATH231 Skills Index | Matrix Operations and Invertibility |
Last updated: 2026-06-16
Watch and Read
- Lynch, MATH 231 lecture playlists (YouTube)Recorded MATH 231 lectures at EWU. Use them to see each topic worked through in a full class session.