4.5.28Linear Algebra (Full)
Matrix representation of linear transformations
1,746 words8 min readdifficulty · medium
WHAT is being represented?
WHY does a basis pin down ? Take any with basis . Then for unique coordinates . By linearity: So if you know the vectors , you know on all of . That finite data is exactly what the matrix stores.
HOW to build the matrix (derivation from scratch)
Let be a basis of and a basis of .
Step 1. Apply to each basis vector . The output lives in , so write it in the -basis: Why this step? Coordinates only exist relative to a basis; we must express the output in .
Step 2. Collect these coordinates as the -th column of a matrix: Why columns, not rows? So that matrix-times-coordinate-vector reproduces (next step).
Derivation of the boxed formula. Let . Then
= \sum_i \Big(\underbrace{\textstyle\sum_j a_{ij} x_j}_{i\text{-th coord of output}}\Big) c_i.$$ The bracket is exactly row $i$ of $A$ dotted with $x$ — i.e. $(Ax)_i$. Hence $[T(v)]_C = A[v]_B$. $\blacksquare$ --- ## Worked Examples > [!example] 1. Rotation by $90°$ in $\mathbb{R}^2$ (standard basis) > $T$ rotates vectors $90°$ counterclockwise. Basis $e_1=(1,0)$, $e_2=(0,1)$. > - $T(e_1) = (0,1)$ → first column $\binom{0}{1}$. *Why?* $(1,0)$ rotated 90° points up. > - $T(e_2) = (-1,0)$ → second column $\binom{-1}{0}$. > $$[T] = \begin{pmatrix} 0 & -1 \\ 1 & 0\end{pmatrix}.$$ > Check: $T(3,2) = [T]\binom{3}{2} = \binom{-2}{3}$, which is $(3,2)$ rotated 90°. ✓ > [!example] 2. Derivative on polynomials $P_2 \to P_1$ > $T = \dfrac{d}{dx}$, domain basis $B=\{1,x,x^2\}$, codomain basis $C=\{1,x\}$. > - $T(1)=0 = 0\cdot1 + 0\cdot x$ → column $\binom{0}{0}$. *Why?* derivative of a constant is 0. > - $T(x)=1 = 1\cdot 1 + 0\cdot x$ → column $\binom{1}{0}$. > - $T(x^2)=2x = 0\cdot 1 + 2\cdot x$ → column $\binom{0}{2}$. > $$[T]_C^B = \begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & 2\end{pmatrix}.$$ > Test on $p=4+5x+6x^2$: $[p]_B=(4,5,6)^\top$, $[T]_C^B[p]_B = (5,12)^\top$, meaning > $5 + 12x$. And indeed $p'=5+12x$. ✓ *Why $2\times3$?* $\dim P_1=2$ rows, $\dim P_2=3$ cols. > [!example] 3. Same map, DIFFERENT basis changes the matrix > Rotation map but with basis $B'=\{(1,1),(1,-1)\}$ for both in/out. > $T(1,1)=(-1,1)$. Solve $(-1,1)=a(1,1)+b(1,-1)$: $a=0,\ b=-1$. → column $\binom{0}{-1}$. > $T(1,-1)=(1,1)$. Solve: $a=1,b=0$. → column $\binom{1}{0}$. > $$[T]_{B'} = \begin{pmatrix} 0 & 1 \\ -1 & 0\end{pmatrix} \ne \begin{pmatrix}0&-1\\1&0\end{pmatrix}.$$ > *Why this matters:* the transformation is the same, but its matrix **depends on basis choice**. --- ## Forecast-then-Verify > [!recall] Predict before computing > Let $T:\mathbb{R}^3\to\mathbb{R}^2$, $T(x,y,z)=(x+z,\ y-x)$, standard bases. > **Forecast the matrix size and entries before reading on.** > > Size: $2\times 3$. Columns are $T(e_1),T(e_2),T(e_3)$: > $T(e_1)=(1,-1),\ T(e_2)=(0,1),\ T(e_3)=(1,0)$. > $$[T]=\begin{pmatrix} 1 & 0 & 1 \\ -1 & 1 & 0\end{pmatrix}.$$ > Verify: $[T](2,3,4)^\top=(6,1)^\top$, and $T(2,3,4)=(2+4,\,3-2)=(6,1)$. ✓ --- ## Composition = Matrix Multiplication **WHY does matrix multiplication look so weird?** It is *defined* so that the matrix of a composition equals the product of matrices. If $S:U\to V$ and $T:V\to W$, then $$[T\circ S]_{D}^{B} = [T]_D^C \,[S]_C^B.$$ *Derivation:* $[T(S(u))]_D = [T]_D^C [S(u)]_C = [T]_D^C ([S]_C^B [u]_B)$, and associativity groups these into one matrix. The "row times column" rule is the price of consistency. --- ## Common Mistakes > [!mistake] Putting $T(b_j)$ in rows instead of columns > **Why it feels right:** we read left-to-right, so listing outputs in a row seems natural. > **The fix:** the formula $[T(v)]_C = A[v]_B$ forces $T(b_j)$ to be the $j$-th **column**, > because $A e_j$ picks out column $j$. Using rows gives the transpose $A^\top$ — a different map. > [!mistake] Forgetting to express the output in the codomain basis $C$ > **Why it feels right:** in the standard basis $T(b_j)$ already *looks like* its coordinates. > **The fix:** when $C$ is non-standard you MUST solve $T(b_j)=\sum a_{ij} c_i$ for the $a_{ij}$. > Example 3 shows the answer changes completely if you skip this. > [!mistake] Assuming the matrix is unique > **Why it feels right:** a map seems like "one thing." **Fix:** the matrix depends on BOTH > chosen bases. Same $T$ + different bases = similar/equivalent but different matrices. --- > [!mnemonic] Remember the recipe > **"Columns Catch Outputs in $C$"** — each **C**olumn **C**atches where a basis vector goes, > written in the **C**odomain basis $C$. > [!recall]- Feynman: explain to a 12-year-old > Imagine a machine that stretches and turns arrows. You can't watch every possible arrow. > But every arrow is made by mixing a few special "ingredient arrows." So you only test the > machine on those few ingredients and write down where each one goes in a little table. To > find where ANY arrow goes, just look up the ingredients in your table and mix the results > the same way. That table is the matrix! --- ## #flashcards/maths What completely determines a linear transformation? ::: Its action on a basis of the domain (where each basis vector maps to). Why are basis vectors enough to define $T$? ::: Every $v$ is a unique combination $\sum x_i b_i$, and linearity gives $T(v)=\sum x_i T(b_i)$. What goes in the $j$-th column of $[T]_C^B$? ::: The coordinates of $T(b_j)$ expressed in the codomain basis $C$. State the fundamental relationship for a matrix representation. ::: $[T(v)]_C = [T]_C^B \,[v]_B$. For $T:V\to W$ with $\dim V=n,\dim W=m$, what is the matrix size? ::: $m \times n$ (rows = $\dim W$, columns = $\dim V$). Why does the matrix of $T$ change when you change basis? ::: Coordinates are basis-dependent, so the bookkeeping table changes even though $T$ is the same. Matrix of composition $T\circ S$? ::: $[T\circ S]_D^B = [T]_D^C\,[S]_C^B$ (matrix multiplication). Matrix of $d/dx$ on $\{1,x,x^2\}\to\{1,x\}$? ::: $\begin{pmatrix}0&1&0\\0&0&2\end{pmatrix}$. Common error: listing $T(b_j)$ in rows gives what? ::: The transpose $A^\top$, representing a different map. --- ## Connections - [[Change of basis]] — how $[T]$ transforms under new bases ($P^{-1}AP$). - [[Composition of linear maps]] — why matrix multiplication is defined as it is. - [[Coordinate vectors and bases]] — the $[v]_B$ notion this all rests on. - [[Rank and nullity]] — read off from the matrix representation. - [[Eigenvalues and diagonalization]] — choosing a basis that simplifies $[T]$. - [[Kernel and image]] — null space and column space of $[T]_C^B$. ## 🖼️ Concept Map ```mermaid flowchart TD T[Linear transformation T V to W] LIN[Linearity axioms] BV[Action on basis vectors] BASISV[Basis B of V] BASISW[Basis C of W] COORD[Unique coordinates of v] COL[Columns store T of b_j in C] MAT[Matrix representation] FORMULA[Output coords = matrix times input coords] EX[Examples rotation and derivative] T -->|satisfies| LIN LIN -->|implies| BV BASISV -->|gives| COORD COORD -->|expand v then apply T| BV BV -->|express in| BASISW BASISW -->|coords become| COL COL -->|assembled into| MAT MAT -->|yields| FORMULA FORMULA -->|verified by| EX MAT -->|size m by n from| BASISV ``` ## 🔊 Hinglish (regional understanding) > [!intuition]- Hinglish mein samjho > Dekho, ek linear transformation $T$ ek aisi machine hai jo vectors ko leke naye vectors > deti hai, lekin addition aur scaling ko respect karti hai. Problem ye hai ki infinite > vectors hote hain — har ek ko test karna impossible hai. Magic ye hai: agar tum sirf > **basis vectors** par $T$ ka effect jaan lo, to baaki sab vectors ke liye answer > automatically nikal aata hai, kyunki har vector basis ka combination hota hai aur linearity > combination ko preserve karti hai. > > Matrix banane ka tarika bilkul simple hai: har basis vector $b_j$ par $T$ lagao, output > ko **codomain basis $C$** mein likho, aur uske coordinates ko matrix ke $j$-th **column** > mein daal do. Bas! Yahi reason hai ki formula $[T(v)]_C = [T]\,[v]_B$ kaam karta hai — > matrix ko input ke coordinates se multiply karo, output ke coordinates mil jaate hain. > > Ek important baat: matrix **basis par depend karta hai**. Same transformation, alag basis > choose karo, to matrix alag aa jaayega (Example 3 dekho). Isliye "the matrix of $T$" kehna > galat hai — hamesha "matrix with respect to bases $B$ and $C$" bolo. Aur sabse common galti: > log $T(b_j)$ ko row mein daal dete hain — usse transpose aa jaata hai, ekdam galat map. > Yaad rakho mnemonic: **Columns Catch Outputs** — har column ek basis vector ka output catch > karta hai, $C$ basis mein. Yeh concept aage change-of-basis, composition aur > diagonalization sab ki neev hai. ![[audio/4.5.28-Matrix-representation-of-linear-transformations.mp3]]