Linear Algebra — Lecture 7

Lecture 7: Rank, Linear Maps, and Change of Basis

Shuhong Gao  ·  Clemson University

These notes are interactive: click a section title to open it, click any dotted term to unfold its exact definition or statement in place, click ▸ Proof to expand a proof, and try the exercises — answers are checked instantly.

7.1  Bases for the null space, column space, and row space

💡 Intuition

Lecture 6 attached three subspaces to every matrix. One row reduction produces a basis of each of them, and the recipe is short: the pivot columns of AA for the column space, the nonzero rows of an echelon form for the row space, and the vectors of the parametric vector form for the null space. The one subtle point is that row operations change the column space but not the relations among the columns; that is why the basis of Col(A)\operatorname{Col}(A) is taken from AA itself.

Lemma 7.1 (Row operations keep column relations)

Let BB be obtained from the m×nm \times n matrix AA by a sequence of row operations. Then Nul(B)=Nul(A)\operatorname{Nul}(B) = \operatorname{Nul}(A). Consequently, for all scalars x1,…,xnx_1, \dots, x_n, x1𝐚1+⋯+xn𝐚n=0⇔x1𝐛1+⋯+xn𝐛n=0,x_1\mathbf{a}_1 + \cdots + x_n\mathbf{a}_n = \mathbf{0} \quad\Longleftrightarrow\quad x_1\mathbf{b}_1 + \cdots + x_n\mathbf{b}_n = \mathbf{0}, where 𝐚j\mathbf{a}_j and 𝐛j\mathbf{b}_j are the columns of AA and BB. In particular a set of columns of AA is independent if and only if the corresponding columns of BB are, and 𝐚j\mathbf{a}_j is a combination of certain other columns of AA, with certain weights, if and only if 𝐛j\mathbf{b}_j is the same combination of the corresponding columns of BB.

Theorem 7.2 (A basis of the column space)

The pivot columns of AA form a basis of Col(A)\operatorname{Col}(A).

Remark 7.3 (Take the columns from AA, not from its echelon form)

Row operations usually change the column space. In Lecture 6's example, every vector of Col(A)\operatorname{Col}(A) satisfies b3=b1+b2b_3 = b_1 + b_2, while every column of the reduced echelon form has third entry 00; the two column spaces are different planes in ℝ3\mathbb{R}^3. The echelon form tells us which columns to take; the columns themselves come from AA.

Lemma 7.4 (Row operations keep the row space)

If BB is obtained from AA by row operations, then Row(B)=Row(A)\operatorname{Row}(B) = \operatorname{Row}(A).

Theorem 7.5 (A basis of the row space)

The nonzero rows of any echelon form UU of AA (written as columns) form a basis of Row(A)\operatorname{Row}(A).

Theorem 7.6 (A basis of the null space)

Solve A𝐱=0A\mathbf{x} = \mathbf{0} by row reduction and write the solution in parametric vector form, with one vector for each free variable. These vectors form a basis of Nul(A)\operatorname{Nul}(A). In particular dimNul(A)\dim \operatorname{Nul}(A) is the number of free variables, and Nul(A)={0}\operatorname{Nul}(A) = \{\mathbf{0}\} when there are none.

Example 7.7 (Three bases from one row reduction)

Let A=(1200−124100−1−211436110).A = \begin{pmatrix} 1 & 2 & 0 & 0 & -1 \\ 2 & 4 & 1 & 0 & 0 \\ -1 & -2 & 1 & 1 & 4 \\ 3 & 6 & 1 & 1 & 0 \end{pmatrix}. Starting from AA, →R2−2R1R3+R1R4−3R1(1200−1001020011300113)→R3−R2R4−R2(1200−1001020001100011)→R4−R3(1200−1001020001100000)=R,\begin{aligned} &\overset{\substack{R_2 - 2R_1 \\ R_3 + R_1 \\ R_4 - 3R_1}}{\longrightarrow} \begin{pmatrix} 1 & 2 & 0 & 0 & -1 \\ 0 & 0 & 1 & 0 & 2 \\ 0 & 0 & 1 & 1 & 3 \\ 0 & 0 & 1 & 1 & 3 \end{pmatrix} \\[4pt] &\overset{\substack{R_3 - R_2 \\ R_4 - R_2}}{\longrightarrow} \begin{pmatrix} 1 & 2 & 0 & 0 & -1 \\ 0 & 0 & 1 & 0 & 2 \\ 0 & 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 1 & 1 \end{pmatrix} \\[4pt] &\overset{R_4 - R_3}{\longrightarrow} \begin{pmatrix} 1 & 2 & 0 & 0 & -1 \\ 0 & 0 & 1 & 0 & 2 \\ 0 & 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 & 0 \end{pmatrix} = R , \end{aligned} which happens to be the reduced echelon form. The pivots are in columns 1,3,41, 3, 4.

Column space. By the theorem, columns 1,3,41, 3, 4 of AA form a basis: Col(A)=Span((12−13),(0111),(0011)),dimCol(A)=3.\operatorname{Col}(A) = \operatorname{Span}\left( \begin{pmatrix} 1 \\ 2 \\ -1 \\ 3 \end{pmatrix}, \begin{pmatrix} 0 \\ 1 \\ 1 \\ 1 \end{pmatrix}, \begin{pmatrix} 0 \\ 0 \\ 1 \\ 1 \end{pmatrix} \right) , \qquad \dim \operatorname{Col}(A) = 3 . Column 55 of RR is −𝐞1+2𝐞2+𝐞3-\mathbf{e}_1 + 2\mathbf{e}_2 + \mathbf{e}_3, so by the lemma 𝐚5=−𝐚1+2𝐚3+𝐚4\mathbf{a}_5 = -\mathbf{a}_1 + 2\mathbf{a}_3 + \mathbf{a}_4; check: −(12−13)+2(0111)+(0011)=(−1040)=𝐚5.-\begin{pmatrix} 1 \\ 2 \\ -1 \\ 3 \end{pmatrix} + 2\begin{pmatrix} 0 \\ 1 \\ 1 \\ 1 \end{pmatrix} + \begin{pmatrix} 0 \\ 0 \\ 1 \\ 1 \end{pmatrix} = \begin{pmatrix} -1 \\ 0 \\ 4 \\ 0 \end{pmatrix} = \mathbf{a}_5 . Similarly 𝐚2=2𝐚1\mathbf{a}_2 = 2\mathbf{a}_1.

Row space. By the theorem, the three nonzero rows of RR form a basis: (1,2,0,0,−1)T(1, 2, 0, 0, -1)^{T}, (0,0,1,0,2)T(0, 0, 1, 0, 2)^{T}, (0,0,0,1,1)T(0, 0, 0, 1, 1)^{T}, and dimRow(A)=3\dim \operatorname{Row}(A) = 3.

Null space. The free variables are x2=sx_2 = s and x5=tx_5 = t, and RR gives x1=−2s+tx_1 = -2s + t, x3=−2tx_3 = -2t, x4=−tx_4 = -t: 𝐱=s(−21000)+t(10−2−11),dimNul(A)=2,\mathbf{x} = s\begin{pmatrix} -2 \\ 1 \\ 0 \\ 0 \\ 0 \end{pmatrix} + t\begin{pmatrix} 1 \\ 0 \\ -2 \\ -1 \\ 1 \end{pmatrix}, \qquad \dim \operatorname{Nul}(A) = 2 , by the theorem.

Exercise 7.1 auto-check

Let AA have reduced echelon form (130200150000)\begin{pmatrix} 1 & 3 & 0 & 2 \\ 0 & 0 & 1 & 5 \\ 0 & 0 & 0 & 0 \end{pmatrix}. Which columns form a basis of Col(A)\operatorname{Col}(A)?

Exercise 7.2 auto-check

For the matrix of the previous exercise, column 44 of AA equals c1𝐚1+c3𝐚3c_1\mathbf{a}_1 + c_3\mathbf{a}_3. What is c3c_3?

Answer:

7.2  Rank and the rank theorem

💡 Intuition

The example just computed shows a pattern: three pivots, a column space of dimension 33, a row space of dimension 33, and a null space of dimension 5−3=25 - 3 = 2. All three dimensions are read off the single number of pivots. This is the rank theorem, and it says something that is not at all obvious from the definitions: the columns and the rows of any matrix span spaces of the same dimension, even though these spaces live in different ℝm\mathbb{R}^m and ℝn\mathbb{R}^n.

Definition 7.8 (Rank)

The rank of a matrix AA is the dimension of its column space: rankA=dimCol(A)\operatorname{rank} A = \dim \operatorname{Col}(A). The dimension of Nul(A)\operatorname{Nul}(A) is sometimes called the nullity of AA.

Theorem 7.9 (The rank theorem)

Let AA be an m×nm \times n matrix whose echelon form has rr pivots. Then rankA=dimCol(A)=dimRow(A)=r,dimNul(A)=n−r.\operatorname{rank} A = \dim \operatorname{Col}(A) = \dim \operatorname{Row}(A) = r, \qquad \dim \operatorname{Nul}(A) = n - r . Consequently rankA+dimNul(A)=n(the number of columns),\operatorname{rank} A + \dim \operatorname{Nul}(A) = n \quad (\text{the number of columns}), rankAT=rankA\operatorname{rank} A^{T} = \operatorname{rank} A, and rankA≤min(m,n)\operatorname{rank} A \le \min(m, n).

Example 7.10 (The rank theorem at work)

For the 4×54 \times 5 matrix of the three-bases example, rankA=3\operatorname{rank} A = 3 and dimNul(A)=2\dim \operatorname{Nul}(A) = 2, and 3+2=53 + 2 = 5.

The theorem also answers questions without any computation.

  • A 6×96 \times 9 matrix AA has a null space of dimension 33. Then rankA=9−3=6\operatorname{rank} A = 9 - 3 = 6, so Col(A)\operatorname{Col}(A) is a 66-dimensional subspace of ℝ6\mathbb{R}^6, which is all of ℝ6\mathbb{R}^6 by Lecture 6: the system A𝐱=𝐛A\mathbf{x} = \mathbf{b} is consistent for every 𝐛∈ℝ6\mathbf{b} \in \mathbb{R}^6.
  • A 5×75 \times 7 matrix has rank at most 55, so its null space has dimension at least 7−5=27 - 5 = 2; it can never be a line.
  • A 7×57 \times 5 matrix has rank at most 55, so its columns span at most a 55-dimensional subspace of ℝ7\mathbb{R}^7, and some systems A𝐱=𝐛A\mathbf{x} = \mathbf{b} are inconsistent.

Theorem 7.11 (The reduced echelon form is unique)

Every matrix AA has exactly one reduced row echelon form.

Remark 7.12 (A promise kept)

Lecture 2 took the uniqueness of the reduced echelon form on faith, which is why the number of pivots, and hence the rank, is a property of AA and not of the way we reduce it. The theorem proves it, and the rank theorem gives a second reason: the number of pivots of any echelon form equals dimCol(A)\dim \operatorname{Col}(A).

Theorem 7.13 (The invertibility theorem, continued)

For an n×nn \times n matrix AA the following are equivalent to the invertibility of AA, and so to every condition of Lecture 4's theorem and to detA≠0\det A \neq 0:

  1. rankA=n\operatorname{rank} A = n;
  2. Nul(A)={0}\operatorname{Nul}(A) = \{\mathbf{0}\};
  3. Col(A)=ℝn\operatorname{Col}(A) = \mathbb{R}^n;
  4. Row(A)=ℝn\operatorname{Row}(A) = \mathbb{R}^n;
  5. the columns of AA form a basis of ℝn\mathbb{R}^n.

Exercise 7.3 auto-check

A 5×85 \times 8 matrix has rank 33. What is the dimension of its null space?

Answer:
Exercise 7.4 auto-check

What is the rank of (123246101)\begin{pmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \\ 1 & 0 & 1 \end{pmatrix}?

Answer:

7.3  Linear maps between vector spaces

💡 Intuition

Lecture 3 defined linear maps from ℝn\mathbb{R}^n to ℝm\mathbb{R}^m. The definition makes sense between any two vector spaces, and many familiar operations turn out to be linear: differentiating a polynomial, transposing a matrix, evaluating a function at a point. The same questions apply to all of them (which vectors go to 0\mathbf{0}, which outputs are reached), and the rank theorem has a version for maps. A linear map is also economical to describe: its values on a basis determine it completely.

Definition 7.14 (Linear map)

Let VV and WW be vector spaces. A function f:V→Wf\colon V \to W is a linear map (or linear transformation) if for all 𝐮,𝐯∈V\mathbf{u}, \mathbf{v} \in V and c∈ℝc \in \mathbb{R}, f(𝐮+𝐯)=f(𝐮)+f(𝐯)andf(c𝐮)=cf(𝐮).f(\mathbf{u} + \mathbf{v}) = f(\mathbf{u}) + f(\mathbf{v}) \qquad\text{and}\qquad f(c\,\mathbf{u}) = c\,f(\mathbf{u}) . As in Lecture 3, it follows that f(c1𝐯1+⋯+ck𝐯k)=c1f(𝐯1)+⋯+ckf(𝐯k)f(c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k) = c_1 f(\mathbf{v}_1) + \cdots + c_k f(\mathbf{v}_k), and f(0)=f(00)=0f(0)=0f(\mathbf{0}) = f(0\,\mathbf{0}) = 0\,f(\mathbf{0}) = \mathbf{0}.

Example 7.15 (Linear maps beyond ℝn\mathbb{R}^n)
  1. Differentiation D:ℙn→ℙn−1D\colon \mathbb{P}_n \to \mathbb{P}_{n-1}, D(p)=p′D(p) = p', is linear: (p+q)′=p′+q′(p + q)' = p' + q' and (cp)′=cp′(c\,p)' = c\,p', the sum and constant-multiple rules of calculus. For example D(2−t+4t2+t3)=−1+8t+3t2D(2 - t + 4t^2 + t^3) = -1 + 8t + 3t^2.
  2. Transpose ℝm×n→ℝn×m\mathbb{R}^{m \times n} \to \mathbb{R}^{n \times m}, A↦ATA \mapsto A^{T}, is linear: (A+B)T=AT+BT(A + B)^{T} = A^{T} + B^{T} and (cA)T=cAT(cA)^{T} = cA^{T}.
  3. Evaluation ev:ℙ3→ℝ3\operatorname{ev}\colon \mathbb{P}_3 \to \mathbb{R}^3, ev(p)=(p(0),p(1),p(2))T\operatorname{ev}(p) = (p(0),\, p(1),\, p(2))^{T}, is linear, because (p+q)(t)=p(t)+q(t)(p + q)(t) = p(t) + q(t) and (cp)(t)=cp(t)(c\,p)(t) = c\,p(t) at each tt.
  4. Coordinates. For a basis ℬ\mathcal{B} of VV with nn vectors, 𝐯↦[𝐯]ℬ\mathbf{v} \mapsto [\mathbf{v}]_{\mathcal{B}} is a linear map V→ℝnV \to \mathbb{R}^n, by Lecture 6.
Two non-examples: det:ℝ2×2→ℝ\det\colon \mathbb{R}^{2 \times 2} \to \mathbb{R} is not linear, since det(2I2)=4≠2detI2\det(2I_2) = 4 \neq 2\det I_2; and p↦p+1p \mapsto p + 1 is not linear, since it sends 00 to 11.
Definition 7.16 (Kernel and image)

For a linear map f:V→Wf\colon V \to W, the kernel and the image of ff are kerf={𝐯∈V:f(𝐯)=0},imf={f(𝐯):𝐯∈V}.\ker f = \{\, \mathbf{v} \in V : f(\mathbf{v}) = \mathbf{0} \,\}, \qquad \operatorname{im} f = \{\, f(\mathbf{v}) : \mathbf{v} \in V \,\}. For f(𝐱)=A𝐱f(\mathbf{x}) = A\mathbf{x} these are Nul(A)\operatorname{Nul}(A) and Col(A)\operatorname{Col}(A), as in Lecture 6.

Proposition 7.17 (Kernel, image, and injectivity)

kerf\ker f is a subspace of VV, imf\operatorname{im} f is a subspace of WW, and ff is injective if and only if kerf={0}\ker f = \{\mathbf{0}\}.

Theorem 7.18 (The rank theorem for linear maps)

Let VV be finite-dimensional and f:V→Wf\colon V \to W linear. Then dimkerf+dimimf=dimV.\dim \ker f + \dim \operatorname{im} f = \dim V .

Example 7.19 (Kernel and image of differentiation)

For D:ℙ4→ℙ3D\colon \mathbb{P}_4 \to \mathbb{P}_3, kerD\ker D is the set of constant polynomials (derivative 00), of dimension 11, and imD=ℙ3\operatorname{im} D = \mathbb{P}_3, since every a+bt+ct2a + bt + ct^2 is the derivative of at+b2t2+c3t3at + \frac{b}{2}t^2 + \frac{c}{3}t^3. Indeed 1+3=4=dimℙ41 + 3 = 4 = \dim \mathbb{P}_4. So DD is surjective but not injective, which is the reason an antiderivative is only determined ``up to a constant''.

Theorem 7.20 (A linear map is determined by its values on a basis)

Let (𝐯1,…,𝐯n)(\mathbf{v}_1, \dots, \mathbf{v}_n) be a basis of VV, and let 𝐰1,…,𝐰n\mathbf{w}_1, \dots, \mathbf{w}_n be any vectors of WW. Then there is exactly one linear map f:V→Wf\colon V \to W with f(𝐯i)=𝐰if(\mathbf{v}_i) = \mathbf{w}_i for i=1,…,ni = 1, \dots, n, namely f(c1𝐯1+⋯+cn𝐯n)=c1𝐰1+⋯+cn𝐰n.f(c_1\mathbf{v}_1 + \cdots + c_n\mathbf{v}_n) = c_1\mathbf{w}_1 + \cdots + c_n\mathbf{w}_n .

Example 7.21 (A reflection, defined on a basis)

Let LL be the line through the origin in ℝ2\mathbb{R}^2 in the direction of 𝐛1=(1,2)T\mathbf{b}_1 = (1,\, 2)^{T}, and let 𝐛2=(−2,1)T\mathbf{b}_2 = (-2,\, 1)^{T}, which is perpendicular to LL (the slopes 22 and −12-\tfrac{1}{2} multiply to −1-1). Since det(𝐛1𝐛2)=5≠0\det(\mathbf{b}_1\ \mathbf{b}_2) = 5 \neq 0, these form a basis. By the theorem there is exactly one linear map f:ℝ2→ℝ2f\colon \mathbb{R}^2 \to \mathbb{R}^2 with f(𝐛1)=𝐛1,f(𝐛2)=−𝐛2;f(\mathbf{b}_1) = \mathbf{b}_1, \qquad f(\mathbf{b}_2) = -\mathbf{b}_2 ; it is the reflection across LL, which fixes the vectors along LL and reverses those perpendicular to it. We find its standard matrix in Section 5.

Remark 7.22 (Isomorphisms)

A bijective linear map is called an isomorphism. The coordinate map 𝐯↦[𝐯]ℬ\mathbf{v} \mapsto [\mathbf{v}]_{\mathcal{B}} of a space VV with a basis of nn vectors is an isomorphism V→ℝnV \to \mathbb{R}^n: it is linear, and bijective by unique representation. This is the precise sense in which every nn-dimensional space ``looks like'' ℝn\mathbb{R}^n: ℙ3\mathbb{P}_3 like ℝ3\mathbb{R}^3, and ℝ2×2\mathbb{R}^{2 \times 2} like ℝ4\mathbb{R}^4.

Exercise 7.5 auto-check

The trace tr:ℝ2×2→ℝ\operatorname{tr}\colon \mathbb{R}^{2 \times 2} \to \mathbb{R}, tr(abcd)=a+d\operatorname{tr}\begin{pmatrix} a & b \\ c & d \end{pmatrix} = a + d, is linear and surjective. What is dimker(tr)\dim \ker(\operatorname{tr})?

Answer:
Exercise 7.6 auto-check

Which map ℙ3→ℙ3\mathbb{P}_3 \to \mathbb{P}_3 is linear?

7.4  The matrix of a linear map

💡 Intuition

Lecture 3 showed that a linear map ℝn→ℝm\mathbb{R}^n \to \mathbb{R}^m is a matrix, by recording the images of the standard basis vectors as columns. An abstract space has no standard basis, but once we choose bases of VV and WW, coordinates turn vectors into columns of numbers and the same recipe produces a matrix. The matrix depends on the bases chosen; how it depends on them is the subject of the last section.

Definition 7.23 (Matrix of a linear map relative to bases)

Let f:V→Wf\colon V \to W be linear, let ℬ=(𝐯1,…,𝐯n)\mathcal{B} = (\mathbf{v}_1, \dots, \mathbf{v}_n) be a basis of VV and 𝒞=(𝐰1,…,𝐰m)\mathcal{C} = (\mathbf{w}_1, \dots, \mathbf{w}_m) a basis of WW. The matrix of ff relative to ℬ\mathcal{B} and 𝒞\mathcal{C} is the m×nm \times n matrix [f]𝒞←ℬ=([f(𝐯1)]𝒞[f(𝐯2)]𝒞⋯[f(𝐯n)]𝒞)[f]_{\mathcal{C} \leftarrow \mathcal{B}} = \begin{pmatrix} [f(\mathbf{v}_1)]_{\mathcal{C}} & [f(\mathbf{v}_2)]_{\mathcal{C}} & \cdots & [f(\mathbf{v}_n)]_{\mathcal{C}} \end{pmatrix} whose jj-th column is the coordinate vector of f(𝐯j)f(\mathbf{v}_j). When W=VW = V and 𝒞=ℬ\mathcal{C} = \mathcal{B} we write [f]ℬ[f]_{\mathcal{B}}.

Theorem 7.24 (Coordinates of the output)

With the notation of the definition, for every 𝐯∈V\mathbf{v} \in V, [f(𝐯)]𝒞=[f]𝒞←ℬ[𝐯]ℬ,[f(\mathbf{v})]_{\mathcal{C}} = [f]_{\mathcal{C} \leftarrow \mathcal{B}}\, [\mathbf{v}]_{\mathcal{B}} , and [f]𝒞←ℬ[f]_{\mathcal{C} \leftarrow \mathcal{B}} is the only matrix with this property.

Remark 7.25 (The picture behind the theorem)

The theorem says that the two routes in the diagram 𝐯∈V→ff(𝐯)∈W↓↓[𝐯]ℬ∈ℝn→M[f(𝐯)]𝒞∈ℝmM=[f]𝒞←ℬ\begin{array}{ccc} \mathbf{v} \in V & \overset{f}{\longrightarrow} & f(\mathbf{v}) \in W \\ \downarrow & & \downarrow \\ {[\mathbf{v}]_{\mathcal{B}}} \in \mathbb{R}^n & \overset{M}{\longrightarrow} & {[f(\mathbf{v})]_{\mathcal{C}}} \in \mathbb{R}^m \end{array} \qquad M = [f]_{\mathcal{C} \leftarrow \mathcal{B}} give the same result: apply ff and then take coordinates, or take coordinates and then multiply by MM. For V=ℝnV = \mathbb{R}^n and W=ℝmW = \mathbb{R}^m with their standard bases, coordinates change nothing, and MM is the matrix of Lecture 3.

Example 7.26 (The matrix of differentiation)

Take D:ℙ4→ℙ3D\colon \mathbb{P}_4 \to \mathbb{P}_3 with the standard bases ℬ=(1,t,t2,t3)\mathcal{B} = (1, t, t^2, t^3) and 𝒞=(1,t,t2)\mathcal{C} = (1, t, t^2). Since D(1)=0D(1) = 0, D(t)=1D(t) = 1, D(t2)=2tD(t^2) = 2t, D(t3)=3t2D(t^3) = 3t^2, [D]𝒞←ℬ=(010000200003).[D]_{\mathcal{C} \leftarrow \mathcal{B}} = \begin{pmatrix} 0 & 1 & 0 & 0 \\ 0 & 0 & 2 & 0 \\ 0 & 0 & 0 & 3 \end{pmatrix}. For p=2−t+4t2+t3p = 2 - t + 4t^2 + t^3, [p]ℬ=(2,−1,4,1)T[p]_{\mathcal{B}} = (2, -1, 4, 1)^{T} and the product is (−1,8,3)T(-1, 8, 3)^{T}, the coordinates of p′=−1+8t+3t2p' = -1 + 8t + 3t^2. The matrix has rank 33 and a null space of dimension 11, matching the kernel and image of DD.

Example 7.27 (Evaluation and the Vandermonde matrix)

Consider the evaluation map ev:ℙ3→ℝ3\operatorname{ev}\colon \mathbb{P}_3 \to \mathbb{R}^3, ev(p)=(p(0),p(1),p(2))T\operatorname{ev}(p) = (p(0),\, p(1),\, p(2))^{T}, of the examples of linear maps. Use the standard basis ℬ=(1,t,t2)\mathcal{B} = (1, t, t^2) of ℙ3\mathbb{P}_3 and the standard basis ℰ=(𝐞1,𝐞2,𝐞3)\mathcal{E} = (\mathbf{e}_1, \mathbf{e}_2, \mathbf{e}_3) of ℝ3\mathbb{R}^3, relative to which every vector of ℝ3\mathbb{R}^3 is its own coordinate vector. Evaluating the three basis polynomials at t=0,1,2t = 0, 1, 2, ev(1)=(111),ev(t)=(012),ev(t2)=(014),\operatorname{ev}(1) = \begin{pmatrix} 1 \\ 1 \\ 1 \end{pmatrix}, \qquad \operatorname{ev}(t) = \begin{pmatrix} 0 \\ 1 \\ 2 \end{pmatrix}, \qquad \operatorname{ev}(t^2) = \begin{pmatrix} 0 \\ 1 \\ 4 \end{pmatrix}, so M=[ev]ℰ←ℬ=(100111124)=V(0,1,2),M = [\operatorname{ev}]_{\mathcal{E} \leftarrow \mathcal{B}} = \begin{pmatrix} 1 & 0 & 0 \\ 1 & 1 & 1 \\ 1 & 2 & 4 \end{pmatrix} = V(0, 1, 2), the Vandermonde matrix of Lecture 5, with determinant (1−0)(2−0)(2−1)=2≠0(1 - 0)(2 - 0)(2 - 1) = 2 \neq 0. So MM is invertible, and ev\operatorname{ev} is bijective: for any three numbers y0,y1,y2y_0, y_1, y_2 there is exactly one p∈ℙ3p \in \mathbb{P}_3 with p(0)=y0p(0) = y_0, p(1)=y1p(1) = y_1, p(2)=y2p(2) = y_2, and its coordinate vector [p]ℬ[p]_{\mathcal{B}}, the list of its coefficients, is M−1(y0,y1,y2)TM^{-1}(y_0, y_1, y_2)^{T}.

Theorem 7.28 (Composition is multiplication)

Let f:U→Vf\colon U \to V and g:V→Wg\colon V \to W be linear, and let 𝒜\mathcal{A}, ℬ\mathcal{B}, 𝒞\mathcal{C} be bases of UU, VV, WW. Then [g∘f]𝒞←𝒜=[g]𝒞←ℬ[f]ℬ←𝒜.[g \circ f]_{\mathcal{C} \leftarrow \mathcal{A}} = [g]_{\mathcal{C} \leftarrow \mathcal{B}}\, [f]_{\mathcal{B} \leftarrow \mathcal{A}} .

Proposition 7.29 (The rank of a map is the rank of its matrix)

With M=[f]𝒞←ℬM = [f]_{\mathcal{C} \leftarrow \mathcal{B}}, dimimf=rankM\dim \operatorname{im} f = \operatorname{rank} M and dimkerf=dimNul(M)\dim \ker f = \dim \operatorname{Nul}(M).

Exercise 7.7 auto-check

Let f:ℙ3→ℙ3f\colon \mathbb{P}_3 \to \mathbb{P}_3 be the linear map f(p(t))=p(t+1)f(p(t)) = p(t + 1), which substitutes t+1t + 1 for tt; for example f(t2)=(t+1)2=1+2t+t2f(t^2) = (t + 1)^2 = 1 + 2t + t^2. Use the standard basis ℬ=(1,t,t2)\mathcal{B} = (1, t, t^2) of ℙ3\mathbb{P}_3. What is the entry in row 22, column 33 of [f]ℬ[f]_{\mathcal{B}}?

Answer:
Exercise 7.8 auto-check

Let D:ℙ3→ℙ3D\colon \mathbb{P}_3 \to \mathbb{P}_3 be differentiation, with the basis ℬ=(1,t,t2)\mathcal{B} = (1, t, t^2) used on both sides. What is the rank of [D]ℬ[D]_{\mathcal{B}}?

Answer:

7.5  Change of basis and similar matrices

💡 Intuition

The same vector has different coordinates in different bases, and the same linear map has different matrices. A good choice of basis can make the matrix very simple: the reflection of Section 3 is diag(1,−1)\operatorname{diag}(1, -1) in a basis adapted to its line, but has fractions in the standard basis. This section shows how coordinates and matrices change when the basis changes. The answer is a single invertible matrix PP, and for a map from a space to itself the new matrix is P−1APP^{-1}AP. Matrices related in this way are called similar; they are different descriptions of one linear map.

Definition 7.30 (Change-of-basis matrix)

Let ℬ=(𝐛1,…,𝐛n)\mathcal{B} = (\mathbf{b}_1, \dots, \mathbf{b}_n) and 𝒞\mathcal{C} be two bases of the same space VV. The change-of-basis matrix from ℬ\mathcal{B} to 𝒞\mathcal{C} is the n×nn \times n matrix P𝒞←ℬ=([𝐛1]𝒞⋯[𝐛n]𝒞),P_{\mathcal{C} \leftarrow \mathcal{B}} = \begin{pmatrix} [\mathbf{b}_1]_{\mathcal{C}} & \cdots & [\mathbf{b}_n]_{\mathcal{C}} \end{pmatrix}, whose columns are the 𝒞\mathcal{C}-coordinates of the vectors of ℬ\mathcal{B}. It is the matrix [id]𝒞←ℬ[\operatorname{id}]_{\mathcal{C} \leftarrow \mathcal{B}} of the identity map id(𝐯)=𝐯\operatorname{id}(\mathbf{v}) = \mathbf{v}.

Theorem 7.31 (Changing coordinates)

For every 𝐯∈V\mathbf{v} \in V, [𝐯]𝒞=P𝒞←ℬ[𝐯]ℬ[\mathbf{v}]_{\mathcal{C}} = P_{\mathcal{C} \leftarrow \mathcal{B}}\,[\mathbf{v}]_{\mathcal{B}}. The matrix P𝒞←ℬP_{\mathcal{C} \leftarrow \mathcal{B}} is invertible, and (P𝒞←ℬ)−1=Pℬ←𝒞(P_{\mathcal{C} \leftarrow \mathcal{B}})^{-1} = P_{\mathcal{B} \leftarrow \mathcal{C}}.

Example 7.32 (Bases of ℝn\mathbb{R}^n)

Let V=ℝnV = \mathbb{R}^n, let ℰ=(𝐞1,…,𝐞n)\mathcal{E} = (\mathbf{e}_1, \dots, \mathbf{e}_n) be the standard basis of ℝn\mathbb{R}^n (the columns of InI_n, see Lecture 3), and let ℬ=(𝐛1,…,𝐛n)\mathcal{B} = (\mathbf{b}_1, \dots, \mathbf{b}_n) be any basis. Every 𝐱=x1𝐞1+⋯+xn𝐞n\mathbf{x} = x_1\mathbf{e}_1 + \cdots + x_n\mathbf{e}_n is its own coordinate vector relative to ℰ\mathcal{E}: [𝐱]ℰ=𝐱[\mathbf{x}]_{\mathcal{E}} = \mathbf{x}. In particular [𝐛j]ℰ=𝐛j[\mathbf{b}_j]_{\mathcal{E}} = \mathbf{b}_j, so Pℰ←ℬ=(𝐛1⋯𝐛n)P_{\mathcal{E} \leftarrow \mathcal{B}} = (\mathbf{b}_1\ \cdots\ \mathbf{b}_n): the basis vectors as columns. The theorem says 𝐱=P[𝐱]ℬ\mathbf{x} = P\,[\mathbf{x}]_{\mathcal{B}} and [𝐱]ℬ=P−1𝐱[\mathbf{x}]_{\mathcal{B}} = P^{-1}\mathbf{x}, as found in Lecture 6's coordinates example.

Theorem 7.33 (How the matrix of a map changes)

Let f:V→Vf\colon V \to V be linear, let ℬ\mathcal{B} and ℬ′\mathcal{B}' be bases of VV, and let P=Pℬ←ℬ′P = P_{\mathcal{B} \leftarrow \mathcal{B}'}. Then [f]ℬ′=P−1[f]ℬP.[f]_{\mathcal{B}'} = P^{-1}\, [f]_{\mathcal{B}}\, P . More generally, for f:V→Wf\colon V \to W, bases ℬ,ℬ′\mathcal{B}, \mathcal{B}' of VV and 𝒞,𝒞′\mathcal{C}, \mathcal{C}' of WW, [f]𝒞′←ℬ′=Q−1[f]𝒞←ℬP,[f]_{\mathcal{C}' \leftarrow \mathcal{B}'} = Q^{-1}\,[f]_{\mathcal{C} \leftarrow \mathcal{B}}\,P , where P=Pℬ←ℬ′P = P_{\mathcal{B} \leftarrow \mathcal{B}'} and Q=P𝒞←𝒞′Q = P_{\mathcal{C} \leftarrow \mathcal{C}'}.

2026-10-06T13:08:46.727673 image/svg+xml Matplotlib v3.10.9, https://matplotlib.org/ L b b 1 1 = ( ) f b 2 f ( ) = − b b 2 2 x f ( ) x
The reflection across the line LL spanned by 𝐛1=(1,2)T\mathbf{b}_1 = (1,\,2)^{T}. It fixes 𝐛1\mathbf{b}_1 and reverses 𝐛2=(−2,1)T\mathbf{b}_2 = (-2,\,1)^{T}, so its matrix relative to ℬ=(𝐛1,𝐛2)\mathcal{B} = (\mathbf{b}_1, \mathbf{b}_2) is diag(1,−1)\operatorname{diag}(1, -1). A vector 𝐱\mathbf{x} and its mirror image f(𝐱)f(\mathbf{x}) are shown.
Example 7.34 (The matrix of a reflection)

Return to the reflection ff across the line LL. Relative to ℬ=(𝐛1,𝐛2)\mathcal{B} = (\mathbf{b}_1, \mathbf{b}_2) its matrix is read off from f(𝐛1)=𝐛1f(\mathbf{b}_1) = \mathbf{b}_1 and f(𝐛2)=−𝐛2f(\mathbf{b}_2) = -\mathbf{b}_2: [f]ℬ=(100−1).[f]_{\mathcal{B}} = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}. To get the standard matrix A=[f]ℰA = [f]_{\mathcal{E}}, apply the theorem with the roles ℬ→ℰ\mathcal{B} \to \mathcal{E} and ℬ′→ℬ\mathcal{B}' \to \mathcal{B}: with P=Pℰ←ℬ=(1−221)P = P_{\mathcal{E} \leftarrow \mathcal{B}} = \begin{pmatrix} 1 & -2 \\ 2 & 1 \end{pmatrix}, we have [f]ℬ=P−1AP[f]_{\mathcal{B}} = P^{-1} A P, so A=P[f]ℬP−1=(1−221)(100−1)⋅15(12−21)=15(−3443).\begin{aligned} A &= P\,[f]_{\mathcal{B}}\,P^{-1} = \begin{pmatrix} 1 & -2 \\ 2 & 1 \end{pmatrix} \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} \cdot \frac{1}{5}\begin{pmatrix} 1 & 2 \\ -2 & 1 \end{pmatrix} \\ &= \frac{1}{5}\begin{pmatrix} -3 & 4 \\ 4 & 3 \end{pmatrix}. \end{aligned} Check: A𝐛1=15(−3+8,4+6)T=(1,2)T=𝐛1A\mathbf{b}_1 = \frac{1}{5}(-3 + 8,\ 4 + 6)^{T} = (1,\, 2)^{T} = \mathbf{b}_1. Finding AA directly would have needed some geometry; in the basis adapted to the line, the matrix could be written down at sight.

Definition 7.35 (Similar matrices)

Two n×nn \times n matrices AA and BB are similar if B=P−1APB = P^{-1}AP for some invertible n×nn \times n matrix PP.

Remark 7.36 (Similar matrices describe one map)

If B=P−1APB = P^{-1}AP, let f(𝐱)=A𝐱f(\mathbf{x}) = A\mathbf{x} and let ℬ\mathcal{B} be the basis of ℝn\mathbb{R}^n formed by the columns of PP, so that P=Pℰ←ℬP = P_{\mathcal{E} \leftarrow \mathcal{B}}. By the theorem, B=[f]ℬB = [f]_{\mathcal{B}}. So similar matrices are the matrices of one linear map relative to two bases. Conversely, the matrices of one map f:V→Vf\colon V \to V relative to any two bases are similar.

Theorem 7.37 (What similar matrices share)

If B=P−1APB = P^{-1}AP, then

  1. detB=detA\det B = \det A;
  2. rankB=rankA\operatorname{rank} B = \operatorname{rank} A;
  3. det(B−λIn)=det(A−λIn)\det(B - \lambda I_n) = \det(A - \lambda I_n) for every number λ\lambda;
  4. Bk=P−1AkPB^{k} = P^{-1}A^{k}P for every k≥1k \ge 1.

Example 7.38 (A matrix similar to a diagonal one)

Let A=(4−211)A = \begin{pmatrix} 4 & -2 \\ 1 & 1 \end{pmatrix} and take the basis 𝐛1=(1,1)T\mathbf{b}_1 = (1,\, 1)^{T}, 𝐛2=(2,1)T\mathbf{b}_2 = (2,\, 1)^{T}. Then A𝐛1=(22)=2𝐛1,A𝐛2=(63)=3𝐛2,A\mathbf{b}_1 = \begin{pmatrix} 2 \\ 2 \end{pmatrix} = 2\,\mathbf{b}_1, \qquad A\mathbf{b}_2 = \begin{pmatrix} 6 \\ 3 \end{pmatrix} = 3\,\mathbf{b}_2 , so the map 𝐱↦A𝐱\mathbf{x} \mapsto A\mathbf{x} simply stretches by 22 along 𝐛1\mathbf{b}_1 and by 33 along 𝐛2\mathbf{b}_2. With P=(1211)P = \begin{pmatrix} 1 & 2 \\ 1 & 1 \end{pmatrix}, P−1AP=(2003)=D,P−1=(−121−1).P^{-1}AP = \begin{pmatrix} 2 & 0 \\ 0 & 3 \end{pmatrix} = D , \qquad P^{-1} = \begin{pmatrix} -1 & 2 \\ 1 & -1 \end{pmatrix}. As the theorem predicts, detA=4+2=6=detD\det A = 4 + 2 = 6 = \det D, and det(A−λI2)=(4−λ)(1−λ)+2=(λ−2)(λ−3)=det(D−λI2).\begin{aligned} \det(A - \lambda I_2) &= (4 - \lambda)(1 - \lambda) + 2 \\ &= (\lambda - 2)(\lambda - 3) = \det(D - \lambda I_2) . \end{aligned} Powers become easy: Ak=PDkP−1A^{k} = P D^{k} P^{-1}, for example A3=(1211)(80027)(−121−1)=(46−3819−11).A^{3} = \begin{pmatrix} 1 & 2 \\ 1 & 1 \end{pmatrix} \begin{pmatrix} 8 & 0 \\ 0 & 27 \end{pmatrix} \begin{pmatrix} -1 & 2 \\ 1 & -1 \end{pmatrix} = \begin{pmatrix} 46 & -38 \\ 19 & -11 \end{pmatrix}.

Remark 7.39 (Shared numbers do not guarantee similarity)

The matrices I2I_2 and N=(1101)N = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} have the same determinant, the same rank and the same polynomial det(N−λI2)=(1−λ)2\det(N - \lambda I_2) = (1 - \lambda)^2, yet they are not similar: P−1I2P=I2≠NP^{-1}I_2P = I_2 \neq N for every invertible PP. The quantities of the theorem can prove that two matrices are not similar (if they differ), but not that they are.

Exercise 7.9 auto-check

For AA and PP as in the example, what is the (1,1)(1,1) entry of A2A^{2}? (Use A2=PD2P−1A^{2} = PD^{2}P^{-1}, or multiply directly.)

Answer:
Exercise 7.10 auto-check

Which pair of matrices is not similar?

Remark 7.40 (Looking ahead)

The last example found a basis in which a matrix becomes diagonal, and the diagonal entries 22 and 33 were the roots of det(A−λI2)\det(A - \lambda I_2), a polynomial that by the theorem does not depend on the basis. Vectors such as 𝐛1\mathbf{b}_1 and 𝐛2\mathbf{b}_2, which a matrix only stretches, are eigenvectors, and the stretching factors are eigenvalues. Finding them, and deciding when a basis of eigenvectors exists, is the subject of what follows.

Index of statements

  1. Lemma 7.1 (Row operations keep column relations)
  2. Theorem 7.2 (A basis of the column space)
  3. Remark 7.3 (Take the columns from AA, not from its echelon form)
  4. Lemma 7.4 (Row operations keep the row space)
  5. Theorem 7.5 (A basis of the row space)
  6. Theorem 7.6 (A basis of the null space)
  7. Example 7.7 (Three bases from one row reduction)
  8. Definition 7.8 (Rank)
  9. Theorem 7.9 (The rank theorem)
  10. Example 7.10 (The rank theorem at work)
  11. Theorem 7.11 (The reduced echelon form is unique)
  12. Remark 7.12 (A promise kept)
  13. Theorem 7.13 (The invertibility theorem, continued)
  14. Definition 7.14 (Linear map)
  15. Example 7.15 (Linear maps beyond ℝn\mathbb{R}^n)
  16. Definition 7.16 (Kernel and image)
  17. Proposition 7.17 (Kernel, image, and injectivity)
  18. Theorem 7.18 (The rank theorem for linear maps)
  19. Example 7.19 (Kernel and image of differentiation)
  20. Theorem 7.20 (A linear map is determined by its values on a basis)
  21. Example 7.21 (A reflection, defined on a basis)
  22. Remark 7.22 (Isomorphisms)
  23. Definition 7.23 (Matrix of a linear map relative to bases)
  24. Theorem 7.24 (Coordinates of the output)
  25. Remark 7.25 (The picture behind the theorem)
  26. Example 7.26 (The matrix of differentiation)
  27. Example 7.27 (Evaluation and the Vandermonde matrix)
  28. Theorem 7.28 (Composition is multiplication)
  29. Proposition 7.29 (The rank of a map is the rank of its matrix)
  30. Definition 7.30 (Change-of-basis matrix)
  31. Theorem 7.31 (Changing coordinates)
  32. Example 7.32 (Bases of ℝn\mathbb{R}^n)
  33. Theorem 7.33 (How the matrix of a map changes)
  34. Example 7.34 (The matrix of a reflection)
  35. Definition 7.35 (Similar matrices)
  36. Remark 7.36 (Similar matrices describe one map)
  37. Theorem 7.37 (What similar matrices share)
  38. Example 7.38 (A matrix similar to a diagonal one)
  39. Remark 7.39 (Shared numbers do not guarantee similarity)
  40. Remark 7.40 (Looking ahead)