We know how to describe a single linear map with a matrix, and now we want to find the single matrix for two linear maps done one right after the other.
1
Why Composing Maps Is Multiplying Matrices
When we apply a first linear map S to a vector x and then plug that result straight into a second linear map T, we get a single combined map:
T(S(x))=composition(T∘S)(x)
The circle reads "T after S": because S sits right next to x,S happens first and T happens second. Since both maps keep grid lines parallel and evenly spaced and keep the origin fixed at (0,0), the combined map T∘S is also a linear map with its own matrix.
Why Composing Maps Is Multiplying Matrices
Let's find the matrix for T∘S when S has matrix [21−12] and T has matrix [1230].
Text solution
Follow the first basis vector (1,0) through S and then TThe first map S sends (1,0) to its first column (2,1), and the second map T sends (2,1) to the first column of T∘S.
T(S(1,0))=[1230][21]=2[12]+1[30]=[54]
Follow the second basis vector (0,1) through S and then TThe first map S sends (0,1) to its second column (−1,2), and T sends (−1,2) to the second column of T∘S.
T(S(0,1))=[1230][−12]=−1[12]+2[30]=[5−2]
Put both final landing spots into the product matrix TSPlacing those two final landing spots side by side gives the matrix for T∘S, which is the matrix of T times the matrix of S.
Matrix of (T∘S)=second map T[1230]first map S[21−12]=[545−2]
In the grid below, each column of TS is where the second map T sends the matching column of the first map S, showing where (1,0) and (0,1) land after doing S and then T.
Each column of the combined matrix is where the second transformation sends that column of the first matrix, tracking where each starting basis vector lands after both steps.
2
Why Order Matters and Grouping Doesn't
Now that we can find the matrix of a combined map by multiplying, we want to see what happens when we swap the order of two maps, or when we chain three maps in a row.
Why Order Matters and Grouping Doesn't
Let's compare combining a reflection F across the x-axis and a 90∘ counterclockwise rotation R in both orders.
Text solution
Find the matrices for F and R from the basis vectorsReflecting across the x-axis leaves (1,0) fixed and flips (0,1) to (0,−1), while rotating 90∘ counterclockwise sends (1,0) to (0,1) and (0,1) to (−1,0).
F=[100−1],R=[01−10]
Reflect first, then rotate (R∘F)Place the first map F on the right and apply R to each column of F.
RF=[01−10][100−1]=[0110]
Because (1,0) and (0,1) swap places, doing F first and R second is a single reflection across the line y=x.
Rotate first, then reflect (F∘R)Swap the order so R sits on the right and apply F to each column of R.
FR=[100−1][01−10]=[0−1−10]
Sending (1,0) to (0,−1) and (0,1) to (−1,0) is a reflection across the opposite diagonal line y=−x, so RF=FR.
On the grid below, reflecting across the x-axis and then rotating 90∘ counterclockwise reflects every vector x across y=x, while rotating first and reflecting second reflects x across y=−x.
Reflecting across the horizontal axis and rotating 90 degrees counterclockwise acts as a single reflection across the upward diagonal when you reflect first, and across the downward diagonal when you rotate first.
While changing the order of maps can change the outcome, changing how we group three maps in a fixed order does not:
(AB)C=A(BC)
Both sides run the exact same sequence of actions (C first, then B, then A), and moving the parentheses only changes which two adjacent steps we combine into a single matrix first.
3
Maps Between Different Dimensions
So far, every map has taken 2D vectors to 2D vectors, giving a 2×2 square matrix. Now we want to find the matrix size for a map between spaces of different dimensions, and see when two maps of different sizes can be composed.
Maps Between Different Dimensions
Let's find the matrix sizes for a map S from 3D space to 2D space followed by a map T from 2D space to 4D space.
Text solution
Count output coordinates and input basis vectors for each matrixA map needs one column for each starting basis vector in its input space and one row for each coordinate in its output space, making S a 2×3 matrix and T a 4×2 matrix.
Size of SSize of T=2D output2×3D input3,=4D output4×2D input2
Match the middle space to find the size of TSBecause S outputs 2D vectors and T takes 2D inputs, the composition T∘S makes sense, taking 3D inputs at the start and producing 4D outputs at the end.
second map T(4×2)first map S(2×3)=combined map TS4×3
When a question describes two maps in words, write down their matrix sizes in right-to-left multiplication order TS before doing any arithmetic. If the two inner numbers don't match, either the matrices are written in the wrong order or the composition isn't possible.
Key concepts
When you chain linear maps together, read the steps from right to left: doing S first and T second is the composition T∘S, and its matrix is the product TS. To find each column of TS, apply T to the matching column of S, like [1230][21−12]=[545−2]. And if a problem already tells you where S sends (1,0) and (0,1) and where T sends those two landing spots, you don't need the matrix of T because those final spots are already the columns of T∘S.
Because the order sets which map acts first, AB and BA are usually different maps (RF=[0110] reflects across y=x, while FR=[0−1−10] reflects across y=−x). Regrouping (AB)C=A(BC), on the other hand, keeps the order C→B→A the same, so you can combine an easy pair of steps first instead of writing out every matrix. Finally, a map from nD to mD has an m×n matrix (output rows×input columns), and TS only works when the inner numbers match, like (4×2)(2×3)=4×3.
4
Practice
1
The first linear map S has matrix [132−1] and the second linear map T has matrix [2104]. Find the matrix for the combined map T∘S (doing S first, then T).
Watch out: multiplying in the order the matrices are mentioned in the sentence gives ST=[132−1][2104]=[458−4], which does T first and S second.
In T(S(x)), which map acts on x first, and which side of the matrix product does that matrix sit on?
Since S happens first and T happens second, put S on the right and T on the left:
TS=[2104][132−1]
(Watch out: multiplying in the order the matrices are mentioned in the sentence gives ST=[132−1][2104]=[458−4], which does T first and S second.)
Applying T to the first column (1,3) gives 1[21]+3[04]=[213], and applying T to the second column (2,−1) gives 2[21]−1[04]=[4−2], so:
TS=[2134−2]
2
Let F be a reflection across the y-axis and R be a 90∘ counterclockwise rotation. Write the matrices for F and R, find the matrices for R∘F and F∘R, and describe what single geometric map each composition is.
Watch out: using the x-axis reflection matrix [100−1] for F swaps the two products below, giving [0110] for RF and [0−1−10] for FR.
Track where the starting basis vectors (1,0) and (0,1) land under a y-axis reflection to write F, then read off from the columns of RF and FR where each one sends (1,0) and (0,1).
Reflecting across the vertical y-axis flips the horizontal vector (1,0) to (−1,0) and leaves (0,1) on the y-axis unchanged, while rotating 90∘ counterclockwise sends (1,0) to (0,1) and (0,1) to (−1,0):
F=[−1001],R=[01−10]
(Watch out: using the x-axis reflection matrix [100−1] for F swaps the two products below, giving [0110] for RF and [0−1−10] for FR.)
For R∘F (F first, R second):
RF=[01−10][−1001]=[0−1−10]
which sends (1,0) to (0,−1) and (0,1) to (−1,0), a reflection across the line y=−x.
For F∘R (R first, F second):
FR=[−1001][01−10]=[0110]
which swaps (1,0) and (0,1), a reflection across the line y=x.
3
A linear map S takes 2D vectors to 5D vectors, and a linear map T takes 3D vectors to 2D vectors. What size is the matrix for each map? Which composition, T∘S or S∘T, makes sense, and what size is its matrix?
Watch out: writing the sizes as input×output gives 2×5 for S and 3×2 for T, which makes it look like T∘S works with size (3×2)(2×5)=3×5.
Each starting basis vector in the input space gives a column, and each coordinate in the output space gives a row; then check which map's outputs can go into the other map's inputs.
S has 5D outputs and 2D inputs, so S is a 5×2 matrix; T has 2D outputs and 3D inputs, so T is a 2×3 matrix.
(Watch out: writing the sizes as input×output gives 2×5 for S and 3×2 for T, which makes it look like T∘S works with size (3×2)(2×5)=3×5.)
Only S∘T (doing T first, then S) makes sense because T outputs 2D vectors, matching the 2D input space of S (whereas T∘S would try to plug 5D outputs from S into T's 3D input space). The matrix ST has size (5×2)(2×3)=5×3.
4
A linear map S sends (1,0) to (2,−1) and (0,1) to (1,3). A second linear map T sends (2,−1) to (4,0) and (1,3) to (−2,5). Without finding the matrix for T, find the matrix for T∘S and find where T∘S sends the vector (3,2).
Watch out: treating [40−25] as the matrix of T and multiplying it by S=[2−113] gives [10−5−215] and sends (3,2) to (26,15), because (4,0) and (−2,5) are already where T sends the columns of S, not where T sends (1,0) and (0,1).
What do the columns of any linear map's matrix record, and where do (1,0) and (0,1) land after going through S and then T?
Under S followed by T, the first basis vector (1,0) goes to (2,−1) and then straight to (4,0), while the second basis vector (0,1) goes to (1,3) and then straight to (−2,5). Putting those two final landing spots into columns gives:
Matrix of (T∘S)=[40−25]
(Watch out: treating [40−25] as the matrix of T and multiplying it by S=[2−113] gives [10−5−215] and sends (3,2) to (26,15), because (4,0) and (−2,5) are already where T sends the columns of S, not where T sends (1,0) and (0,1).)
Applying T∘S to (3,2) gives:
(T∘S)(3,2)=3[40]+2[−25]=[810]
5
A three-step map reflects across the x-axis (F), then rotates 30∘ counterclockwise (R30), and then rotates 60∘ counterclockwise (R60). Regroup the parentheses to find the single 2×2 matrix for the combined map R60∘(R30∘F) without finding the individual matrices for R30 and R60.
How can you regroup R60(R30F) so that the two rotations combine into a single familiar rotation first?
Regrouping the parentheses gives R60(R30F)=(R60R30)F. Rotating by 30∘ counterclockwise and then by 60∘ counterclockwise combines into a single 90∘ counterclockwise rotation R90=[01−10], and the x-axis reflection is F=[100−1].
(Watch out: multiplying in the left-to-right order of the description gives FR90=[100−1][01−10]=[0−1−10]; since F happens first, F must stay on the right.)