Skip to content
Geometry and Algebra

Linear maps: the associated matrix, kernel, image and the rank-nullity theorem

Definition and examples, the matrix of a map with rotations and the derivative, kernel and image, proof of the rank-nullity theorem and change of basis.

Linear maps are the functions of linear algebra: they turn vectors into vectors while respecting sums and multiples. Rotations, projections, derivatives and digital filters are all examples. In this lesson we see that every linear map between finite-dimensional spaces is represented by a matrix, introduce kernel and image and prove the rank-nullity theorem.

Definition

A function f: V\to W between vector spaces is linear if

    \[ f(\mathbf u + \mathbf v) = f(\mathbf u) + f(\mathbf v),\qquad f(\lambda\mathbf v) = \lambda f(\mathbf v) \]

An immediate consequence: f(\mathbf 0) = \mathbf 0. So f(x) = 2x + 1, despite being called a “linear function” at school, is not linear in this sense: it is a line that does not pass through the origin.

Examples: rotation of the plane by an angle \theta; projection of space onto a plane; the derivative, which sends a polynomial p to p' and respects sums and multiples; a FIR digital filter, y_n = \sum_k h_k x_{n-k}, which is linear in the input signal.

The matrix of a linear map

A linear map is determined by the images of the vectors of a basis. If \mathbf v = x_1\mathbf e_1 + \dots + x_n\mathbf e_n, by linearity

    \[ f(\mathbf v) = x_1 f(\mathbf e_1) + \dots + x_n f(\mathbf e_n) \]

Placing the images f(\mathbf e_j) as columns gives a matrix A, and f(\mathbf x) = A\mathbf x. Conversely, every m\times n matrix defines a linear map from \mathbb R^n to \mathbb R^m. The columns of A are the images of the basis vectors: that is the rule to remember.

A grid in the plane transformed by a linear map
A linear map sends the square grid to a grid of parallelograms: lines stay lines, parallels stay parallel, the origin stays put. Knowing where \mathbf e_1 and \mathbf e_2 go (the columns of A) is enough to know where every vector goes: A\mathbf v has, relative to A\mathbf e_1, A\mathbf e_2, the same coordinates that \mathbf v has relative to \mathbf e_1, \mathbf e_2.

Example: rotation. Rotating by \theta, \mathbf e_1 = (1, 0) goes to (\cos\theta, \sin\theta) and \mathbf e_2 = (0, 1) goes to (-\sin\theta, \cos\theta). So

    \[ R_\theta = \begin{pmatrix} \cos\theta & -\sin\theta\\ \sin\theta & \cos\theta \end{pmatrix} \]

Composing two rotations, R_\alpha R_\beta = R_{\alpha + \beta}: expanding the product gives back the addition formulas for sine and cosine, with no need to memorise them.

Example: the derivative. On \mathbb R[x]_{\le 2} with basis 1, x, x^2: D(1) = 0, D(x) = 1, D(x^2) = 2x. The coordinates of these images are the columns:

    \[ D = \begin{pmatrix} 0 & 1 & 0\\ 0 & 0 & 2\\ 0 & 0 & 0 \end{pmatrix} \]

Differentiating 3 - x + 2x^2 is the same as multiplying D by (3, -1, 2): the result is (-1, 4, 0), that is -1 + 4x.

Kernel and image

  • The kernel \ker f = \{\mathbf v : f(\mathbf v) = \mathbf 0\} is a subspace of V: for a matrix, it is the solution set of the homogeneous system A\mathbf x = \mathbf 0.
  • The image \operatorname{Im}f = \{f(\mathbf v)\} is a subspace of W: for a matrix, it is the column space, and its dimension is the rank.

f is injective if and only if \ker f = \{\mathbf 0\}. Indeed f(\mathbf u) = f(\mathbf v) is equivalent to f(\mathbf u - \mathbf v) = \mathbf 0, that is \mathbf u - \mathbf v\in\ker f. f is surjective if and only if \operatorname{Im}f = W.

The rank-nullity theorem

Theorem. If f: V\to W is linear and V is finite-dimensional,

    \[ \dim\ker f + \dim\operatorname{Im}f = \dim V \]

Proof

Let \mathbf u_1, \dots, \mathbf u_k be a basis of \ker f. Extend it to a basis of V by adding \mathbf w_1, \dots, \mathbf w_r, with k + r = \dim V. We show that f(\mathbf w_1), \dots, f(\mathbf w_r) is a basis of the image, so \dim\operatorname{Im}f = r.

They span. Every \mathbf v is \sum a_i\mathbf u_i + \sum b_j\mathbf w_j, and f(\mathbf v) = \sum b_j f(\mathbf w_j) because f(\mathbf u_i) = \mathbf 0.

They are independent. If \sum b_j f(\mathbf w_j) = \mathbf 0, then f(\sum b_j\mathbf w_j) = \mathbf 0, so \sum b_j\mathbf w_j is in the kernel and can be written as \sum a_i\mathbf u_i. But then \sum b_j\mathbf w_j - \sum a_i\mathbf u_i = \mathbf 0 is a zero combination of vectors of a basis of V: all coefficients are zero, in particular the b_j.

For an m\times n matrix of rank r the theorem says \dim\ker A = n - r: it is the number of free parameters in the Rouché-Capelli theorem, which is now fully proved.

Consequences. A linear map from \mathbb R^n to itself is injective if and only if it is surjective (if and only if it is invertible). A map from \mathbb R^3 to \mathbb R^2 cannot be injective: the kernel has dimension at least 1. One from \mathbb R^2 to \mathbb R^3 cannot be surjective.

Change of basis

The matrix of a map depends on the chosen basis. If P is the matrix whose columns are the vectors of a new basis (written in the old basis), coordinates change by \mathbf x = P\mathbf x', and the matrix of the map f: V\to V in the new basis is

    \[ A' = P^{-1}AP \]

Two matrices related in this way are called similar: they represent the same transformation seen from two different frames. They have the same determinant, rank, trace and eigenvalues. Choosing the right basis to make A' as simple as possible, ideally diagonal, is exactly the topic of the next lesson.

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x