Linear Algebra › Section A · Linear equations in linear algebra › Topic A.9
The matrix of a linear transformation
Every linear transformation between coordinate spaces is secretly a matrix, and you can find that matrix just by watching where the standard unit vectors go. Once you have it, questions about the transformation become questions about pivots.
From a description to a matrix
Linear transformations are often described in words: rotate the plane by 30°, reflect it in a line, squash it onto an axis. To compute with such a transformation, or to combine it with others, you want a matrix. The previous topic, Introduction to linear transformations, showed that every matrix gives a linear transformation. This topic proves the converse for maps from \(\mathbb{R}^n\) to \(\mathbb{R}^m\) and gives a recipe for the matrix. It then uses the matrix to decide whether a transformation reaches every output and whether it ever sends two inputs to the same place.
The standard matrix
The columns of the \(n \times n\) identity matrix are the standard unit vectors \(\mathbf{e}_1, \dots, \mathbf{e}_n\); in \(\mathbb{R}^2\), \(\mathbf{e}_1 = (1, 0)\) and \(\mathbf{e}_2 = (0, 1)\). Any \(\mathbf{x}\) in \(\mathbb{R}^n\) equals \(x_1\mathbf{e}_1 + \dots + x_n\mathbf{e}_n\). If \(T\) is linear, superposition gives \(T(\mathbf{x}) = x_1T(\mathbf{e}_1) + \dots + x_nT(\mathbf{e}_n)\), which is \(A\mathbf{x}\) for
So every linear \(T: \mathbb{R}^n \to \mathbb{R}^m\) satisfies \(T(\mathbf{x}) = A\mathbf{x}\) for this unique \(m \times n\) matrix, called the standard matrix of \(T\). The images of the unit vectors determine \(T\) completely.
Worked example: the rotation matrix
Let \(T\) rotate each vector of \(\mathbb{R}^2\) anticlockwise about the origin through an angle \(\theta\). Rotations are linear, since rotating a parallelogram gives a parallelogram. 1. \(\mathbf{e}_1 = (1, 0)\) rotates to the point at angle \(\theta\) on the unit circle, \((\cos\theta, \sin\theta)\). 2. \(\mathbf{e}_2 = (0, 1)\) starts at angle 90°, so it rotates to
which equals \((-\sin\theta, \cos\theta)\). 3. These images are the columns:
4. Check with \(\theta = 90°\): the rows become \((0, -1)\) and \((1, 0)\), so \((x_1, x_2) \mapsto (-x_2, x_1)\), the quarter turn met in the previous topic.
Reflections
Each reflection of the plane is found by reflecting \(\mathbf{e}_1\) and \(\mathbf{e}_2\). Through the \(x_1\)-axis, \(\mathbf{e}_2\) flips to \(-\mathbf{e}_2\); through the \(x_2\)-axis, \(\mathbf{e}_1\) flips to \(-\mathbf{e}_1\):
Through the line \(x_2 = x_1\), the two unit vectors swap; through the line \(x_2 = -x_1\), they swap and change sign:
Reflection through the origin sends every vector to its negative, so its matrix is \(-I\), with rows \((-1, 0)\) and \((0, -1)\): the rotation matrix with \(\theta = 180°\).
Scalings, shears and projections
A matrix with rows \((k, 0)\) and \((0, 1)\) stretches horizontally by the factor \(k\) when \(k > 1\) and compresses when \(0 < k < 1\); the matrix \(rI\) scales every vector by \(r\), a contraction for \(0 \le r \le 1\) and a dilation for \(r > 1\). A horizontal shear has rows \((1, k)\) and \((0, 1)\): \(\mathbf{e}_1\) stays put while \(\mathbf{e}_2\) slides to \((k, 1)\). A vertical shear has rows \((1, 0)\) and \((k, 1)\). Projection onto the \(x_1\)-axis keeps \(\mathbf{e}_1\) and sends \(\mathbf{e}_2\) to \(\mathbf{0}\), giving rows \((1, 0)\) and \((0, 0)\). In each case, picture the unit square and follow its two edges along \(\mathbf{e}_1\) and \(\mathbf{e}_2\).
Worked example: one move after another
Find the standard matrix of the map that rotates the plane 90° anticlockwise and then reflects through the \(x_2\)-axis. 1. The rotation sends \(\mathbf{e}_1\) to \((0, 1)\), and the reflection leaves that unchanged. 2. The rotation sends \(\mathbf{e}_2\) to \((-1, 0)\), and the reflection turns it into \((1, 0)\). 3. So the standard matrix has columns \((0, 1)\) and \((1, 0)\): it is the reflection through the line \(x_2 = x_1\). 4. Check with \((2, 5)\): rotating gives \((-5, 2)\), reflecting gives \((5, 2)\), and swapping the entries of \((2, 5)\) gives \((5, 2)\) too. The topic Matrix operations shows that this combined matrix is a product of the two separate ones.
Onto and one-to-one
Two properties of \(T: \mathbb{R}^n \to \mathbb{R}^m\) mirror existence and uniqueness. \(T\) maps \(\mathbb{R}^n\) onto \(\mathbb{R}^m\) if every \(\mathbf{b}\) in \(\mathbb{R}^m\) is the image of at least one \(\mathbf{x}\), so the range is the whole codomain. \(T\) is one-to-one if every \(\mathbf{b}\) in \(\mathbb{R}^m\) is the image of at most one \(\mathbf{x}\), so different inputs always give different outputs. A projection onto an axis is neither: it misses every point off the axis, and it sends \((1, 0)\) and \((1, 5)\) to the same point. A rotation is both.
Tests through the standard matrix
Let \(T\) be linear with standard matrix \(A\). Then \(T\) is one-to-one exactly when \(T(\mathbf{x}) = \mathbf{0}\) has only the trivial solution, because if \(T(\mathbf{u}) = T(\mathbf{v})\) then \(T(\mathbf{u} - \mathbf{v}) = \mathbf{0}\). In terms of columns: \(T\) maps \(\mathbb{R}^n\) onto \(\mathbb{R}^m\) exactly when the columns of \(A\) span \(\mathbb{R}^m\), a pivot in every row; and \(T\) is one-to-one exactly when the columns of \(A\) are linearly independent, a pivot in every column. Counting pivots gives quick limits: a map from \(\mathbb{R}^3\) to \(\mathbb{R}^2\) can never be one-to-one, and a map from \(\mathbb{R}^2\) to \(\mathbb{R}^3\) can never be onto.
Worked example: onto but not one-to-one
Let \(T: \mathbb{R}^3 \to \mathbb{R}^2\) be
1. \(T(\mathbf{e}_1) = (1, 0)\), \(T(\mathbf{e}_2) = (2, 1)\) and \(T(\mathbf{e}_3) = (-1, 3)\), so \(A\) has rows \((1, 2, -1)\) and \((0, 1, 3)\). 2. \(A\) is already in echelon form, with pivots in columns 1 and 2. 3. There is a pivot in each of the 2 rows, so \(T\) is onto \(\mathbb{R}^2\). 4. Column 3 has no pivot, so \(T(\mathbf{x}) = \mathbf{0}\) has a free variable and \(T\) is not one-to-one. 5. Indeed, solving gives \(x_2 = -3x_3\) and \(x_1 = 7x_3\), so \(T(7, -3, 1) = (0, 0)\), since \(7 - 6 - 1 = 0\) and \(-3 + 3 = 0\).
Common mistakes to avoid
First, writing the images \(T(\mathbf{e}_j)\) as rows instead of columns of the standard matrix. Second, getting the direction of rotation wrong: positive angles turn anticlockwise. Third, mixing up the tests, since onto needs a pivot in every row and one-to-one needs a pivot in every column. Fourth, assuming a map from \(\mathbb{R}^n\) to \(\mathbb{R}^n\) is automatically onto or one-to-one; a projection is neither. Fifth, finding a standard matrix for a map that is not linear, such as a translation; none exists.
Key takeaways
Every linear T: Rⁿ → Rᵐ is x ↦ Ax for a unique standard matrix A = [T(e₁) … T(eₙ)]. Rotation by θ has columns (cos θ, sin θ) and (−sin θ, cos θ). Reflections, scalings, shears and projections follow from where e₁ and e₂ go. T is onto when every b is an image, and one-to-one when no two inputs share an image. T is one-to-one exactly when T(x) = 0 has only the trivial solution. Onto means a pivot in every row of A; one-to-one means a pivot in every column.
Flashcards
Flashcard
e₁, …, eₙ, the columns of the identity matrix
Test your understanding
Question 1 of 5
T(x₁, x₂) = (2x₁ − x₂, x₁ + 4x₂, −x₂). What is the standard matrix of T?
Question 2 of 5
What is the standard matrix of the reflection of R² through the line x₂ = x₁?
Question 3 of 5
T is a linear transformation from R³ to R². Which statement must be true?
Question 4 of 5
T is linear with T(e₁) = (1, 3) and T(e₂) = (−2, 5). What is T(4, −1)?
Question 5 of 5
A linear transformation T has standard matrix A. When is T one-to-one?
