← MATH 231 MathScape 0 MATH231

Linear Transformations and Their Matrices

9 min read

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

Jump to a section
Reference: Lay, Linear Algebra and Its Applications, Section 1.8: Introduction to Linear Transformations; Section 1.9: The Matrix of a Linear Transformation

Video: Dr Lynch’s MATH 231 lectures (YouTube playlists)

Before You Start: Prerequisite Check

Can you do these? (Click to reveal self-test)

Test yourself on these prerequisite skills:

  1. 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$.

  2. 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}$.

  3. 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

This skillLinear Transformations and Their Matrices

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$:

  1. Additivity: $T(\mathbf{u} + \mathbf{v}) = T(\mathbf{u}) + T(\mathbf{v})$
  2. 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}$.

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}$.

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

Level 1 Evaluate and Verify

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.

Thought Process

For (a): substitute $\mathbf{e}_1$ and $\mathbf{e}_2$ into the formula. For (b): place $T(\mathbf{e}_1)$ and $T(\mathbf{e}_2)$ as columns. For (c): compute $A\mathbf{x}$ and also plug $x_1=4, x_2=-2$ into the formula.

Show Answer

(a) \[ T(\mathbf{e}_1) = T\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}1\\3\\2\end{pmatrix}, \quad T(\mathbf{e}_2) = T\begin{pmatrix}0\\1\end{pmatrix} = \begin{pmatrix}-1\\0\\1\end{pmatrix} \]

(b) $A = \begin{pmatrix}1&-1\\3&0\\2&1\end{pmatrix}$

(c) Via matrix: $A\begin{pmatrix}4\\-2\end{pmatrix} = 4\begin{pmatrix}1\\3\\2\end{pmatrix} + (-2)\begin{pmatrix}-1\\0\\1\end{pmatrix} = \begin{pmatrix}4+2\\12\\8-2\end{pmatrix} = \begin{pmatrix}6\\12\\6\end{pmatrix}$.

Via formula: $T\begin{pmatrix}4\\-2\end{pmatrix} = \begin{pmatrix}4-(-2)\\3(4)\\-2+2(4)\end{pmatrix} = \begin{pmatrix}6\\12\\6\end{pmatrix}$. Agree.

Level 2 Build the Standard Matrix from Images

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}$.

Thought Process

The standard matrix has the images of the basis vectors as columns. For part (c), use linearity: $T(3\mathbf{e}_1 - 2\mathbf{e}_2) = 3T(\mathbf{e}_1) - 2T(\mathbf{e}_2)$.

Show Answer

(a) $A = \begin{pmatrix}2&0\\-1&4\\3&-2\end{pmatrix}$

(b) $A\begin{pmatrix}3\\-2\end{pmatrix} = 3\begin{pmatrix}2\\-1\\3\end{pmatrix} + (-2)\begin{pmatrix}0\\4\\-2\end{pmatrix} = \begin{pmatrix}6\\-3\\9\end{pmatrix} + \begin{pmatrix}0\\-8\\4\end{pmatrix} = \begin{pmatrix}6\\-11\\13\end{pmatrix}$

(c) $3\begin{pmatrix}2\\-1\\3\end{pmatrix} + (-2)\begin{pmatrix}0\\4\\-2\end{pmatrix} = \begin{pmatrix}6\\-11\\13\end{pmatrix}$. Matches (b).

This is the linearity property in action: $T(3\mathbf{e}_1 - 2\mathbf{e}_2) = 3T(\mathbf{e}_1) - 2T(\mathbf{e}_2)$.

Level 3 Determine Onto and One-to-One

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.

Thought Process

Onto: every row of $A$ must contain a pivot. Count pivot rows vs. total rows.

One-to-one: every column of $A$ must contain a pivot. Count pivot columns vs. total columns.

Show Answer

(a) Row-reduce $A$:

$R_2 \to R_2 + R_1$: \[ \begin{pmatrix}1&3\\0&4\\2&5\end{pmatrix} \]

$R_3 \to R_3 - 2R_1$: \[ \begin{pmatrix}1&3\\0&4\\0&-1\end{pmatrix} \]

$R_2 \to \frac{1}{4}R_2$, then $R_3 \to R_3 + R_2$: \[ \begin{pmatrix}1&3\\0&1\\0&0\end{pmatrix} \]

Pivots in rows 1 and 2; row 3 has no pivot. Pivot columns: 1 and 2 (both columns have pivots).

(b)

  • Onto? No. $A$ has 3 rows but only 2 pivots. Row 3 has no pivot, so not every $\mathbf{b} \in \mathbb{R}^3$ is reachable.

  • One-to-one? Yes. Both columns 1 and 2 have pivots, so the columns are linearly independent: $\text{Nul}(A) = \{\mathbf{0}\}$. The equation $A\mathbf{x} = \mathbf{b}$ has at most one solution.

Level 4 Derive a Geometric Transformation Matrix

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$.

Thought Process

Reflecting across the line $x_2 = x_1$ swaps the two coordinates. So $(x_1, x_2)$ maps to $(x_2, x_1)$.

Apply this to $\mathbf{e}_1$ and $\mathbf{e}_2$ to get the columns of $A$.

Show Answer

(a) Reflecting across $x_2 = x_1$ swaps coordinates: \[ T\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}0\\1\end{pmatrix}, \quad T\begin{pmatrix}0\\1\end{pmatrix} = \begin{pmatrix}1\\0\end{pmatrix} \]

(b) Standard matrix: $A = \begin{pmatrix}0&1\\1&0\end{pmatrix}$

(c) $A\begin{pmatrix}3\\1\end{pmatrix} = 3\begin{pmatrix}0\\1\end{pmatrix} + 1\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}1\\3\end{pmatrix}$.

Indeed, the reflection of $\begin{pmatrix}3\\1\end{pmatrix}$ across $x_2 = x_1$ is $\begin{pmatrix}1\\3\end{pmatrix}$ (coordinates swapped).

Level 5 Test Linearity and Find the Standard Matrix

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}$

Thought Process

Quick screen: if $T(\mathbf{0}) \neq \mathbf{0}$, the transformation cannot be linear.

For (a): compute $T(\mathbf{0}) = T\begin{pmatrix}0\\0\end{pmatrix}$. For (b): check whether $T(c\mathbf{u}) = cT(\mathbf{u})$ for $c = -1$, $\mathbf{u} = \mathbf{e}_1$. For (c): check the formula structure; if every output entry is a constant-coefficient combination of the inputs with no added constant, it is likely linear.

Show Answer

(a) Not linear. $T\begin{pmatrix}0\\0\end{pmatrix} = \begin{pmatrix}0+1\\0\end{pmatrix} = \begin{pmatrix}1\\0\end{pmatrix} \neq \mathbf{0}$. Any linear transformation must send $\mathbf{0}$ to $\mathbf{0}$.

(b) Not linear. Check homogeneity: $T(-\mathbf{e}_1) = T\begin{pmatrix}-1\\0\end{pmatrix} = \begin{pmatrix}1\\0\end{pmatrix}$, but $-T(\mathbf{e}_1) = -\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}-1\\0\end{pmatrix}$. These are not equal: $T(-\mathbf{e}_1) \neq -T(\mathbf{e}_1)$.

(c) Linear. Every output is a linear combination of $x_1$ and $x_2$ with no added constants. \[ T(\mathbf{e}_1) = \begin{pmatrix}5\\3\\0\end{pmatrix}, \quad T(\mathbf{e}_2) = \begin{pmatrix}-2\\1\\-1\end{pmatrix} \] Standard matrix: $A = \begin{pmatrix}5&-2\\3&1\\0&-1\end{pmatrix}$


Common Misconceptions

Common misconception

“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}$.

Common misconception

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.

Common misconception

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:

Real-world connections:

Source: Lay, Linear Algebra and Its Applications, Section 1.8: Introduction to Linear Transformations; Section 1.9: The Matrix of a Linear Transformation.



Last updated: 2026-06-16

Watch and Read