Matrix Representation of Linear Transformations
2252 words
11 min read
Visual companion
Python
Type and operator map
Python Week 1: the first filter for runtime behavior
View
Revision summary
What this note is really saying
Short form
# Matrix Representation of Linear Transformations ## 🎯 Learning Objectives After this topic you will be able to: - Find the matrix of a linear transformation relative to given ordered bases - Compute the image of a vector using the matrix representation - Understand how the matrix changes when bases change - Comput...

Matrix Representation of Linear Transformations
🎯 Learning Objectives
After this topic you will be able to:
- Find the matrix of a linear transformation relative to given ordered bases
- Compute the image of a vector using the matrix representation
- Understand how the matrix changes when bases change
- Compute change-of-basis matrices
- Determine transition matrices between bases
📋 Prerequisites
- Linear Transformations (Week 5) — definition and properties
- Basis & Dimension (Week 4) — coordinates relative to a basis
- Matrix Multiplication (Week 1) — matrices as linear maps
1. Intuition: Translating Between Languages
A linear transformation T:V→W is an abstract map. To compute with it, we need to translate it into a matrix. But matrices are defined on Rn, not on abstract vector spaces like P2.
The solution: choose bases. A basis lets us:
- Represent any vector v∈V by its coordinate vector [v]B∈Rn
- Represent T by a matrix M so that [T(v)]C=M[v]B (Diagram)
2. Coordinates Relative to a Basis
2.1 Definition
If B={b1,…,bn} is an ordered basis of V, then every v∈V has a unique representation:
The coordinate vector of v relative to B is:
>⎩⎨⎧c1+c2=3−c1+c2=1c3=2⇒c1=1,c2=2,c3=2>Example 1: CoordinatesB={1−x,1+x,x2} is a basis for P2.For p(x)=3+x+2x2, find [p]B.Solve c1(1−x)+c2(1+x)+c3x2=3+x+2x2. Group: (c1+c2)+(−c1+c2)x+c3x2=3+x+2x2.
>[p]B=122>
.
3. Matrix of a Linear Transformation
>[T]C←B=∣[T(b1)]C∣∣[T(b2)]C∣…∣[T(bn)]C∣>Definition (Matrix of T). Let T:V→W be linear, B={b1,…,bn} an ordered basis of V, and C={c1,…,cm} an ordered basis of W. The matrix of T relative to B and C is:
It satisfies: [T(v)]C=[T]C←B[v]B.
3.1 Algorithm
- Compute T(bj) for each basis vector bj of V
- Express T(bj) in the basis C of W to get [T(bj)]C
- These coordinate vectors become the columns of [T]C←B
>T(1)=0=0⋅1+0⋅x⇒[T(1)]C=[00]>Example 2: Matrix of a transformationT:P2→P1, T(p)=p′ (derivative). B={1,x,x2} (basis for P2) C={1,x} (basis for P1)
>T(x)=1=1⋅1+0⋅x⇒[T(x)]C=[10]>
>T(x2)=2x=0⋅1+2⋅x⇒[T(x2)]C=[02]>
>[T]C←B=[001002]>
>[T][p]B=[b2c]>Check: For p(x)=a+bx+cx2, p′(x)=b+2cx. [p]B=(a,b,c)T.
>[T]C←B=[21−1301]>= [p′]C ✓ Example 3: Standard matrix = matrix relative to standard basesT:R3→R2, T(x,y,z)=(2x−y,x+3y+z). Using standard bases B={e1,e2,e3}, C={e1,e2}:
(the standard matrix we found in Week 5).
4. Change of Basis
4.1 Change-of-Basis Matrix
If we have two bases B and B′ of the same space V, how are coordinates related?
>PB′←B=∣[b1]B′∣∣[b2]B′∣…∣[bn]B′∣>Definition (Change-of-Basis Matrix). The change-of-basis matrix from B to B′ is:
>{c1+3c2=12c1+4c2=0⇒c1=−2,c2=1>It satisfies: [v]B′=PB′←B[v]B. Key fact: PB′←B=(PB←B′)−1. Example 4: Change of basis in ℝ²Standard basis S={e1,e2}, new basis B={(1,2),(3,4)}. Find PB←S (from standard to B).e1=(1,0) in B: solve c1(1,2)+c2(3,4)=(1,0).
>[e1]B=[−21]>So
>[e2]B=[3/2−1/2]>.Similarly, e2=(0,1) in B: solve c1(1,2)+c2(3,4)=(0,1). c1=23,c2=−21.
>PB←S=[−213/2−1/2]>.
.
4.2 Effect on the Matrix of a Transformation
If T:V→W has matrix [T]C←B relative to bases B,C, and we change to bases B′,C′, then:
where PC′←C is the change-of-basis in W and PB←B′ is the change-of-basis in V.
Special case: T:V→V (operator) with B=B′ and C=C′=B′:
where P=PB′←B. This is called a similarity transformation (Week 7).
5. Edge Cases & Gotchas
| Situation | What Happens |
|---|---|
| Same basis for domain and codomain | [T]B=[T]B←B is a square matrix |
| Standard basis | Makes everything simpler — coordinates are just the vector itself |
| ** V=W but different bases** | [T]B′←B is possible |
6. Common Pitfalls
❌ Pitfall 1: Wrong order in [T]C←B
The notation means "from B to C". [T(v)]C=[T]C←B[v]B.
❌ Pitfall 2: Confusing change-of-basis direction
PB′←B converts from B to B′. It's PB′←B[v]B=[v]B′.
❌ Pitfall 3: Forgetting to convert the output basis
After computing [T][v]B, the result is [T(v)]C, not T(v) directly. Convert back using basis C.
7. Formula Summary Table
| Concept | Formula |
|---|---|
| **Matrix of T ** | [T]C←B=[[T(b1)]C…[T(bn)]C] |
| Coordinate transformation | [T(v)]C=[T]C←B[v]B |
| Change-of-basis | PB′←B=[[b1]B′…[bn]B′] |
| Inverse relationship | PB←B′=(PB′←B)−1 |
| **Change of bases for T ** | [T]C′←B′=PC′←C[T]C←BPB←B′ |
8. 📝 Practice Questions
>[T]C←B=[37−1−1]>Q1: Matrix relative to non-standard basesT:R2→R2, T(x,y)=(x+2y,3x+4y). B={(1,1),(1,−1)}, C={(1,0),(0,1)}. Find [T]C←B.Solution: T(1,1)=(3,7), [T(1,1)]C=(3,7) (standard basis). T(1,−1)=(−1,−1), [T(1,−1)]C=(−1,−1).
>[T]C←B=[001012]>. Q2: Matrix of a derivative operator with different basesT:P2→P1, T(p)=p′. B={1,1+x,x+x2}, C={1,x}. Find [T]C←B.Solution: T(1)=0, [T(1)]C=(0,0). T(1+x)=1, [T(1+x)]C=(1,0). T(x+x2)=1+2x, [T(x+x2)]C=(1,2).
>PB←S=100−1100−11>. Q3: Change of basisFind PB←S where B={(1,0,0),(1,1,0),(1,1,1)}, S = standard basis.Solution: e1=1⋅(1,0,0), so [e1]B=(1,0,0). e2=−(1,0,0)+1⋅(1,1,0), so [e2]B=(−1,1,0). e3=0⋅(1,0,0)+(−1)(1,1,0)+1⋅(1,1,1), so [e3]B=(0,−1,1).
>[(2,3)]B=[2.5−0.5]>. Q4: Using the matrix to computeUsing [T]C←B from Q1, find T(2,3).Solution: Find [(2,3)]B: solve c1(1,1)+c2(1,−1)=(2,3) ⇒ c1+c2=2, c1−c2=3 ⇒ c1=2.5, c2=−0.5.
>[T(2,3)]C=[T]C←B[(2,3)]B=[37−1−1][2.5−0.5]=[7.5+0.517.5+0.5]=[818]>.
>A=[1324]>.T(2,3)=(8,18) (in standard coordinates). Check directly: T(2,3)=(2+6,6+12)=(8,18) ✓ Q5: Similarity transformationT:R2→R2 has matrix
>P=[111−1]>in standard basis. Find [T]B for B={(1,1),(1,−1)}.Solution: [T]B=P−1AP where P=PB←S.
>P−1=−21[−1−1−11]=[1/21/21/2−1/2]>(columns are basis vectors).
>[T]B=P−1AP=[1/21/21/2−1/2][1324][111−1]>.
>=[2−13−1][111−1]=[5−2−10]>
>[(1,0)]B′=[2/3−1/3]>. Q6: Finding transition matrixB={(1,0),(1,1)}, B′={(2,1),(1,2)}. Find PB′←B.Solution: For each vector in B, find coordinates in B′.(1,0)=c1(2,1)+c2(1,2): 2c1+c2=1, c1+2c2=0 ⇒ c2=−31, c1=32.
>[(1,1)]B′=[1/31/3]>.(1,1)=c1(2,1)+c2(1,2): 2c1+c2=1, c1+2c2=1 ⇒ c1=31, c2=31.
>PB′←B=[2/3−1/31/31/3]>.
>[T]B=100010010>. Q7: Matrix of identityWhat is [I]C←B where I:V→V is the identity map?Solution: I(bj)=bj. So [I]C←B has columns [bj]C. This is exactly the change-of-basis matrix PC←B! Q8: CompositionT:V→W, S:W→U are linear. Prove [S∘T]D←B=[S]D←C[T]C←B.Proof: For any v∈V: [(S∘T)(v)]D=[S(T(v))]D=[S]D←C[T(v)]C=[S]D←C[T]C←B[v]B.So [S∘T]D←B=[S]D←C[T]C←B. ✓ Q9: Matrix of a projectionT:R3→R3, T(x,y,z)=(x,y,0). Find [T]B where B={(1,0,0),(1,1,0),(1,1,1)}.Solution: T(1,0,0)=(1,0,0). In B: solve (1,0,0)=c1(1,0,0)+c2(1,1,0)+c3(1,1,1) ⇒ c1=1, c2=0, c3=0. [T(1,0,0)]B=(1,0,0).T(1,1,0)=(1,1,0) = 0(1,0,0)+1(1,1,0)+0(1,1,1). [(1,1,0)]B=(0,1,0).T(1,1,1)=(1,1,0) = 0(1,0,0)+1(1,1,0)+0(1,1,1). [(1,1,1)]B=(0,1,0).
>[T]C←B=[1324]>. Q10: Going back and forthIf
>[v]B=[56]>and
>[T(v)]C=[T]C←B[v]B=[1324][56]=[1739]>, find [T(v)]C.Solution:
.
🔗 Cross-References
- Next topic: Equivalent & Similar Matrices
- Week 7 (Similarity): A and P−1AP represent the same operator in different bases
- Week 8 (Orthogonal Transformations): Orthogonal matrices represent rotations/reflections
- BSCS3004 (Deep Learning): Weight matrices in neural networks are linear transformations between feature spaces Join Discord Previous6.1 Kernel & ImageNext7.1 Equivalent & Similar Matrices