Linear AlgebraLinear Transformations2 of 7
Linear Transformations · 2

Every Linear Map Is a Matrix

A linear map transforms every vector in a space, and we need a way to capture that entire map in a single matrix.

1

Where the Basis Vectors Land

Suppose a linear map TT in 2D sends the standard basis vectors to known landing spots:

T([10])=[2−1]T([01])=[14]\displaystyle \begin{aligned} T\left(\blockone{\begin{bmatrix} 1 \\ 0 \end{bmatrix}}\right) &= \blockone{\begin{bmatrix} 2 \\ -1 \end{bmatrix}} \\ T\left(\blocktwo{\begin{bmatrix} 0 \\ 1 \end{bmatrix}}\right) &= \blocktwo{\begin{bmatrix} 1 \\ 4 \end{bmatrix}} \end{aligned}

We want to find where TT sends [32]\built{\begin{bmatrix} 3 \\ 2 \end{bmatrix}}, and write TT itself as a matrix.

Remember, any linear map obeys two rules: it splits across addition and pulls out scaling numbers:

T(u+v)=T(u)+T(v)T(cv)=cT(v)\displaystyle \begin{aligned} T(u + v) &= T(u) + T(v) \\ T(cv) &= cT(v) \end{aligned}

Because of these two rules, we only need to know where the basis vectors land to find where any other vector lands.

Where the Basis Vectors Land
Every linear map is a matrix.
in spaces with a finite basis
[1101]\begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}
ddx(x2)=2x\dfrac{d}{dx}(x^2) = 2x
Text solution
Write the input vector in the standard basisBreak [32]\built{\begin{bmatrix} 3 \\ 2 \end{bmatrix}} into [10]\blockone{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} and [01]\blocktwo{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} so we can apply TT to the basis vectors we know:
[32]=3[10]+2[01]\displaystyle \built{\begin{bmatrix} 3 \\ 2 \end{bmatrix}} = \blockone{3\begin{bmatrix} 1 \\ 0 \end{bmatrix}} + \blocktwo{2\begin{bmatrix} 0 \\ 1 \end{bmatrix}}
Pull the coordinates through the linear mapSplit the sum, factor out the coordinates 3\blockone{3} and 2\blocktwo{2}, and plug in where each basis vector lands:
T([32])=T(3[10]+2[01])=3T([10])+2T([01])=3[2−1]+2[14]=[6−3]+[28]=[85]\displaystyle \begin{aligned} T\left(\built{\begin{bmatrix} 3 \\ 2 \end{bmatrix}}\right) &= T\left(\blockone{3\begin{bmatrix} 1 \\ 0 \end{bmatrix}} + \blocktwo{2\begin{bmatrix} 0 \\ 1 \end{bmatrix}}\right) \\ &= \blockone{3}T\left(\blockone{\begin{bmatrix} 1 \\ 0 \end{bmatrix}}\right) \\ &\qquad + \blocktwo{2}T\left(\blocktwo{\begin{bmatrix} 0 \\ 1 \end{bmatrix}}\right) \\ &= \blockone{3\begin{bmatrix} 2 \\ -1 \end{bmatrix}} + \blocktwo{2\begin{bmatrix} 1 \\ 4 \end{bmatrix}} \\ &= \blockone{\begin{bmatrix} 6 \\ -3 \end{bmatrix}} + \blocktwo{\begin{bmatrix} 2 \\ 8 \end{bmatrix}} \\ &= \built{\begin{bmatrix} 8 \\ 5 \end{bmatrix}} \end{aligned}
Place the landing vectors into matrix columnsSince multiplying a matrix by [32]\begin{bmatrix} \blockone{3} \\ \blocktwo{2} \end{bmatrix} combines 3\blockone{3} of the first column with 2\blocktwo{2} of the second column, the landing spots of [10]\blockone{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} and [01]\blocktwo{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} become the two columns of the standard matrix:
[21−14][32]=3[2−1]+2[14]=[85]\displaystyle \begin{aligned} \begin{bmatrix} \blockone{2} & \blocktwo{1} \\ \blockone{-1} & \blocktwo{4} \end{bmatrix}\begin{bmatrix} \blockone{3} \\ \blocktwo{2} \end{bmatrix} &= \blockone{3\begin{bmatrix} 2 \\ -1 \end{bmatrix}} + \blocktwo{2\begin{bmatrix} 1 \\ 4 \end{bmatrix}} \\ &= \built{\begin{bmatrix} 8 \\ 5 \end{bmatrix}} \end{aligned}

So the standard matrix of TT is [21−14]\begin{bmatrix} \blockone{2} & \blocktwo{1} \\ \blockone{-1} & \blocktwo{4} \end{bmatrix}, and multiplying it by [32]\built{\begin{bmatrix} 3 \\ 2 \end{bmatrix}} sends the vector to [85]\built{\begin{bmatrix} 8 \\ 5 \end{bmatrix}}.

Wherever the landing spots T([10])T\left(\blockone{\begin{bmatrix} 1 \\ 0 \end{bmatrix}}\right) and T([01])T\left(\blocktwo{\begin{bmatrix} 0 \\ 1 \end{bmatrix}}\right) are on the grid, their coordinates form the two columns of the matrix, and T([32])T\left(\built{\begin{bmatrix} 3 \\ 2 \end{bmatrix}}\right) always stays at 3\blockone{3} steps of the first column plus 2\blocktwo{2} steps of the second.

Each column of the matrix is just where a basis vector lands, and the output always stays at 3 of the first column plus 2 of the second.
2

When You Aren't Given the Standard Basis

Putting the given outputs straight into matrix columns only works when the inputs are [10]\begin{bmatrix} 1 \\ 0 \end{bmatrix} and [01]\begin{bmatrix} 0 \\ 1 \end{bmatrix}. Now suppose we are only told where TT sends two other vectors:

T([11])=[21]T([12])=[13]\displaystyle \begin{aligned} T\left(\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}}\right) &= \blockone{\begin{bmatrix} 2 \\ 1 \end{bmatrix}} \\ T\left(\blocktwo{\begin{bmatrix} 1 \\ 2 \end{bmatrix}}\right) &= \blocktwo{\begin{bmatrix} 1 \\ 3 \end{bmatrix}} \end{aligned}

We want to find where TT sends [45]\built{\begin{bmatrix} 4 \\ 5 \end{bmatrix}}, and then find the standard matrix of TT.

We cannot take 4\trap{4} of the first output plus 5\trap{5} of the second, because 44 and 55 are coordinates for [10]\begin{bmatrix} 1 \\ 0 \end{bmatrix} and [01]\begin{bmatrix} 0 \\ 1 \end{bmatrix}, not for [11]\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}} and [12]\blocktwo{\begin{bmatrix} 1 \\ 2 \end{bmatrix}}.

When You Aren't Given the Standard Basis
T ⁣([11])=[21]T ⁣([12])=[13]T ⁣([45])=  ?\begin{aligned} T\!\left(\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}}\right) &= \blockone{\begin{bmatrix} 2 \\ 1 \end{bmatrix}} \\[8pt] T\!\left(\blocktwo{\begin{bmatrix} 1 \\ 2 \end{bmatrix}}\right) &= \blocktwo{\begin{bmatrix} 1 \\ 3 \end{bmatrix}} \\[30pt] T\!\left(\built{\begin{bmatrix} 4 \\ 5 \end{bmatrix}}\right) &= \;? \end{aligned}
[45]\built{\begin{bmatrix} 4 \\ 5 \end{bmatrix}}
Text solution
Write [45]\built{\begin{bmatrix} 4 \\ 5 \end{bmatrix}} in terms of the given vectorsTreat [11]\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}} and [12]\blocktwo{\begin{bmatrix} 1 \\ 2 \end{bmatrix}} as our basis, find how many of each build [45]\built{\begin{bmatrix} 4 \\ 5 \end{bmatrix}}, and apply those same coordinates to their outputs:
[45]=3[11]+1[12]\displaystyle \built{\begin{bmatrix} 4 \\ 5 \end{bmatrix}} = \blockone{3\begin{bmatrix} 1 \\ 1 \end{bmatrix}} + \blocktwo{1\begin{bmatrix} 1 \\ 2 \end{bmatrix}}
T([45])=3T([11])+1T([12])=3[21]+1[13]=[63]+[13]=[76]\displaystyle \begin{aligned} T\left(\built{\begin{bmatrix} 4 \\ 5 \end{bmatrix}}\right) &= \blockone{3}T\left(\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}}\right) \\ &\qquad + \blocktwo{1}T\left(\blocktwo{\begin{bmatrix} 1 \\ 2 \end{bmatrix}}\right) \\ &= \blockone{3\begin{bmatrix} 2 \\ 1 \end{bmatrix}} + \blocktwo{1\begin{bmatrix} 1 \\ 3 \end{bmatrix}} \\ &= \blockone{\begin{bmatrix} 6 \\ 3 \end{bmatrix}} + \blocktwo{\begin{bmatrix} 1 \\ 3 \end{bmatrix}} \\ &= \built{\begin{bmatrix} 7 \\ 6 \end{bmatrix}} \end{aligned}
Build [10]\built{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} from the given vectors for column 1Write [10]\built{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} as a combination of [11]\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}} and [12]\blocktwo{\begin{bmatrix} 1 \\ 2 \end{bmatrix}}, then use those coordinates on the outputs:
[10]=2[11]−1[12]\displaystyle \built{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} = \blockone{2\begin{bmatrix} 1 \\ 1 \end{bmatrix}} - \blocktwo{1\begin{bmatrix} 1 \\ 2 \end{bmatrix}}
T([10])=2[21]−1[13]=[42]−[13]=[3−1]\displaystyle \begin{aligned} T\left(\built{\begin{bmatrix} 1 \\ 0 \end{bmatrix}}\right) &= \blockone{2\begin{bmatrix} 2 \\ 1 \end{bmatrix}} - \blocktwo{1\begin{bmatrix} 1 \\ 3 \end{bmatrix}} \\ &= \blockone{\begin{bmatrix} 4 \\ 2 \end{bmatrix}} - \blocktwo{\begin{bmatrix} 1 \\ 3 \end{bmatrix}} \\ &= \built{\begin{bmatrix} 3 \\ -1 \end{bmatrix}} \end{aligned}
Build [01]\built{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} from the given vectors for column 2Write [01]\built{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} in terms of [11]\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}} and [12]\blocktwo{\begin{bmatrix} 1 \\ 2 \end{bmatrix}}, and combine the outputs the same way:
[01]=−1[11]+1[12]\displaystyle \built{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} = \blockone{-1\begin{bmatrix} 1 \\ 1 \end{bmatrix}} + \blocktwo{1\begin{bmatrix} 1 \\ 2 \end{bmatrix}}
T([01])=−1[21]+1[13]=[−2−1]+[13]=[−12]\displaystyle \begin{aligned} T\left(\built{\begin{bmatrix} 0 \\ 1 \end{bmatrix}}\right) &= \blockone{-1\begin{bmatrix} 2 \\ 1 \end{bmatrix}} + \blocktwo{1\begin{bmatrix} 1 \\ 3 \end{bmatrix}} \\ &= \blockone{\begin{bmatrix} -2 \\ -1 \end{bmatrix}} + \blocktwo{\begin{bmatrix} 1 \\ 3 \end{bmatrix}} \\ &= \built{\begin{bmatrix} -1 \\ 2 \end{bmatrix}} \end{aligned}

Putting the two landing spots together gives the standard matrix [3−1−12]\built{\begin{bmatrix} 3 & -1 \\ -1 & 2 \end{bmatrix}}, which sends [45]\built{\begin{bmatrix} 4 \\ 5 \end{bmatrix}} directly to [3−1−12][45]=[76]\built{\begin{bmatrix} 3 & -1 \\ -1 & 2 \end{bmatrix}}\built{\begin{bmatrix} 4 \\ 5 \end{bmatrix}} = \built{\begin{bmatrix} 7 \\ 6 \end{bmatrix}}. With small 2D numbers you can usually spot the combinations for [10]\built{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} and [01]\built{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} right away, though on a test you can always write out the two equations if the numbers aren't obvious.

On the grid lined with [11]\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}} and [12]\blocktwo{\begin{bmatrix} 1 \\ 2 \end{bmatrix}}, the steps that reach a target vector are the same steps along [21]\blockone{\begin{bmatrix} 2 \\ 1 \end{bmatrix}} and [13]\blocktwo{\begin{bmatrix} 1 \\ 3 \end{bmatrix}} that build its output. Aiming at [10]\built{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} and [01]\built{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} gives the two columns of the standard matrix.

Steps along the given vectors become the exact same steps along their outputs, and finding those steps for the standard basis vectors gives the two columns of the standard matrix.
3

The Derivative as a Matrix

Now let's step outside of 2D arrows to polynomials up to degree 22, such as 2+5x+3x2\blockone{2} + \blocktwo{5x} + \blockthree{3x^2}. Using the standard basis {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\}, we want to write the derivative ddx\frac{d}{dx} as a 3×33 \times 3 matrix and use it to take the derivative of 2+5x+3x2\blockone{2} + \blocktwo{5x} + \blockthree{3x^2}.

In the basis {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\}, every polynomial is recorded by the column of its three coefficients, and the derivative is a linear map because it splits across sums and pulls out constants:

ddx(f+g)=dfdx+dgdxddx(cf)=cdfdx\displaystyle \begin{aligned} \frac{d}{dx}(f + g) &= \frac{df}{dx} + \frac{dg}{dx} \\ \frac{d}{dx}(cf) &= c\frac{df}{dx} \end{aligned}
The Derivative as a Matrix
ddx=[?????????]\displaystyle \frac{d}{dx} = \begin{bmatrix} \htmlClass{lc-mute}{?} & \htmlClass{lc-mute}{?} & \htmlClass{lc-mute}{?} \\ \htmlClass{lc-mute}{?} & \htmlClass{lc-mute}{?} & \htmlClass{lc-mute}{?} \\ \htmlClass{lc-mute}{?} & \htmlClass{lc-mute}{?} & \htmlClass{lc-mute}{?} \end{bmatrix}
2+5x+3x2\displaystyle \blockone{2} + \blocktwo{5x} + \blockthree{3x^2}
2+5x+3x2\blockone{2} + \blocktwo{5x} + \blockthree{3x^2}
5+6x\blockone{5} + \blocktwo{6x}
2\blockone{2}
5\blocktwo{5}
3\blockthree{3}
5\blockone{5}
6\blocktwo{6}
0\blockthree{0}
0\blockone{0}
1\blocktwo{1}
0\blockthree{0}
0\blockone{0}
0\blocktwo{0}
2\blockthree{2}
0\blockone{0}
0\blocktwo{0}
0\blockthree{0}
ddx\frac{d}{dx}
coordinates
in {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\}
Text solution
Differentiate each basis vector to get the three columnsApply ddx\frac{d}{dx} to 1\blockone{1}, x\blocktwo{x}, and x2\blockthree{x^2} one at a time, and write each result in coordinates for the basis {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\}:
ddx(1)=0=0(1)+0(x)+0(x2)⟶[000]ddx(x)=1=1(1)+0(x)+0(x2)⟶[100]ddx(x2)=2x=0(1)+2(x)+0(x2)⟶[020]\displaystyle \begin{aligned} &\frac{d}{dx}(\blockone{1}) = 0 \\ &\quad= \blockone{0}(1) + \blockone{0}(x) + \blockone{0}(x^2) \longrightarrow \blockone{\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}} \\ &\frac{d}{dx}(\blocktwo{x}) = 1 \\ &\quad= \blocktwo{1}(1) + \blocktwo{0}(x) + \blocktwo{0}(x^2) \longrightarrow \blocktwo{\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}} \\ &\frac{d}{dx}(\blockthree{x^2}) = 2x \\ &\quad= \blockthree{0}(1) + \blockthree{2}(x) + \blockthree{0}(x^2) \longrightarrow \blockthree{\begin{bmatrix} 0 \\ 2 \\ 0 \end{bmatrix}} \end{aligned}
Multiply the derivative matrix by the polynomial's coordinatesPut the three columns into a matrix and multiply by [253]\begin{bmatrix} \blockone{2} \\ \blocktwo{5} \\ \blockthree{3} \end{bmatrix}, the coordinate column for 2+5x+3x2\blockone{2} + \blocktwo{5x} + \blockthree{3x^2}:
[010002000][253]=2[000]+5[100]+3[020]=[000]+[500]+[060]=[560]\displaystyle \begin{aligned} &\begin{bmatrix} \blockone{0} & \blocktwo{1} & \blockthree{0} \\ \blockone{0} & \blocktwo{0} & \blockthree{2} \\ \blockone{0} & \blocktwo{0} & \blockthree{0} \end{bmatrix}\begin{bmatrix} \blockone{2} \\ \blocktwo{5} \\ \blockthree{3} \end{bmatrix} \\ &\quad= \blockone{2\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}} + \blocktwo{5\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}} + \blockthree{3\begin{bmatrix} 0 \\ 2 \\ 0 \end{bmatrix}} \\ &\quad= \blockone{\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}} + \blocktwo{\begin{bmatrix} 5 \\ 0 \\ 0 \end{bmatrix}} + \blockthree{\begin{bmatrix} 0 \\ 6 \\ 0 \end{bmatrix}} \\ &\quad= \begin{bmatrix} \blockone{5} \\ \blocktwo{6} \\ \blockthree{0} \end{bmatrix} \end{aligned}

Turning the output column [560]\begin{bmatrix} \blockone{5} \\ \blocktwo{6} \\ \blockthree{0} \end{bmatrix} back into a polynomial using {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\} gives 5(1)+6(x)+0(x2)=5+6x\blockone{5(1)} + \blocktwo{6(x)} + \blockthree{0(x^2)} = \blockone{5} + \blocktwo{6x}, which is the derivative of 2+5x+3x2\blockone{2} + \blocktwo{5x} + \blockthree{3x^2}. You can differentiate 2+5x+3x2\blockone{2} + \blocktwo{5x} + \blockthree{3x^2} in your head to check the answer, and a test asks for the matrix to see that you can turn each basis vector's output into a coordinate column.

4

Any Input Basis, Any Output Basis

In the derivative example, the input and output were both polynomials in the same basis {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\}. Now suppose a linear map takes a polynomial p(x)=a+bx+cx2p(x) = \blockone{a} + \blocktwo{bx} + \blockthree{cx^2} and outputs a 2D vector by plugging in x=0x = 0 and x=1x = 1:

T(p(x))=[p(0)p(1)]\displaystyle T(p(x)) = \begin{bmatrix} p(0) \\ p(1) \end{bmatrix}

We want to find the matrix for TT using the input basis {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\} and the output basis {[11],[01]}\left\{\begin{bmatrix} 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \end{bmatrix}\right\}.

Any Input Basis, Any Output Basis
1\blockone{1}
x\blocktwo{x}
x2\blockthree{x^2}
v\built{v}
TT
[11]\begin{bmatrix} 1 \\ 1 \end{bmatrix}
[01]\begin{bmatrix} 0 \\ 1 \end{bmatrix}
T(v)T(\built{v})
1\blockone{1}
0\blocktwo{0}
0\blockthree{0}
0\blockone{0}
1\blocktwo{1}
1\blockthree{1}
T(1)T(\blockone{1})
T(x)T(\blocktwo{x})
T(x2)T(\blockthree{x^2})
[11]\begin{bmatrix} 1 \\ 1 \end{bmatrix}
[01]\begin{bmatrix} 0 \\ 1 \end{bmatrix}
output
basis
Text solution
Plug in 1\blockone{1} and write the result in the output basis for column 1Evaluate the first input basis vector p(x)=1p(x) = \blockone{1} at x=0x = 0 and x=1x = 1, then break the resulting 2D vector into the output basis {[11],[01]}\left\{\begin{bmatrix} 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \end{bmatrix}\right\}:
T(1)=[11]=1[11]+0[01]⟶[10]\displaystyle \begin{aligned} T(\blockone{1}) &= \built{\begin{bmatrix} 1 \\ 1 \end{bmatrix}} \\ &= \blockone{1}\begin{bmatrix} 1 \\ 1 \end{bmatrix} + \blockone{0}\begin{bmatrix} 0 \\ 1 \end{bmatrix} \longrightarrow \blockone{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} \end{aligned}
Plug in x\blocktwo{x} and write the result in the output basis for column 2Evaluate p(x)=xp(x) = \blocktwo{x} at x=0x = 0 and x=1x = 1, and write that vector in the output basis:
T(x)=[01]=0[11]+1[01]⟶[01]\displaystyle \begin{aligned} T(\blocktwo{x}) &= \built{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} \\ &= \blocktwo{0}\begin{bmatrix} 1 \\ 1 \end{bmatrix} + \blocktwo{1}\begin{bmatrix} 0 \\ 1 \end{bmatrix} \longrightarrow \blocktwo{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} \end{aligned}
Plug in x2\blockthree{x^2} and write the result in the output basis for column 3Evaluate p(x)=x2p(x) = \blockthree{x^2} at x=0x = 0 and x=1x = 1, and write that vector in the output basis:
T(x2)=[01]=0[11]+1[01]⟶[01]\displaystyle \begin{aligned} T(\blockthree{x^2}) &= \built{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} \\ &= \blockthree{0}\begin{bmatrix} 1 \\ 1 \end{bmatrix} + \blockthree{1}\begin{bmatrix} 0 \\ 1 \end{bmatrix} \longrightarrow \blockthree{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} \end{aligned}

Putting the three columns together gives the 2×32 \times 3 matrix [100011]\begin{bmatrix} \blockone{1} & \blocktwo{0} & \blockthree{0} \\ \blockone{0} & \blocktwo{1} & \blockthree{1} \end{bmatrix}, which takes the coordinates of p(x)p(x) in {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\} and outputs the coordinates of T(p(x))T(p(x)) in {[11],[01]}\left\{\begin{bmatrix} 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \end{bmatrix}\right\}.

Key concepts

Building the matrix of a linear map TT always comes down to one question: where do the input basis vectors land, written in the output basis?

If a problem already gives you where the standard basis lands in standard coordinates, such as T([10])=[2−1]T\left(\blockone{\begin{bmatrix} 1 \\ 0 \end{bmatrix}}\right) = \blockone{\begin{bmatrix} 2 \\ -1 \end{bmatrix}} and T([01])=[14]T\left(\blocktwo{\begin{bmatrix} 0 \\ 1 \end{bmatrix}}\right) = \blocktwo{\begin{bmatrix} 1 \\ 4 \end{bmatrix}}, there is nothing to solve: put those outputs straight into the columns to get [21−14]\begin{bmatrix} \blockone{2} & \blocktwo{1} \\ \blockone{-1} & \blocktwo{4} \end{bmatrix}.

If you are instead given where non-standard vectors land, such as T([11])=[21]T\left(\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}}\right) = \blockone{\begin{bmatrix} 2 \\ 1 \end{bmatrix}} and T([12])=[13]T\left(\blocktwo{\begin{bmatrix} 1 \\ 2 \end{bmatrix}}\right) = \blocktwo{\begin{bmatrix} 1 \\ 3 \end{bmatrix}}, don't put those outputs into the matrix. First write the basis vector you need in terms of the given vectors, like [10]=2[11]−1[12]\built{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} = \blockone{2\begin{bmatrix} 1 \\ 1 \end{bmatrix}} - \blocktwo{1\begin{bmatrix} 1 \\ 2 \end{bmatrix}}, so that you can apply those same coordinates to the outputs: T([10])=2[21]−1[13]=[3−1]T\left(\built{\begin{bmatrix} 1 \\ 0 \end{bmatrix}}\right) = \blockone{2\begin{bmatrix} 2 \\ 1 \end{bmatrix}} - \blocktwo{1\begin{bmatrix} 1 \\ 3 \end{bmatrix}} = \built{\begin{bmatrix} 3 \\ -1 \end{bmatrix}}.

When the input and output have their own bases, whether polynomials in {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\} or 2D vectors in {[11],[01]}\left\{\begin{bmatrix} 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \end{bmatrix}\right\}, plug each input basis vector into TT and write the result in the output basis. Those coordinates form that input vector's column: for T(1)=[11]=1[11]+0[01]T(\blockone{1}) = \built{\begin{bmatrix} 1 \\ 1 \end{bmatrix}} = \blockone{1}\begin{bmatrix} 1 \\ 1 \end{bmatrix} + \blockone{0}\begin{bmatrix} 0 \\ 1 \end{bmatrix}, the column is [10]\blockone{\begin{bmatrix} 1 \\ 0 \end{bmatrix}}.

5

Practice

1

A linear map TT in 2D sends [10]\blockone{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} to [3−2]\blockone{\begin{bmatrix} 3 \\ -2 \end{bmatrix}} and [01]\blocktwo{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} to [−15]\blocktwo{\begin{bmatrix} -1 \\ 5 \end{bmatrix}}. What is the standard matrix of TT, and where does TT send [24]\built{\begin{bmatrix} 2 \\ 4 \end{bmatrix}}?

Do the landing spots of [10]\blockone{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} and [01]\blocktwo{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} go into the matrix as rows or as columns?

The landing spots of [10]\blockone{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} and [01]\blocktwo{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} form the columns of the standard matrix (watch out for the common mistake of putting them in as rows to get [3−2−15]\trap{\begin{bmatrix} 3 & -2 \\ -1 & 5 \end{bmatrix}}, which would send [24]\built{\begin{bmatrix} 2 \\ 4 \end{bmatrix}} to [−218]\trap{\begin{bmatrix} -2 \\ 18 \end{bmatrix}}):
[3−1−25]\displaystyle \begin{bmatrix} \blockone{3} & \blocktwo{-1} \\ \blockone{-2} & \blocktwo{5} \end{bmatrix}
Multiply this matrix by [24]\built{\begin{bmatrix} 2 \\ 4 \end{bmatrix}} by combining the columns with coordinates 2\blockone{2} and 4\blocktwo{4}:
T([24])=2[3−2]+4[−15]=[6−4]+[−420]=[216]\displaystyle \begin{aligned} T\left(\built{\begin{bmatrix} 2 \\ 4 \end{bmatrix}}\right) &= \blockone{2\begin{bmatrix} 3 \\ -2 \end{bmatrix}} + \blocktwo{4\begin{bmatrix} -1 \\ 5 \end{bmatrix}} \\ &= \blockone{\begin{bmatrix} 6 \\ -4 \end{bmatrix}} + \blocktwo{\begin{bmatrix} -4 \\ 20 \end{bmatrix}} \\ &= \built{\begin{bmatrix} 2 \\ 16 \end{bmatrix}} \end{aligned}
2

A linear map TT in 2D satisfies T([11])=[31]T\left(\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}}\right) = \blockone{\begin{bmatrix} 3 \\ 1 \end{bmatrix}} and T([23])=[45]T\left(\blocktwo{\begin{bmatrix} 2 \\ 3 \end{bmatrix}}\right) = \blocktwo{\begin{bmatrix} 4 \\ 5 \end{bmatrix}}. Find the standard matrix of TT, and use it to find T([43])T\left(\built{\begin{bmatrix} 4 \\ 3 \end{bmatrix}}\right).

The given inputs are not [10]\begin{bmatrix} 1 \\ 0 \end{bmatrix} and [01]\begin{bmatrix} 0 \\ 1 \end{bmatrix}. How many of [11]\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}} and [23]\blocktwo{\begin{bmatrix} 2 \\ 3 \end{bmatrix}} do you need to combine to build [10]\built{\begin{bmatrix} 1 \\ 0 \end{bmatrix}}, and then [01]\built{\begin{bmatrix} 0 \\ 1 \end{bmatrix}}?

Because the given inputs are not the standard basis, don't put [31]\blockone{\begin{bmatrix} 3 \\ 1 \end{bmatrix}} and [45]\blocktwo{\begin{bmatrix} 4 \\ 5 \end{bmatrix}} directly into the columns (that gives the wrong matrix [3415]\trap{\begin{bmatrix} 3 & 4 \\ 1 & 5 \end{bmatrix}} and the wrong output [2419]\trap{\begin{bmatrix} 24 \\ 19 \end{bmatrix}}). Instead, write [10]\built{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} and [01]\built{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} as combinations of [11]\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}} and [23]\blocktwo{\begin{bmatrix} 2 \\ 3 \end{bmatrix}}:
[10]=3[11]−1[23][01]=−2[11]+1[23]\displaystyle \begin{aligned} \built{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} &= \blockone{3\begin{bmatrix} 1 \\ 1 \end{bmatrix}} - \blocktwo{1\begin{bmatrix} 2 \\ 3 \end{bmatrix}} \\ \built{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} &= \blockone{-2\begin{bmatrix} 1 \\ 1 \end{bmatrix}} + \blocktwo{1\begin{bmatrix} 2 \\ 3 \end{bmatrix}} \end{aligned}
Apply those same coordinates to the outputs [31]\blockone{\begin{bmatrix} 3 \\ 1 \end{bmatrix}} and [45]\blocktwo{\begin{bmatrix} 4 \\ 5 \end{bmatrix}} to get the two columns:
T([10])=3[31]−1[45]=[93]−[45]=[5−2]T([01])=−2[31]+1[45]=[−6−2]+[45]=[−23]\displaystyle \begin{aligned} T\left(\built{\begin{bmatrix} 1 \\ 0 \end{bmatrix}}\right) &= \blockone{3\begin{bmatrix} 3 \\ 1 \end{bmatrix}} - \blocktwo{1\begin{bmatrix} 4 \\ 5 \end{bmatrix}} \\ &= \blockone{\begin{bmatrix} 9 \\ 3 \end{bmatrix}} - \blocktwo{\begin{bmatrix} 4 \\ 5 \end{bmatrix}} \\ &= \built{\begin{bmatrix} 5 \\ -2 \end{bmatrix}} \\[6pt] T\left(\built{\begin{bmatrix} 0 \\ 1 \end{bmatrix}}\right) &= \blockone{-2\begin{bmatrix} 3 \\ 1 \end{bmatrix}} + \blocktwo{1\begin{bmatrix} 4 \\ 5 \end{bmatrix}} \\ &= \blockone{\begin{bmatrix} -6 \\ -2 \end{bmatrix}} + \blocktwo{\begin{bmatrix} 4 \\ 5 \end{bmatrix}} \\ &= \built{\begin{bmatrix} -2 \\ 3 \end{bmatrix}} \end{aligned}
The standard matrix is [5−2−23]\built{\begin{bmatrix} 5 & -2 \\ -2 & 3 \end{bmatrix}}, and multiplying it by [43]\built{\begin{bmatrix} 4 \\ 3 \end{bmatrix}} gives:
T([43])=[5−2−23][43]=4[5−2]+3[−23]=[20−8]+[−69]=[141]\displaystyle \begin{aligned} T\left(\built{\begin{bmatrix} 4 \\ 3 \end{bmatrix}}\right) &= \built{\begin{bmatrix} 5 & -2 \\ -2 & 3 \end{bmatrix}}\built{\begin{bmatrix} 4 \\ 3 \end{bmatrix}} \\ &= 4\built{\begin{bmatrix} 5 \\ -2 \end{bmatrix}} + 3\built{\begin{bmatrix} -2 \\ 3 \end{bmatrix}} \\ &= \begin{bmatrix} 20 \\ -8 \end{bmatrix} + \begin{bmatrix} -6 \\ 9 \end{bmatrix} \\ &= \built{\begin{bmatrix} 14 \\ 1 \end{bmatrix}} \end{aligned}
3

On the space of polynomials up to degree 22 with standard basis {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\}, let T(p(x))=p(x)+ddx(p(x))T(p(x)) = p(x) + \frac{d}{dx}(p(x)). Find the 3×33 \times 3 matrix for TT in this basis, and use it to find T(4−x+3x2)T(\blockone{4} - \blocktwo{x} + \blockthree{3x^2}).

Plug 1\blockone{1}, x\blocktwo{x}, and x2\blockthree{x^2} into p(x)+ddx(p(x))p(x) + \frac{d}{dx}(p(x)) one by one, and remember that the map adds the original polynomial to its derivative.

Plug each basis vector into T(p(x))=p(x)+ddx(p(x))T(p(x)) = p(x) + \frac{d}{dx}(p(x)) (being careful not to leave out the p(x)p(x) term, which would give the derivative matrix [010002000]\trap{\begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 2 \\ 0 & 0 & 0 \end{bmatrix}} and the wrong answer −1+6x\trap{-1 + 6x}):
T(1)=1+0=1(1)+0(x)+0(x2)⟶[100]T(x)=x+1=1(1)+1(x)+0(x2)⟶[110]T(x2)=x2+2x=0(1)+2(x)+1(x2)⟶[021]\displaystyle \begin{aligned} T(\blockone{1}) &= 1 + 0 \\ &= \blockone{1}(1) + \blockone{0}(x) + \blockone{0}(x^2) \\ &\qquad \longrightarrow \blockone{\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}} \\ T(\blocktwo{x}) &= x + 1 \\ &= \blocktwo{1}(1) + \blocktwo{1}(x) + \blocktwo{0}(x^2) \\ &\qquad \longrightarrow \blocktwo{\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}} \\ T(\blockthree{x^2}) &= x^2 + 2x \\ &= \blockthree{0}(1) + \blockthree{2}(x) + \blockthree{1}(x^2) \\ &\qquad \longrightarrow \blockthree{\begin{bmatrix} 0 \\ 2 \\ 1 \end{bmatrix}} \end{aligned}
The matrix for TT is [110012001]\begin{bmatrix} \blockone{1} & \blocktwo{1} & \blockthree{0} \\ \blockone{0} & \blocktwo{1} & \blockthree{2} \\ \blockone{0} & \blocktwo{0} & \blockthree{1} \end{bmatrix}. Multiply it by the coordinate column [4−13]\begin{bmatrix} \blockone{4} \\ \blocktwo{-1} \\ \blockthree{3} \end{bmatrix} for 4−x+3x2\blockone{4} - \blocktwo{x} + \blockthree{3x^2}:
[110012001][4−13]=4[100]−1[110]+3[021]=[353]\displaystyle \begin{aligned} & \begin{bmatrix} \blockone{1} & \blocktwo{1} & \blockthree{0} \\ \blockone{0} & \blocktwo{1} & \blockthree{2} \\ \blockone{0} & \blocktwo{0} & \blockthree{1} \end{bmatrix}\begin{bmatrix} \blockone{4} \\ \blocktwo{-1} \\ \blockthree{3} \end{bmatrix} = \blockone{4\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}} \\ &\quad - \blocktwo{1\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}}+ \blockthree{3\begin{bmatrix} 0 \\ 2 \\ 1 \end{bmatrix}} = \begin{bmatrix} \blockone{3} \\ \blocktwo{5} \\ \blockthree{3} \end{bmatrix} \end{aligned}
In the basis {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\}, this gives 3+5x+3x2\blockone{3} + \blocktwo{5x} + \blockthree{3x^2}.
4

Let TT take a polynomial p(x)p(x) up to degree 22 and output the 2D vector T(p(x))=[p(0)p(2)]T(p(x)) = \begin{bmatrix} p(0) \\ p(2) \end{bmatrix}. Find the matrix of TT using the input basis {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\} and the output basis {[10],[11]}\left\{\begin{bmatrix} 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 1 \\ 1 \end{bmatrix}\right\}.

After finding T(1)T(\blockone{1}), T(x)T(\blocktwo{x}), and T(x2)T(\blockthree{x^2}), notice that the output basis is {[10],[11]}\left\{\begin{bmatrix} 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 1 \\ 1 \end{bmatrix}\right\}. How many of [10]\begin{bmatrix} 1 \\ 0 \end{bmatrix} and [11]\begin{bmatrix} 1 \\ 1 \end{bmatrix} build each output vector?

First plug the three input basis vectors into T(p(x))=[p(0)p(2)]T(p(x)) = \begin{bmatrix} p(0) \\ p(2) \end{bmatrix}, and then rewrite each result in the output basis {[10],[11]}\left\{\begin{bmatrix} 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 1 \\ 1 \end{bmatrix}\right\} (don't stop early and put the outputs [11]\built{\begin{bmatrix} 1 \\ 1 \end{bmatrix}}, [02]\built{\begin{bmatrix} 0 \\ 2 \end{bmatrix}}, and [04]\built{\begin{bmatrix} 0 \\ 4 \end{bmatrix}} straight into the columns to get [100124]\trap{\begin{bmatrix} 1 & 0 & 0 \\ 1 & 2 & 4 \end{bmatrix}}, because those are in standard coordinates):
T(1)=[11]=0[10]+1[11]⟶[01]T(x)=[02]=−2[10]+2[11]⟶[−22]T(x2)=[04]=−4[10]+4[11]⟶[−44]\displaystyle \begin{aligned} T(\blockone{1}) &= \built{\begin{bmatrix} 1 \\ 1 \end{bmatrix}} = \blockone{0}\begin{bmatrix} 1 \\ 0 \end{bmatrix} + \blockone{1}\begin{bmatrix} 1 \\ 1 \end{bmatrix} \\ &\qquad \longrightarrow \blockone{\begin{bmatrix} 0 \\ 1 \end{bmatrix}} \\ T(\blocktwo{x}) &= \built{\begin{bmatrix} 0 \\ 2 \end{bmatrix}} = \blocktwo{-2}\begin{bmatrix} 1 \\ 0 \end{bmatrix} + \blocktwo{2}\begin{bmatrix} 1 \\ 1 \end{bmatrix} \\ &\qquad \longrightarrow \blocktwo{\begin{bmatrix} -2 \\ 2 \end{bmatrix}} \\ T(\blockthree{x^2}) &= \built{\begin{bmatrix} 0 \\ 4 \end{bmatrix}} = \blockthree{-4}\begin{bmatrix} 1 \\ 0 \end{bmatrix} + \blockthree{4}\begin{bmatrix} 1 \\ 1 \end{bmatrix} \\ &\qquad \longrightarrow \blockthree{\begin{bmatrix} -4 \\ 4 \end{bmatrix}} \end{aligned}
Putting the three coordinate columns together gives:
[0−2−4124]\displaystyle \begin{bmatrix} \blockone{0} & \blocktwo{-2} & \blockthree{-4} \\ \blockone{1} & \blocktwo{2} & \blockthree{4} \end{bmatrix}
5

A linear map TT in 2D has the standard matrix [2103]\begin{bmatrix} 2 & 1 \\ 0 & 3 \end{bmatrix}. Find the matrix of TT using the input basis {[11],[10]}\left\{\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}}, \blocktwo{\begin{bmatrix} 1 \\ 0 \end{bmatrix}}\right\} and the output basis {[11],[01]}\left\{\begin{bmatrix} 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \end{bmatrix}\right\}.

Multiply the standard matrix by each input basis vector to see where it lands, then rewrite each resulting vector as a combination of the output basis {[11],[01]}\left\{\begin{bmatrix} 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \end{bmatrix}\right\}.

First multiply the standard matrix [2103]\begin{bmatrix} 2 & 1 \\ 0 & 3 \end{bmatrix} by the two input basis vectors [11]\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}} and [10]\blocktwo{\begin{bmatrix} 1 \\ 0 \end{bmatrix}}:
T([11])=[2103][11]=[33]T([10])=[2103][10]=[20]\displaystyle \begin{aligned} T\left(\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}}\right) &= \begin{bmatrix} 2 & 1 \\ 0 & 3 \end{bmatrix}\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}} = \built{\begin{bmatrix} 3 \\ 3 \end{bmatrix}} \\ T\left(\blocktwo{\begin{bmatrix} 1 \\ 0 \end{bmatrix}}\right) &= \begin{bmatrix} 2 & 1 \\ 0 & 3 \end{bmatrix}\blocktwo{\begin{bmatrix} 1 \\ 0 \end{bmatrix}} = \built{\begin{bmatrix} 2 \\ 0 \end{bmatrix}} \end{aligned}
Now write those outputs in the output basis {[11],[01]}\left\{\begin{bmatrix} 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \end{bmatrix}\right\} (watch out for leaving [33]\built{\begin{bmatrix} 3 \\ 3 \end{bmatrix}} and [20]\built{\begin{bmatrix} 2 \\ 0 \end{bmatrix}} in standard coordinates to get [3230]\trap{\begin{bmatrix} 3 & 2 \\ 3 & 0 \end{bmatrix}}, or accidentally rewriting them in the input basis {[11],[10]}\left\{\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}}, \blocktwo{\begin{bmatrix} 1 \\ 0 \end{bmatrix}}\right\} to get [3002]\trap{\begin{bmatrix} 3 & 0 \\ 0 & 2 \end{bmatrix}}):
[33]=3[11]+0[01]⟶[30][20]=2[11]−2[01]⟶[2−2]\displaystyle \begin{aligned} \built{\begin{bmatrix} 3 \\ 3 \end{bmatrix}} &= \blockone{3}\begin{bmatrix} 1 \\ 1 \end{bmatrix} + \blockone{0}\begin{bmatrix} 0 \\ 1 \end{bmatrix} &&\longrightarrow \blockone{\begin{bmatrix} 3 \\ 0 \end{bmatrix}} \\ \built{\begin{bmatrix} 2 \\ 0 \end{bmatrix}} &= \blocktwo{2}\begin{bmatrix} 1 \\ 1 \end{bmatrix} - \blocktwo{2}\begin{bmatrix} 0 \\ 1 \end{bmatrix} &&\longrightarrow \blocktwo{\begin{bmatrix} 2 \\ -2 \end{bmatrix}} \end{aligned}
Putting these two columns together gives the matrix:
[320−2]\displaystyle \begin{bmatrix} \blockone{3} & \blocktwo{2} \\ \blockone{0} & \blocktwo{-2} \end{bmatrix}