MAT1041 · Week 12 · - Matrices for Linear Transformations
Transformation matrices, transition matrices and similarity
You learn to find the standard matrix of a linear transformation, the matrix of a composition and of an inverse transformation, the matrix of a transformation relative to nonstandard bases, the transition matrix between two bases with the [B' | B] method, and similar matrices (A' = P⁻¹AP).
standard matrixcompositioninverse transformationmatrix relative to basescoordinate matrixtransition matrixchange of basissimilar matricessimilarity transformation
Every linear transformation from Rn to Rm is multiplication by a matrix. But which matrix? The answer depends on the basis you choose. In the standard basis the matrix of a transformation may look complicated; in another basis the same transformation can be diagonal, that is, just “stretching the axes”. This week we learn to find the matrix, to convert coordinates between bases, and the similarity relation that links the matrices of the same transformation in different bases. Next week’s diagonalization is built directly on this.
Golden rules:
The columns of the transformation matrix are the images of the basis vectors.
In a composition the matrix on the right is applied first.
Transition matrix B→B′: turn [B′∣B] into [I∣P] with row operations. The target basis is on the left.
A′=P−1AP, where the columns of P are the vectors of the new basis.
The standard matrix
If T:Rn→Rm is linear, then
A=[T(e1)∣T(e2)∣⋯∣T(en)]
is the m×n matrix that satisfies T(x)=Ax for every x. Why: x=x1e1+⋯+xnen, linearity gives T(x)=x1T(e1)+⋯+xnT(en); and this is the column-combination interpretation of Ax.
Recipe: transform each basis vector, write the result in the coordinates of the target basis, make it a column.
The same for polynomials: the derivative D:P2→P1 relative to the standard bases is [001002]. The coordinates of 5+3x−x2 are (5,3,−1); multiplying gives (3,−2), that is, the derivative 3−2x. We turned calculus into matrix multiplication.
The transition matrix (changing coordinates)
How are the coordinates of the same vector v in two different bases related? Let B and B′ be two bases of Rn. The transition matrix from B to B′P is the matrix that satisfies, for every v,
[v]B′=P[v]B.
Its columns are the coordinates of the vectors of B relative to B′.
Computation: [B′∣B]→[I∣P]. Write the bases as column matrices (the target basis B′ on the left) and apply Gauss-Jordan.
Check: if [v]B=(1,1) then v=(1,2)+(1,3)=(2,5). P(1,1)T=(−3,5) and −3(1,0)+5(1,1)=(2,5). The same vector.
As a formula, P=(B′)−1B (here B and B′ are column matrices). The transition matrix in the opposite direction is P−1=[3−22−1].
PITFALL · mixing up the direction.[B′∣B] gives the transition B→B′; [B∣B′] gives B′→B. Memorize “the target basis on the left”. If you are not sure, check one column: column 1 of P must be the B′-coordinates of the 1st vector of B.
Similar matrices
Let A be the standard matrix of T:Rn→Rn and A′ its matrix relative to the basis B. If P is the matrix whose columns are the vectors of B (the transition from B to the standard basis), then
A′=P−1AP.
The reading order is right to left: convert the B-coordinates to standard (P), apply T in the standard basis (A), convert the result back to B-coordinates (P−1).
Definition. Square matrices A and A′ are similar if there is an invertible P with A′=P−1AP. Similar matrices are photographs of the same transformation in different bases.
Example 4.A=[3012], B={(1,0),(1,−1)}, P=[101−1], P−1=[101−1].
AP=[302−2],A′=P−1(AP)=[3+002−22]=[3002].
In this basis T multiplies the first basis vector by 3 and the second by 2. Direct check: A(1,−1)T=(2,−2)=2(1,−1). Next week we will call these basis vectors eigenvectors.
What similarity preserves
det(P−1AP)=detP−1detAdetP=detA. What is preserved in the same way:
Preserved
Not preserved
determinant, trace, rank
the entries themselves
invertibility
symmetry
characteristic polynomial, eigenvalues
eigenvectors (their coordinates change)
To show matrices are not similar, one differing invariant (trace, det, rank) is enough (Q10). Equal trace and det, however, do not prove similarity.
Common mistakes
Wrong
Right
Writing the T(ei) as rows
Columns
A1A2 for “first T1” in a composition
A2A1
Finding B→B′ with [B∣B′] in the transition matrix
[B′∣B]: target on the left
Making the image a column without converting to coordinates in a nonstandard basis
Write the coordinates [T(vj)]B′
A′=PAP−1
P−1AP (the columns of P are the new basis)
Saying “similar” because trace and det are equal
Necessary, not sufficient
Thinking a 2×3 standard matrix is R2→R3
R3→R2
Test yourself
Exam-style questions. Solve them on paper first, then reveal the answer.
Question 1easy
Find the standard matrix of T(x,y)=(3x−y,x+4y).
Show answer
[31−14]
The columns: T(e1)=T(1,0)=(3,1) and T(e2)=T(0,1)=(−1,4). Shortcut: the coefficients of each component become a row.
Question 2medium
Find the standard matrix of T:R3→R2, T(x,y,z)=(x+y−z,2y+3z).
Show answer
[1012−13]
T(e1)=(1,0), T(e2)=(1,2), T(e3)=(−1,3). Side by side as columns. The size is 2×3: codomain × domain.
Question 3medium
T first reflects a vector in R2 in the x-axis and then rotates it counterclockwise by 90∘. Find the standard matrix of T.
Show answer
[0110]
The reflection is F=[100−1], the rotation R=[01−10]. First F, then R: the matrix is RF (the one on the right is applied first).RF=[0⋅1+(−1)⋅010+10]=[0110]: the result is the reflection about y=x.
Question 4medium
Show that T(x,y)=(2x+y,3x+2y) is invertible and find T−1.
Show answer
T−1(x,y)=(2x−y,−3x+2y)
A=[2312], detA=1=0: invertible.A−1=[2−3−12], that is, T−1(x,y)=(2x−y,−3x+2y). Check: T−1(T(1,0))=T−1(2,3)=(4−3,−6+6)=(1,0).
Question 5medium
Find the matrix of D:P2→P1, D(p)=p′, relative to the standard bases {1,x,x2} and {1,x}.
Show answer
[001002]
The coordinates of the images of the basis vectors become the columns: D(1)=0→(0,0), D(x)=1→(1,0), D(x2)=2x→(0,2). Check: for 5+3x−x2, [001002](5,3,−1)T=(3,−2), that is, 3−2x.
Find the transition matrix from B={(1,1),(0,1)} to B′={(2,1),(1,1)}.
Show answer
[01−12]
[B′∣B]=[21111101].R1←R1−R2: (1,0∣0,−1). R2←R2−R1: (0,1∣1,2). The left is I, the right is PB→B′. Check: column 1 is (0,1): 0(2,1)+1(1,1)=(1,1), the 1st vector of B.
Question 8medium
With B and B′ from the previous question, [v]B=(2,−1). Find [v]B′.
Show answer
(1,0)
[v]B′=P[v]B=[01−12][2−1]=[10]. Check: from B, v=2(1,1)−(0,1)=(2,1); from B′, 1(2,1)+0(1,1)=(2,1). The same vector.
Question 9hard
Let T(x,y)=(4x−2y,x+y) and B={(1,1),(2,1)}. Find the matrix A′ of T relative to B.
Show answer
[2003]
T(1,1)=(2,2)=2(1,1)+0(2,1), T(2,1)=(6,3)=0(1,1)+3(2,1). The coordinates as columns: diag(2,3). With the formula: A=[41−21], P=[1121], A′=P−1AP. The same result. In this basis T only stretches along the axes: next week's diagonalization.
Question 10medium
Are A=[1023] and B=[1002] similar?
Show answer
No
Similar matrices have the same trace. trA=4, trB=3. They can't be similar. (The determinants are different too: 3 and 2.)
Question 11hard
Let T(x,y)=(x+y,x,y). Find the matrix of T relative to B={(1,1),(1,−1)} for R2 and the standard basis for R3.
Show answer
21101−1
In the codomain the basis is the standard one, so the coordinates are the vector itself.T(1,1)=(2,1,1), T(1,−1)=(0,1,−1). These are the columns.
Verification: The standard matrices, composition products, inverse transformations, transition matrices (in two ways: row operations on [B' | B] and B'⁻¹B) and the P⁻¹AP similarity transformations were computed exactly in node with BigInt fractions; the coordinate vectors were checked by recomputing that both bases give the same vector (verify/MAT1041/12.mjs).
Review card
STANDARD MATRIX: A = [T(e1) | T(e2) | ... | T(en)] (images as COLUMNS)
T(x,y) = (ax+by, cx+dy) → [a b; c d] (the coefficients form a ROW)
Composition: first T1 then T2 → the matrix of T2∘T1 is A2·A1 (the RIGHT ONE FIRST).
Inverse transformation: the matrix of T⁻¹ is A⁻¹ (det ≠ 0).
Matrix relative to bases [T]_{B',B}: column j = [T(v_j)]_{B'}.
[T(v)]_{B'} = [T]_{B',B} [v]_B
TRANSITION MATRIX B → B': [B' | B] → row operations → [I | P]. P = (B')⁻¹B.
[v]_{B'} = P [v]_B. In the direction B' → B: P⁻¹.
Standard → B: [B | I] → [I | B⁻¹].
SIMILARITY: A' = P⁻¹AP, P = the vectors of B as COLUMNS (the transition B → standard).
A: in the standard basis, A': in the basis B.
Similar matrices have the SAME: det, trace, rank, characteristic polynomial, eigenvalues.
Different trace or det → NOT similar.