3  Linear transformations and matrix representations

3.1 Linearity, kernel and image

A map \(T:V\to W\) between vector spaces over the same field is linear if \[T(\alpha u+\beta v)=\alpha T(u)+\beta T(v)\] for all \(u,v\in V\) and \(\alpha,\beta\in\mathbb F\). It necessarily sends \(0\) to \(0\). A map \(x\mapsto Ax+b\) is linear precisely when \(b=0\); otherwise it is affine.

The kernel is \(\ker T=\{v:T(v)=0\}\), a subspace of the domain. The image is \(\operatorname{im}T=\{T(v):v\in V\}\), a subspace of the codomain. Linearity proves their closure. A linear map is injective exactly when \(\ker T=\{0\}\): equality of two outputs is equivalent to their difference lying in the kernel. It is surjective exactly when its image is all of \(W\).

3.2 Matrices relative to bases

Let \(B=(b_1,\ldots,b_n)\) be a basis of \(V\) and \(C=(c_1,\ldots,c_m)\) a basis of \(W\). The matrix of \(T\) relative to these bases is \[[T]_{C\leftarrow B}=\begin{bmatrix}[T(b_1)]_C&\cdots&[T(b_n)]_C\end{bmatrix}.\] Then \([T(v)]_C=[T]_{C\leftarrow B}[v]_B\). This follows by expanding \(v\) in \(B\) and using linearity. A linear map is uniquely determined by its values on a basis; any assigned images of those basis vectors extend uniquely to a linear map.

3.2.1 Worked example: differentiation as a matrix

The derivative map \(D:\mathcal P_2\to\mathcal P_1\) is linear. With \(B=(1,x,x^2)\) and \(C=(1,x)\), \[[D]_{C\leftarrow B}=\begin{pmatrix}0&1&0\\0&0&2\end{pmatrix}.\] The columns come from \(D(1)=0\), \(D(x)=1\) and \(D(x^2)=2x\). Multiplication gives \[\begin{pmatrix}0&1&0\\0&0&2\end{pmatrix}\begin{pmatrix}2\\-1\\3\end{pmatrix} =\begin{pmatrix}-1\\6\end{pmatrix},\] which represents \(D(2-x+3x^2)=-1+6x\). The kernel consists of constant polynomials, with dimension \(1\); the image is all of \(\mathcal P_1\), with dimension \(2\). This is an algebraic counterpart of the derivative.

3.3 Rank-nullity theorem

Theorem. If \(V\) is finite-dimensional and \(T:V\to W\) is linear, then \[\dim V=\dim\ker T+\dim\operatorname{im}T.\] The two dimensions on the right are the nullity and rank of \(T\). The codomain need not be finite-dimensional, but the image is, since images of a finite basis span it.

Proof. Choose a basis \(k_1,\ldots,k_r\) of the kernel and extend it to a basis \(k_1,\ldots,k_r,v_1,\ldots,v_s\) of \(V\). Every output is a combination of \(T(v_1),\ldots,T(v_s)\) because \(T(k_i)=0\). If \(\sum_j a_jT(v_j)=0\), then \(\sum_j a_jv_j\) lies in the kernel and can be expressed with the \(k_i\). Independence of the extended basis forces every \(a_j=0\). Thus the \(s\) images form a basis of the image and \(\dim V=r+s\).

For a matrix \(A\in\mathbb F^{m\times n}\), this proves the count from elimination: \(n=\dim\ker A+\operatorname{rank}(A)\). For maps between two finite-dimensional spaces of the same dimension, injectivity, surjectivity and invertibility are equivalent. Equal dimensions are essential: differentiation above is surjective but not injective.

3.4 Composition and change of basis

For \(T:V\to W\) and \(S:W\to U\), with compatible bases \(B,C,E\), \[[S\circ T]_{E\leftarrow B}=[S]_{E\leftarrow C}[T]_{C\leftarrow B}.\] The rightmost map acts first. The inner dimensions match the dimension of \(W\).

Let \(T:\mathbb R^n\to\mathbb R^n\) have standard matrix \(A\). If the columns of an invertible matrix \(P\) are a new basis \(B\), then \(v=P[v]_B\) and \[[T]_B=P^{-1}AP.\] For different domain and codomain bases with standard-coordinate column matrices \(P\) and \(Q\), respectively, the representation is \(Q^{-1}AP\).

3.4.1 Worked example: the same map in another basis

Take \(A=\begin{pmatrix}2&0\\0&3\end{pmatrix}\) and \(B=((1,1),(1,-1))\), so \(P=\begin{pmatrix}1&1\\1&-1\end{pmatrix}\) and \(P^{-1}=\tfrac12\begin{pmatrix}1&1\\1&-1\end{pmatrix}\). Then \[[T]_B=P^{-1}AP=\begin{pmatrix}5/2&-1/2\\-1/2&5/2\end{pmatrix}.\] Check the first column: \(T(1,1)=(2,3)=\tfrac52(1,1)-\tfrac12(1,-1)\). The map has not changed; its coordinate description has.

3.5 Exercises

  1. Is \(T(x,y)=(x+y,y+1)\) linear?
  2. For \(T(x,y,z)=(x+y,y+z)\), find the kernel, rank and nullity.
  3. Can a linear map \(\mathbb R^3\to\mathbb R^2\) be injective?
  4. If a linear map has standard matrix \(A\) and \(B\) has column matrix \(P\), explain why \(AP\) alone is not generally its matrix from \(B\)-coordinates to \(B\)-coordinates.
  1. No. \(T(0,0)=(0,1)\ne0\).
  2. The kernel is \(\operatorname{span}\{(-1,1,-1)\}\). Every \((a,b)\) is the image of \((a,0,b)\), so the rank is \(2\) and the nullity is \(1\).
  3. No. The rank is at most \(2\), so rank-nullity gives nullity at least \(1\).
  4. \(AP\) accepts \(B\)-coordinates but returns standard coordinates. Multiplying on the left by \(P^{-1}\) converts the output to \(B\)-coordinates.

The book roadmap lists determinants, spectral methods and orthogonality as future chapters.