About

1.9 The Matrix of a Linear Transformation

Theory: The Matrix of a Linear Transformation

The Matrix of a Linear Transformation (Lay §1.9)

The columns of the identity matrix are the standard basis vectors:

I2=[1001]=[e1 e2],I3=[100010001]=[e1 e2 e3]I_2 = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = [\mathbf{e}_1 \ \mathbf{e}_2], \qquad I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} = [\mathbf{e}_1 \ \mathbf{e}_2 \ \mathbf{e}_3]

Every x=(x1,…,xn)\mathbf{x} = (x_1, \dots, x_n) can be written x=x1e1+⋯+xnen\mathbf{x} = x_1\mathbf{e}_1 + \cdots + x_n\mathbf{e}_n, so by linearity T(x)=x1T(e1)+⋯+xnT(en)T(\mathbf{x}) = x_1T(\mathbf{e}_1) + \cdots + x_nT(\mathbf{e}_n). That is exactly a matrix–vector product:

Theorem 10 (Lay §1.9): Let T:Rn→RmT: \mathbb{R}^n \to \mathbb{R}^m be linear. Then there is a unique m×nm \times n matrix AA such that T(x)=AxT(\mathbf{x}) = A\mathbf{x} for all x\mathbf{x} in Rn\mathbb{R}^n. In fact, A=[T(e1)T(e2)⋯T(en)]A = \begin{bmatrix} T(\mathbf{e}_1) & T(\mathbf{e}_2) & \cdots & T(\mathbf{e}_n) \end{bmatrix} AA is called the standard matrix for TT.

Recipe: “find the standard matrix” = find where each ej\mathbf{e}_j goes, and write those images as the columns, in order.

Geometric transformations of R2\mathbb{R}^2 (brief)

Use the recipe: just track where e1=(1,0)\mathbf{e}_1 = (1,0) and e2=(0,1)\mathbf{e}_2 = (0,1) land.

TransformationT(e1)T(\mathbf{e}_1)T(e2)T(\mathbf{e}_2)Standard matrix
Rotation by φ\varphi (counterclockwise)(cos⁡φ,sin⁡φ)(\cos\varphi, \sin\varphi)(−sin⁡φ,cos⁡φ)(-\sin\varphi, \cos\varphi)[cos⁡φ−sin⁡φsin⁡φcos⁡φ]\begin{bmatrix} \cos\varphi & -\sin\varphi \\ \sin\varphi & \cos\varphi \end{bmatrix}
Horizontal shear, e2↦e2+ke1\mathbf{e}_2 \mapsto \mathbf{e}_2 + k\mathbf{e}_1(1,0)(1, 0)(k,1)(k, 1)[1k01]\begin{bmatrix} 1 & k \\ 0 & 1 \end{bmatrix}
Vertical shear, e1↦e1+ke2\mathbf{e}_1 \mapsto \mathbf{e}_1 + k\mathbf{e}_2(1,k)(1, k)(0,1)(0, 1)[10k1]\begin{bmatrix} 1 & 0 \\ k & 1 \end{bmatrix}
Reflection through x1x_1-axis(1,0)(1, 0)(0,−1)(0, -1)[100−1]\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}
Projection onto x1x_1-axis(1,0)(1, 0)(0,0)(0, 0)[1000]\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}

One-to-One and Onto

Definitions (Lay §1.9): A mapping T:Rn→RmT: \mathbb{R}^n \to \mathbb{R}^m is

  • onto Rm\mathbb{R}^m if each b\mathbf{b} in Rm\mathbb{R}^m is the image of at least one x\mathbf{x} in Rn\mathbb{R}^n (range = codomain; an existence question);
  • one-to-one if each b\mathbf{b} in Rm\mathbb{R}^m is the image of at most one x\mathbf{x} in Rn\mathbb{R}^n (a uniqueness question).

Theorem 11 (Lay §1.9): Let T:Rn→RmT: \mathbb{R}^n \to \mathbb{R}^m be linear. Then TT is one-to-one if and only if the equation T(x)=0T(\mathbf{x}) = \mathbf{0} has only the trivial solution.

(Why: if T(u)=T(v)T(\mathbf{u}) = T(\mathbf{v}) then T(u−v)=0T(\mathbf{u} - \mathbf{v}) = \mathbf{0}; if only 0\mathbf{0} maps to 0\mathbf{0}, then u=v\mathbf{u} = \mathbf{v}.)

Theorem 12 (Lay §1.9): Let T:Rn→RmT: \mathbb{R}^n \to \mathbb{R}^m be linear with standard matrix AA. Then:

  • (a) TT maps Rn\mathbb{R}^n onto Rm\mathbb{R}^m if and only if the columns of AA span Rm\mathbb{R}^m;
  • (b) TT is one-to-one if and only if the columns of AA are linearly independent.

In practice everything reduces to one computation — find an echelon form of AA:

TT is one-to-oneTT is onto Rm\mathbb{R}^m
pivot in every column of AApivot in every row of AA
columns of AA linearly independentcolumns of AA span Rm\mathbb{R}^m
T(x)=0T(\mathbf{x}) = \mathbf{0} has only the trivial solutionAx=bA\mathbf{x} = \mathbf{b} has a solution for every b\mathbf{b} in Rm\mathbb{R}^m
needs n≤mn \le mneeds n≥mn \ge m

Shape shortcuts (from counting pivots): a 3×23 \times 2 matrix (T:R2→R3T: \mathbb{R}^2 \to \mathbb{R}^3) has at most 2 pivots, so it can never be onto R3\mathbb{R}^3. A 2×32 \times 3 matrix (T:R3→R2T: \mathbb{R}^3 \to \mathbb{R}^2) has a column without a pivot, so it can never be one-to-one. A square matrix can be both, one, or neither — you must row reduce.

Mini-example

T(x1,x2)=(3x1+x2,  5x1+7x2,  x1+3x2)T(x_1, x_2) = (3x_1 + x_2,\; 5x_1 + 7x_2,\; x_1 + 3x_2) has standard matrix A=[315713]A = \begin{bmatrix} 3 & 1 \\ 5 & 7 \\ 1 & 3 \end{bmatrix}. The two columns are not multiples of each other → independent → TT is one-to-one. But AA is 3×23 \times 2, so at most 2 pivots in 3 rows → TT is not onto R3\mathbb{R}^3.


Solved Examples (Textbook Questions)

Exercise 1

(Adapted from Lay §1.9, Exercises 1–6)

Assume TT is a linear transformation. Find the standard matrix of TT.

  1. T:R2→R4T: \mathbb{R}^2 \to \mathbb{R}^4, T(e1)=(3,1,3,1)T(\mathbf{e}_1) = (3, 1, 3, 1) and T(e2)=(−5,2,0,0)T(\mathbf{e}_2) = (-5, 2, 0, 0).
  2. T:R3→R2T: \mathbb{R}^3 \to \mathbb{R}^2, T(e1)=(1,3)T(\mathbf{e}_1) = (1, 3), T(e2)=(4,−7)T(\mathbf{e}_2) = (4, -7), T(e3)=(−5,4)T(\mathbf{e}_3) = (-5, 4).
  3. T:R2→R2T: \mathbb{R}^2 \to \mathbb{R}^2 rotates points (about the origin) through 3π/23\pi/2 radians (counterclockwise).
  4. T:R2→R2T: \mathbb{R}^2 \to \mathbb{R}^2 rotates points (about the origin) through −π/4-\pi/4 radians (clockwise). Hint: T(e1)=(1/2,−1/2)T(\mathbf{e}_1) = (1/\sqrt2, -1/\sqrt2).
  5. T:R2→R2T: \mathbb{R}^2 \to \mathbb{R}^2 is a vertical shear that maps e1\mathbf{e}_1 into e1−2e2\mathbf{e}_1 - 2\mathbf{e}_2 but leaves e2\mathbf{e}_2 unchanged.
  6. T:R2→R2T: \mathbb{R}^2 \to \mathbb{R}^2 is a horizontal shear that leaves e1\mathbf{e}_1 unchanged and maps e2\mathbf{e}_2 into e2+3e1\mathbf{e}_2 + 3\mathbf{e}_1.
Show solution ↓
Solution

Theorem 10: A=[T(e1) ⋯ T(en)]A = [T(\mathbf{e}_1) \ \cdots \ T(\mathbf{e}_n)]. Size check: T:Rn→RmT: \mathbb{R}^n \to \mathbb{R}^m gives an m×nm \times n matrix.

1. (4×24 \times 2) A=[3−5123010]\quad A = \begin{bmatrix} 3 & -5 \\ 1 & 2 \\ 3 & 0 \\ 1 & 0 \end{bmatrix}

2. (2×32 \times 3) A=[14−53−74]\quad A = \begin{bmatrix} 1 & 4 & -5 \\ 3 & -7 & 4 \end{bmatrix}

3. Rotating e1=(1,0)\mathbf{e}_1 = (1, 0) by 3π/23\pi/2 (three quarter-turns counterclockwise) lands on (0,−1)=−e2(0, -1) = -\mathbf{e}_2; rotating e2=(0,1)\mathbf{e}_2 = (0, 1) lands on (1,0)=e1(1, 0) = \mathbf{e}_1. (Check with the formula: cos⁡3π2=0\cos\tfrac{3\pi}{2} = 0, sin⁡3π2=−1\sin\tfrac{3\pi}{2} = -1.)

A=[−e2  e1]=[01−10]A = [-\mathbf{e}_2 \ \ \mathbf{e}_1] = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}

4. Use the rotation formula with φ=−π/4\varphi = -\pi/4: cos⁡φ=1/2\cos\varphi = 1/\sqrt2, sin⁡φ=−1/2\sin\varphi = -1/\sqrt2. So T(e1)=(cos⁡φ,sin⁡φ)=(1/2,−1/2)T(\mathbf{e}_1) = (\cos\varphi, \sin\varphi) = (1/\sqrt2, -1/\sqrt2) and T(e2)=(−sin⁡φ,cos⁡φ)=(1/2,1/2)T(\mathbf{e}_2) = (-\sin\varphi, \cos\varphi) = (1/\sqrt2, 1/\sqrt2):

A=[1/21/2−1/21/2]A = \begin{bmatrix} 1/\sqrt2 & 1/\sqrt2 \\ -1/\sqrt2 & 1/\sqrt2 \end{bmatrix}

5. T(e1)=e1−2e2=(1,−2)T(\mathbf{e}_1) = \mathbf{e}_1 - 2\mathbf{e}_2 = (1, -2), T(e2)=e2=(0,1)T(\mathbf{e}_2) = \mathbf{e}_2 = (0, 1):

A=[10−21]A = \begin{bmatrix} 1 & 0 \\ -2 & 1 \end{bmatrix}

6. T(e1)=e1=(1,0)T(\mathbf{e}_1) = \mathbf{e}_1 = (1, 0), T(e2)=e2+3e1=(3,1)T(\mathbf{e}_2) = \mathbf{e}_2 + 3\mathbf{e}_1 = (3, 1):

A=[1301]A = \begin{bmatrix} 1 & 3 \\ 0 & 1 \end{bmatrix}

Images go in as columns, not rows. In Exercise 2, writing T(e1),T(e2),T(e3)T(\mathbf{e}_1), T(\mathbf{e}_2), T(\mathbf{e}_3) as rows would give a 3×23 \times 2 matrix — the wrong shape for a map R3→R2\mathbb{R}^3 \to \mathbb{R}^2.

Exercise 2

(Adapted from Lay §1.9, Exercises 37–40 — conceptual; the row reduction is done by software)

TT is the linear transformation with the given standard matrix. In 37 and 38, decide if TT is one-to-one. In 39 and 40, decide if TT maps R5\mathbb{R}^5 onto R5\mathbb{R}^5.

37. [−510−5483−474−95−3−3−254]\begin{bmatrix} -5 & 10 & -5 & 4 \\ 8 & 3 & -4 & 7 \\ 4 & -9 & 5 & -3 \\ -3 & -2 & 5 & 4 \end{bmatrix} \qquad 38. [754−910616−4128127−8−6−25]\begin{bmatrix} 7 & 5 & 4 & -9 \\ 10 & 6 & 16 & -4 \\ 12 & 8 & 12 & 7 \\ -8 & -6 & -2 & 5 \end{bmatrix}

39. [4−73756−8512−8−710−8−9143−542−6−56−6−73]\begin{bmatrix} 4 & -7 & 3 & 7 & 5 \\ 6 & -8 & 5 & 12 & -8 \\ -7 & 10 & -8 & -9 & 14 \\ 3 & -5 & 4 & 2 & -6 \\ -5 & 6 & -6 & -7 & 3 \end{bmatrix} \qquad 40. [91356−11415−7−64−8−912−5−9−5−6−898131415211]\begin{bmatrix} 9 & 13 & 5 & 6 & -1 \\ 14 & 15 & -7 & -6 & 4 \\ -8 & -9 & 12 & -5 & -9 \\ -5 & -6 & -8 & 9 & 8 \\ 13 & 14 & 15 & 2 & 11 \end{bmatrix}

Show solution ↓
Solution

These are “to get an idea” problems: the point is reading the answer off the reduced echelon form, not doing the arithmetic by hand. Recall: one-to-one ⇔ pivot in every column; onto ⇔ pivot in every row.

37. Software gives

A∼[10044/3501079/3500186/350000]A \sim \begin{bmatrix} 1 & 0 & 0 & 44/35 \\ 0 & 1 & 0 & 79/35 \\ 0 & 0 & 1 & 86/35 \\ 0 & 0 & 0 & 0 \end{bmatrix}

No pivot in column 4 → Ax=0A\mathbf{x} = \mathbf{0} has a nontrivial solution → by Theorem 11, TT is not one-to-one.

38. Software gives

A∼[107001−9000010000]A \sim \begin{bmatrix} 1 & 0 & 7 & 0 \\ 0 & 1 & -9 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \end{bmatrix}

No pivot in column 3 → TT is not one-to-one. (You can verify by hand: column 3 =7⋅= 7\cdotcolumn 1 −9⋅- 9\cdotcolumn 2, e.g. 7(7)−9(5)=47(7) - 9(5) = 4 ✓. So the columns are dependent.)

39. Software gives

A∼[1005001010001−200000100000]A \sim \begin{bmatrix} 1 & 0 & 0 & 5 & 0 \\ 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & -2 & 0 \\ 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 \end{bmatrix}

Only 4 pivots — row 5 has no pivot → the columns do not span R5\mathbb{R}^5 → by Theorem 12, TT does not map R5\mathbb{R}^5 onto R5\mathbb{R}^5.

40. Software gives

A∼[100050100−4001000001100000]A \sim \begin{bmatrix} 1 & 0 & 0 & 0 & 5 \\ 0 & 1 & 0 & 0 & -4 \\ 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 & 0 \end{bmatrix}

Again only 4 pivots, no pivot in row 5 → not onto R5\mathbb{R}^5.

For a square matrix, “pivot in every row” and “pivot in every column” are the same thing (both mean nn pivots). So in 39 and 40, TT is also not one-to-one; and in 37 and 38, TT is also not onto R4\mathbb{R}^4.