← SciSim / Mathematics

Linear Transformations & Matrix Representation

Kernel, image, rank-nullity -- rotation, shear, projection, reflection visualized with grid morphing.
🎓 Tier: Standard Undergraduate -- Linear Algebra

📊 Section 1 -- Interactive Simulation

det(A)
--
rank
--
nullity
--
dim Im
--
tr(A)
--
Invertible?
--

Controls

Transformation

Display

💡 Section 2 -- The Idea, Step by Step

Every photo app that rotates a picture, stretches it wider, or skews it into a slant is quietly doing one job: it sends each point of the image to a new point by following a single fixed rule. When that rule keeps grid lines straight and evenly spaced -- never bending them, never lifting the corner pinned at the origin -- we call it a linear transformation, and a small block of numbers called a matrix stores the entire rule.

Start -- the everyday picture

Picture a sheet of graph paper. A linear transformation restretches and spins that whole sheet so the lines stay straight, stay parallel, and the point $(0,0)$ never moves. You may squash it, rotate it, or slide the top sideways into a lean -- all allowed. The one thing you may never do is curve a line. Because the grid stays so orderly, you only need to know where two starter arrows go -- one step east and one step north -- and that already tells you where every other point lands.

Build -- naming the pieces

Call those starter arrows $e_1=(1,0)$ and $e_2=(0,1)$. Wherever they land become the two columns of the matrix $A=\begin{pmatrix}a&b\\c&d\end{pmatrix}$: the first column is $T(e_1)$, the second is $T(e_2)$. To move any point you take $x$ copies of the first column plus $y$ copies of the second, so $T(x,y)=(ax+by,\;cx+dy)$. Try a quarter turn, where the east arrow swings up to $(0,1)$ and the north arrow swings to $(-1,0)$: then $A=\begin{pmatrix}0&-1\\1&0\end{pmatrix}$ and the point $(2,0)$ becomes $(0,2)$ -- spun exactly $90^\circ$.

Deepen -- the precise statement

Formally $T$ is linear when $T(au+bv)=aT(u)+bT(v)$ for all vectors $u,v$ and numbers $a,b$; equivalently $T(\mathbf{x})=A\mathbf{x}$. The number $\det A=ad-bc$ measures how much area is scaled, and its sign tells you whether orientation flips. When $\det A=0$ the sheet collapses onto a line (or a point): the map is no longer reversible, its image shrinks to a smaller space, and the directions crushed to zero form the kernel. The rank-nullity theorem balances the books: $\dim(\ker)+\operatorname{rank}=2$. In the sim the sliders $a_{11},a_{12},a_{21},a_{22}$ are exactly the four entries of $A$, and the interpolation slider $t$ morphs smoothly from the identity ($t=0$) to the full transformation ($t=1$).

Try this in the sim above

Choose the "Projection onto x-axis" preset and watch det read $0$, rank drop to $1$, and the gold grid flatten onto a single line -- that crushed direction is the kernel. Then switch to "Rotation 45 deg": the determinant returns to $1$ because a rotation preserves area, and the grid spins without stretching. Finally drag $a_{11}$ and $a_{22}$ upward together while keeping $a_{12}=a_{21}=0$: you build a pure scaling, and the determinant grows as the squares of the grid swell.

📐 Section 3 -- Linear Transformations

Rank-Nullity Theorem

For $T:V\to W$ linear: $\dim V=\text{rank}(T)+\text{nullity}(T)$, i.e., $n=\dim(\text{Im}\,T)+\dim(\ker T)$.

ConceptDefinitionExample
Linear map$T(u+v)=Tu+Tv$, $T(cu)=cTu$Rotation, projection
Kernel$\ker T=\{v:Tv=0\}$Null space of matrix
Image$\text{Im}\,T=\{Tv:v\in V\}$Column space
Rank$\dim(\text{Im}\,T)$Number of pivot columns
Nullity$\dim(\ker T)$$n-\text{rank}$
Step 1 -- Matrix Representation

Choose bases $B$ for $V$ and $C$ for $W$. The matrix $[T]_{CB}$ has $j$-th column $[T(b_j)]_C$. Key: $[Tv]_C=[T]_{CB}[v]_B$. Different bases give similar matrices.

Step 2 -- Proof of Rank-Nullity

Let $\{w_1,\ldots,w_k\}$ be basis of $\ker T$. Extend to basis of $V$ by adding $v_1,\ldots,v_r$. Show $\{Tv_1,\ldots,Tv_r\}$ basis of $\text{Im}\,T$ (spanning + LI). So $\text{rank}=r=n-k$.

Step 3 -- Projection onto x-axis

$P(x,y)=(x,0)$. Matrix: $\begin{pmatrix}1&0\\0&0\end{pmatrix}$. $\ker P=\{(0,y)\}$ (y-axis), dim=1. $\text{Im}\,P=\{(x,0)\}$ (x-axis), dim=1. Rank-nullity: $2=1+1$ ✓. Also $P^2=P$ (idempotent).

Step 4 -- Change of Basis

If $T$ has matrix $A$ in standard basis, new basis $P$: matrix $P^{-1}AP$. Diagonalization: find eigenvector basis so $P^{-1}AP=D$ diagonal. Similar matrices share rank, eigenvalues, trace, determinant.

Step 5 -- Invertibility

$T$ invertible iff $\ker T=\{0\}$ (injective) iff $\text{Im}\,T=W$ (surjective, when $\dim V=\dim W$). Equivalently: $\det A\neq0$.

Step 6 -- Row rank = Column rank

The rank of $A$ equals the rank of $A^T$. Row operations do not change row space. The number of pivots = column rank = row rank. Proven via row reduction.

Reference: Axler -- LADR, Ch.3; Strang -- Introduction to Linear Algebra §3; MIT OCW 18.06.

❓ Section 4 -- FAQ

🧮Conceptual  What makes a map linear?

Two properties: T(u+v)=T(u)+T(v) and T(cu)=cT(u). Equivalently: T(au+bv)=aT(u)+bT(v). All matrix multiplications are linear. Translations T(v)=v+b are NOT linear (T(0)=b nonzero).

Key takeaway: Linear = preserves addition and scaling. Translations are not linear.
🔬Simulation  What does the grid transform show?

Blue grid = original coordinate grid. Gold grid = image under T. Basis vectors e1=(1,0) and e2=(0,1) map to the first and second columns of A. The interpolation slider shows T smoothly morphing from identity to A.

Key takeaway: Transformed grid = where every point goes under T. Column j of A = where ej lands.
🌍Applied  Where are linear transformations used?

3D computer graphics: rotation, scaling, projection matrices. PCA: eigenvectors of covariance matrix. Neural networks: each layer is a linear map followed by nonlinearity. Quantum mechanics: observables are self-adjoint operators. Differential equations: d/dx is a linear operator.

Key takeaway: 3D graphics, PCA, neural nets, quantum mechanics, ODEs -- all use linear transformations.
💡Non-Obvious  A map from R^n to R^n can fail to be surjective?

Yes. Projection P onto x-axis: maps R^2 to R^2 but image is only the x-axis (1D). Rank = 1 < 2 = dim R^2. A map from R^n to R^n is bijective iff injective iff surjective iff det nonzero. But in general, rank can be anything from 0 to min(m,n).

Key takeaway: For R^n to R^n: bijective iff injective iff surjective iff det nonzero. Otherwise rank < n.
📐Computational  Find rank and nullity of A=[[1,2,3],[4,5,6],[7,8,9]].

Row reduce: R2-=4R1, R3-=7R1: [[1,2,3],[0,-3,-6],[0,-6,-12]]. R3-=2R2: [[1,2,3],[0,-3,-6],[0,0,0]]. Two pivots. Rank=2, nullity=1. Column 3 = 2*column2 - column1 (the columns rise in equal steps). Rank-nullity: 3=2+1.

Key takeaway: Row reduce: 2 pivots -> rank=2, nullity=1. Third column = twice the second minus the first.
🎓Deep  What is the connection to category theory?

Linear maps are the morphisms in the category Vect_k. Invertible linear maps are isomorphisms. Hom(V,W) is itself a vector space of dimension dim(V)*dim(W). End(V) = Hom(V,V) forms a ring under composition. Representation theory studies group homomorphisms into GL(V).

Key takeaway: Linear maps = morphisms in Vect. End(V) forms a ring. Representation theory = groups into GL(V).
Best resources: 3Blue1Brown -- Essence of Linear Algebra; MIT OCW 18.06; Axler LADR.

⚠️ Section 5 -- Misconceptions

A · Conceptual Misconceptions
❌ Misconception: T(0) can be nonzero for a linear map.✅ Correction: T(0)=T(0*v)=0*T(v)=0. Always. Translation T(v)=v+b has T(0)=b nonzero -- NOT linear.🔍 Students confuse linear maps with affine maps.📖 Axler §3.A.
❌ Misconception: rank(A+B) = rank(A) + rank(B).✅ Correction: Rank is NOT additive. Example: A=diag(1,0), B=diag(-1,0): rank(A)=rank(B)=1 but rank(A+B)=0.🔍 Students assume rank behaves like a linear functional.📖 Strang §3.
❌ Misconception: Null space and column space are orthogonal complements.✅ Correction: Left null space (null of A^T) is orthogonal to column space. Null space of A is orthogonal to ROW space of A. These are the four fundamental subspaces.🔍 Students confuse which of the four fundamental subspaces are orthogonal.📖 Strang §4.
B · Common Procedural Errors
❌ Error: Finding kernel by solving Ax=b instead of Ax=0.✅ Correct: Kernel = solutions of Ax=0 (homogeneous system). For particular solutions solve Ax=b, but that is not the kernel.🔍 Students solve the wrong system.📖 Strang §3.1.
❌ Error: Rank-nullity: rank + nullity = dim(W).✅ Correct: rank + nullity = dim(DOMAIN V), not dim(codomain W).🔍 Students use codomain dimension instead of domain.📖 Axler §3.C.
❌ Error: Checking linearity: only T(u+v)=T(u)+T(v), forgetting T(cu)=cT(u).✅ Correct: Both conditions required. Example: T(x,y)=(|x|,|y|) -- T((-1,0)+(-1,0)) = T((-2,0)) = (2,0) but T(-1,0)+T(-1,0)=(2,0). Actually works here. Better counterexample: T(x)=|x| fails T(cx)=cT(x) for c=-1.🔍 Students check only additivity, missing homogeneity.📖 Axler §3.A.
Education research: Dorier -- On the Teaching of Linear Algebra, Springer (2000).