Every matrix gives a linear transformation. This lesson shows the converse: every linear transformation from Rn to Rm is multiplication by some matrix, and you can write that matrix down just by watching what the transformation does to n special vectors. That turns geometric descriptions like "rotate by 30∘" or "reflect across a line" into concrete matrices you can compute with.
The standard matrix
The columns of the n×n identity matrix are the standard basis vectorse1,…,en of Rn. In R2, e1=(1,0) and e2=(0,1). Every vector is a combination of them:
x=x1⋮xn=x1e1+⋯+xnen.
If T is linear, superposition gives
T(x)=x1T(e1)+⋯+xnT(en)=[T(e1)⋯T(en)]x.
The standard matrix of a linear transformation
Let T:Rn→Rm be linear. Then there is exactly one m×n matrix A with T(x)=Ax for every x in Rn, namely
A=[T(e1)T(e2)⋯T(en)].
A is called the standard matrix of T. Its jth column is the image of the jth standard basis vector.
A linear transformation is completely determined by what it does to e1,…,en. Find those n images, stack them as columns, and you have the whole transformation.
Worked example: From a formula
Find the standard matrix of T(x1,x2)=(x1−2x2,3x1,x1+x2).
T maps R2 to R3, so its matrix is 3×2. Compute the images of e1 and e2:
T(e1)=T(1,0)=(1,3,1),T(e2)=T(0,1)=(−2,0,1).
So
A=131−201.
You can also read A straight off the formula: row i of A holds the coefficients of x1,x2 in the ith output.
Geometric transformations of the plane
For maps of R2, find where e1 and e2 land, and you're done.
Rotation. Rotating counterclockwise by an angle φ sends e1 to (cosφ,sinφ) and sends e2, which starts a quarter turn ahead, to (−sinφ,cosφ). So
rotation by φ:[cosφsinφ−sinφcosφ].
The same reasoning gives the whole table below. In each case the columns are the images of e1 and e2.
Transformation
Image of e1
Image of e2
Standard matrix
Reflection across the x1-axis
(1,0)
(0,−1)
[100−1]
Reflection across the x2-axis
(−1,0)
(0,1)
[−1001]
Reflection across x2=x1
(0,1)
(1,0)
[0110]
Reflection across x2=−x1
(0,−1)
(−1,0)
[0−1−10]
Reflection through the origin
(−1,0)
(0,−1)
[−100−1]
Horizontal shear by k
(1,0)
(k,1)
[10k1]
Vertical shear by k
(1,k)
(0,1)
[1k01]
Horizontal stretch by k
(k,0)
(0,1)
[k001]
Projection onto the x1-axis
(1,0)
(0,0)
[1000]
Don't memorize the table. Rebuild any row in seconds by asking where e1 and e2 go.
Worked example: A quarter turn
Find the standard matrix of the counterclockwise rotation by 90∘, and describe the image of the unit square.
With φ=90∘, cosφ=0 and sinφ=1, so
A=[01−10],A[x1x2]=[−x2x1].
The corners (0,0), (1,0), (1,1), (0,1) go to (0,0), (0,1), (−1,1), (−1,0): the square swings into the second quadrant.
The unit square in the first quadrant and its image after a 90° counterclockwise rotation, in the second quadrant.Open in grapher →
Composition is multiplication
If you apply T with standard matrix A and then S with standard matrix B, the combined map sends x to B(Ax)=(BA)x. So the standard matrix of "first T, then S" is BA: the matrix of the first step goes on the right. This is exactly why matrix multiplication was defined as it was.
Worked example: Reflect, then shear
T:R2→R2 first reflects across the line x2=x1 and then applies the horizontal shear [1021]. Find the standard matrix of T.
The reflection has matrix R=[0110] and is applied first, so
A=[1021][0110]=[2110].
Check with e1: the reflection sends it to e2=(0,1), and the shear sends (0,1) to (2,1), which is the first column of A.
The unit square and its image under T, the parallelogram with corners (0,0), (2,1), (3,1), (1,0).Open in grapher →
Common mistake
Order matters. "First A, then B" is the product BA, not AB. In the example above, doing the shear first and the reflection second gives [0112], a different transformation.
One-to-one and onto
Definition
Onto and one-to-one
A mapping T:Rn→Rm is ontoRm if every b in Rm is the image of at least onex in Rn. It is one-to-one if every b in Rm is the image of at most onex.
Onto is an existence question (is Ax=b always consistent?), and one-to-one is a uniqueness question (can Ax=b ever have two solutions?). Translating with what you already know about Ax=b:
T is ontoRm⟺ the columns of A span Rm⟺A has a pivot in every row.
T is one-to-one⟺T(x)=0 has only the trivial solution ⟺ the columns of A are linearly independent ⟺A has a pivot in every column.
The middle criterion for one-to-one uses linearity: if T(u)=T(v) with u=v, then T(u−v)=0 with u−v=0.
Counting pivots gives quick size limits. A map Rn→Rm with n>m can't be one-to-one (too many columns for each to get a pivot), and one with n<m can't be onto. For n=m, the Invertible Matrix Theorem says one-to-one and onto happen together, exactly when A is invertible.
Worked example: Checking both properties
Let T(x1,x2,x3)=(x1−x2+2x3,2x1+x2−x3). Is T one-to-one? Is it onto R2?
The standard matrix and its echelon form are
A=[12−112−1]∼[10−132−5].
There is a pivot in both rows, so T is onto R2. Column 3 has no pivot, so x3 is free, T(x)=0 has nontrivial solutions, and T is not one-to-one.
Tip
To check a standard matrix you built, test it on one vector that is not e1 or e2. For example, a rotation by 90∘ should send (1,1) to (−1,1), and indeed [01−10][11]=[−11].
Practice
Practice 1
Let T(x1,x2)=(2x1+x2,x1−3x2,−x2). What is the second column of the standard matrix of T? Enter it as (a,b,c).
Enter a point like (2, -3)
Practice 2
T:R2→R2 is linear with T(e1)=(1,2) and T(e2)=(−1,4). Find T(3,−2).
Enter a point like (2, -3)
Practice 3
Find the image of (2,0) under the counterclockwise rotation of R2 by 60∘. Enter exact values; you may type sqrt(3).
Enter a point like (2, -3)
Practice 4
Find the image of (3,1) under reflection across the line x2=−x1.
Enter a point like (2, -3)
Practice 5
T first rotates R2 counterclockwise by 90∘ and then reflects across the x1-axis. Which single transformation is T?
Practice 6
Let T(x)=Ax with A=10321−1. Which statement is true?
Practice 7
T:R5→R3 is linear, and its standard matrix has 3 pivot positions. Which statement is true?
Practice 8
A horizontal shear [10k1] sends the point (1,2) to (7,2). Find k.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.