Mathematics · Book 3 · Bachelor Year 1

University Mathematics — Year 1

University Mathematics — Year 1 · Bachelor Year 1

21Matrices

A matrix is a linear map written in coordinates. This chapter sets up the dictionary — composition becomes matrix product, bijectivity becomes invertibility, change of basis becomes conjugation — and the algorithmic side: row operations, computation of ranks and inverses. First met in the High School volume, matrices are now grounded in the theory of Chapters 18, 19 and 20.

21.1 Matrices and linear maps

Definition 21.1

Mn,p(K)\mathcal{M}_{n,p}(K) is the vector space of n×pn \times p arrays A=(aij)A = (a_{ij}) of scalars (ii: row, jj: column), of dimension npnp (basis: the matrices EijE_{ij} with a single 11). Given bases B=(e1,,ep)\mathcal{B} = (e_1, \dots, e_p) of EE and C\mathcal{C} of FF (dimF=n\dim F = n), the matrix of uL(E,F)u \in \mathcal{L}(E, F) is the array whose jj-th column lists the coordinates of u(ej)u(e_j) in C\mathcal{C}:

MatB,C(u)=(aij),u(ej)=i=1naijfi.\operatorname{Mat}_{\mathcal{B},\mathcal{C}}(u) = (a_{ij}), \qquad u(e_j) = \sum_{i=1}^{n} a_{ij}\, f_i .

The map uMatB,C(u)u \mapsto \operatorname{Mat}_{\mathcal{B},\mathcal{C}}(u) is an isomorphism from L(E,F)\mathcal{L}(E, F) onto Mn,p(K)\mathcal{M}_{n,p}(K) (Proposition 20.2: a linear map is exactly a choice of images of the eje_j).

Example 21.2 (The derivative, as a matrix)

Let D(P)=PD(P) = P' on R3[X]\R_3[X]. In the monomial basis (1,X,X2,X3)(1, X, X^2, X^3): D(1)=0D(1) = 0, D(X)=1D(X) = 1, D(X2)=2XD(X^2) = 2X, D(X3)=3X2D(X^3) = 3X^2, so

Mat(D)=(0100002000030000).\operatorname{Mat}(D) = \begin{pmatrix} 0 & 1 & 0 & 0\\ 0 & 0 & 2 & 0\\ 0 & 0 & 0 & 3\\ 0 & 0 & 0 & 0 \end{pmatrix}.

In the divided basis (1, X, X22, X36)\bigl(1,\ X,\ \frac{X^2}2,\ \frac{X^3}6\bigr), each basis vector maps to the previous one (D(Xkk!)=Xk1(k1)!D\bigl(\frac{X^k}{k!}\bigr) = \frac{X^{k-1}}{(k-1)!}), and the matrix becomes the pure shift: ones on the superdiagonal, zeros elsewhere. Two morals: the matrix belongs to the pair (map, basis), not to the map alone; and a good basis makes structure visible at a glance — the shift form shows instantly that D4=0D^4 = 0 on R3[X]\R_3[X], each power of the matrix pushing its diagonal of ones one step further out.

Definition 21.3 (Product)

For AMn,pA \in \mathcal{M}_{n,p} and BMp,qB \in \mathcal{M}_{p,q}:

(AB)ik=j=1paijbjk(1in, 1kq).(AB)_{ik} = \sum_{j=1}^{p} a_{ij}\, b_{jk} \qquad (1 \leq i \leq n,\ 1 \leq k \leq q).

This is precisely the matrix of the composition: Mat(vu)=Mat(v)Mat(u)\operatorname{Mat}(v \circ u) = \operatorname{Mat}(v)\, \operatorname{Mat}(u) (bases matching in the middle). Similarly, if XX is the column of coordinates of xx, the column of u(x)u(x) is AXAX.

Proof of the composition formula.

v(u(ek))=v(jbjkfj)=jbjkv(fj)=jbjkiaijgi=i(jaijbjk)gi.v(u(e_k)) = v\Bigl(\sum_j b_{jk} f_j\Bigr) = \sum_j b_{jk}\, v(f_j) = \sum_j b_{jk} \sum_i a_{ij}\, g_i = \sum_i \Bigl(\sum_j a_{ij} b_{jk}\Bigr) g_i . \qedhere

Proposition 21.4 (The algebra Mn(K)\mathcal{M}_n(K))

Square matrices Mn(K)\mathcal{M}_n(K) form a (non-commutative for n2n \geq 2) ring, with identity InI_n; its group of units is the general linear group GLn(K)GL_n(K), corresponding to bijective endomorphisms. For A,BMn(K)A, B \in \mathcal{M}_n(K):

AB=In    AGLn(K) and B=A1AB = I_n \implies A \in GL_n(K) \text{ and } B = A^{-1}

(one-sided inverses are two-sided, by Corollary 20.9).

Proof. Ring axioms transport from L(E)\mathcal{L}(E) through the isomorphism of Definition 21.1: it converts composition into product and sum into sum, so associativity, distributivity and the role of InI_n are inherited from the corresponding facts about maps, with no entrywise verification. Non-commutativity: E12E21=E11E22=E21E12E_{12}E_{21} = E_{11} \neq E_{22} = E_{21}E_{12}. If AB=InAB = I_n: the endomorphism aa of AA satisfies ab=ida \circ b = \mathrm{id}, so aa is surjective (x=a(b(x))x = a(b(x)) exhibits a preimage of every xx), hence bijective in finite dimension (Corollary 20.9); composing ab=ida \circ b = \mathrm{id} with a1a^{-1} on the left gives b=a1b = a^{-1}, and then ba=idb\circ a = \mathrm{id} too: the one-sided inverse was two-sided all along — a strictly finite-dimensional favor.

Definition 21.5 (Transpose; trace)

The transpose of A=(aij)Mn,pA = (a_{ij}) \in \mathcal{M}_{n,p} is AT=(aji)Mp,nA^{\mathsf T} = (a_{ji}) \in \mathcal{M}_{p,n}; it satisfies (AB)T=BTAT(AB)^{\mathsf T} = B^{\mathsf T} A^{\mathsf T} and (AT)T=A(A^{\mathsf T})^{\mathsf T} = A. The trace of a square matrix is trA=iaii\operatorname{tr} A = \sum_i a_{ii}; it is linear, and

tr(AB)=tr(BA)(AMn,p, BMp,n).\operatorname{tr}(AB) = \operatorname{tr}(BA) \qquad (A \in \mathcal{M}_{n,p},\ B \in \mathcal{M}_{p,n}).

Proof of the trace identity. tr(AB)=ijaijbji\operatorname{tr}(AB) = \sum_i \sum_j a_{ij} b_{ji} and tr(BA)=jibjiaij\operatorname{tr}(BA) = \sum_j \sum_i b_{ji} a_{ij}: the same double sum.

Example 21.6 (The trace at work)

The projection of Chapter 20 onto Vect(1,1)\operatorname{Vect}(1,1) along Vect(0,1)\operatorname{Vect}(0,1), p(x,y)=(x,x)p(x, y) = (x, x), has matrix A=(1010)A = \begin{pmatrix} 1 & 0\\ 1 & 0\end{pmatrix} in the canonical basis: indeed A2=AA^2 = A, and

trA=1=rkA,\operatorname{tr} A = 1 = \operatorname{rk} A ,

illustrating Exercise 21.8: for idempotents the trace counts the dimension of the image, whatever slanted basis the matrix is written in. The invariance mechanism is the identity tr(AB)=tr(BA)\operatorname{tr}(AB) = \operatorname{tr}(BA):

tr(P1(AP))=tr((AP)P1)=trA,\operatorname{tr}\bigl(P^{-1}(AP)\bigr) = \operatorname{tr}\bigl((AP)P^{-1}\bigr) = \operatorname{tr} A ,

so all matrices similar to AA share its trace — the first numerical invariant of an endomorphism, to be joined by the determinant in Chapter 22 (the pair (s,p)(s, p) of the weekend problem below).

Example 21.7 (Symmetric plus antisymmetric)

Call AA symmetric when AT=AA^{\mathsf T} = A, antisymmetric when AT=AA^{\mathsf T} = -A. Every square matrix splits uniquely as one plus the other:

A=A+AT2symmetric+AAT2antisymmetric,A = \underbrace{\frac{A + A^{\mathsf T}}{2}}_{\text{symmetric}} + \underbrace{\frac{A - A^{\mathsf T}}{2}}_{\text{antisymmetric}},

and a matrix that is both is zero (A=AA = -A): the two sets are supplementary subspaces of Mn(K)\mathcal{M}_n(K) — the exact analogue of the even/odd split of functions (Example 18.11), with transposition playing the role of xxx \mapsto -x. Dimensions: a symmetric matrix is free on and above the diagonal, an antisymmetric one strictly above (zero diagonal):

n(n+1)2+n(n1)2=n2,\frac{n(n+1)}{2} + \frac{n(n-1)}{2} = n^2 ,

and the count balancing is Grassmann’s confirmation of directness. For n=2n = 2: (1512)=(1332)+(0220)\begin{pmatrix} 1 & 5\\ 1 & 2\end{pmatrix} = \begin{pmatrix} 1 & 3\\ 3 & 2\end{pmatrix} + \begin{pmatrix} 0 & 2\\ -2 & 0\end{pmatrix}. Symmetric matrices return as the second-derivative data of Chapter 25 (the Monge triple r,s,tr, s, t), and the symmetric-orthogonal ones are classified in Exercise 23.12.

21.2 Change of basis

Definition 21.8

Let B,B\mathcal{B}, \mathcal{B}' be bases of EE. The change of basis matrix P=PBBP = P_{\mathcal{B}\to\mathcal{B}'} has for columns the coordinates of the new basis vectors in the old basis. It is invertible, P1=PBBP^{-1} = P_{\mathcal{B}'\to\mathcal{B}}, and coordinates transform by X=PXX = PX' (old == PP\,\cdot new).

Example 21.9 (Reading the change-of-basis matrix)

In R2\R^2, from the canonical B\mathcal B to B=((1,1),(1,1))\mathcal B' = \bigl((1,1), (1,-1)\bigr):

P=PBB=(1111)P = P_{\mathcal B\to\mathcal B'} = \begin{pmatrix} 1 & 1\\ 1 & -1 \end{pmatrix}

(new vectors written in old coordinates, column by column). The vector of old coordinates X=(3,1)TX = (3, 1)^{\mathsf T} has new coordinates X=P1X=12(3+1, 31)T=(2,1)TX' = P^{-1}X = \frac12(3 + 1,\ 3 - 1)^{\mathsf T} = (2, 1)^{\mathsf T}: indeed 2(1,1)+1(1,1)=(3,1)2(1,1) + 1(1,-1) = (3,1). Mind the direction — the matrix PP is built from the new basis but converts new to old coordinates (X=PXX = PX'); passing from old to new costs the inverse. Writing the sanity check 2(1,1)+(1,1)=(3,1)2(1,1) + (1,-1) = (3,1) after every conversion catches the inverted-PP error, which is the most common mistake of the chapter.

Theorem 21.10 (Change of basis for a map)

Let uL(E)u \in \mathcal{L}(E) with matrix AA in B\mathcal{B} and AA' in B\mathcal{B}', and P=PBBP = P_{\mathcal{B}\to\mathcal{B}'}. Then

A=P1AP.A' = P^{-1} A\, P .

Two matrices related this way are similar. (For u ⁣:EFu \colon E \to F with two pairs of bases, the formula is A=Q1APA' = Q^{-1} A Pequivalent matrices.)

Proof. For any xx: X=PXX = PX' and the image satisfies Y=AXY = AX, Y=PYY = PY'. So PY=APXPY' = APX', i.e. Y=(P1AP)XY' = (P^{-1}AP)X' for all XX': the matrix of uu in the new basis is P1APP^{-1}AP (take for XX' the canonical columns).

Example 21.11 (A good basis makes a map transparent)

Let u(x,y)=(y,x)u(x, y) = (y, x) (swap), with matrix A=(0110)A = \begin{pmatrix} 0 & 1\\ 1 & 0\end{pmatrix} in the canonical basis. In the basis B=((1,1),(1,1))\mathcal B' = \bigl((1,1), (1,-1)\bigr):

P=(1111),P1=12(1111),P1AP=(1001).P = \begin{pmatrix} 1 & 1\\ 1 & -1 \end{pmatrix}, \qquad P^{-1} = \frac12\begin{pmatrix} 1 & 1\\ 1 & -1 \end{pmatrix}, \qquad P^{-1} A P = \begin{pmatrix} 1 & 0\\ 0 & -1 \end{pmatrix}.

No matrix product was really needed: uu fixes (1,1)(1,1) and reverses (1,1)(1,-1), so in B\mathcal B' its matrix must be diag(1,1)\operatorname{diag}(1, -1) — the swap is the reflection across the line y=xy = x. Finding, for a given endomorphism, a basis in which its matrix becomes diagonal is the central problem of the Year 2 volume (reduction theory); the weekend problem below shows how far polynomial identities alone already go.

Example 21.12 (Change of basis, run in reverse)

The projection onto F=Vect(1,1)F = \operatorname{Vect}(1,1) along G=Vect(1,1)G = \operatorname{Vect}(1,-1) has, in the adapted basis B=((1,1),(1,1))\mathcal B' = \bigl((1,1),(1,-1)\bigr), the transparent matrix A=diag(1,0)A' = \operatorname{diag}(1, 0). To get its canonical-basis matrix, run Theorem 21.10 backwards, A=PAP1A = P A' P^{-1}:

P=(1111),P1=12(1111),A=P(1000)P1=12(1111).P = \begin{pmatrix} 1 & 1\\ 1 & -1\end{pmatrix}, \quad P^{-1} = \frac12\begin{pmatrix} 1 & 1\\ 1 & -1\end{pmatrix}, \quad A = P\begin{pmatrix} 1 & 0\\ 0 & 0\end{pmatrix}P^{-1} = \frac12\begin{pmatrix} 1 & 1\\ 1 & 1\end{pmatrix}.

Check: A2=AA^2 = A (idempotent), trA=1=rkA\operatorname{tr} A = 1 = \operatorname{rk} A, and A(11)=(11)A\binom{1}{1} = \binom11, A(11)=0A\binom{1}{-1} = 0, as prescribed. This reverse direction — design the matrix in the good basis, then conjugate back — is how rotation, reflection and projection matrices are actually produced in practice.

Theorem 21.13 (Rank normal form)

The rank of a matrix (the rank of its columns, equivalently of the associated linear map) is the only invariant of equivalence: every AMn,pA \in \mathcal{M}_{n,p} of rank rr is equivalent to

Jr=(Ir000),J_r = \begin{pmatrix} I_r & 0 \\ 0 & 0 \end{pmatrix},

and rk(AT)=rk(A)\operatorname{rk}(A^{\mathsf T}) = \operatorname{rk}(A): row rank equals column rank.

Proof. Let u ⁣:EFu \colon E \to F have rank rr. Choose a supplementary SS of keru\ker u (dimS=r\dim S = r, Theorem 20.7) with basis (e1,,er)(e_1, \dots, e_r), completed by a basis of keru\ker u into a basis of EE; the images fi=u(ei)f_i = u(e_i), iri \leq r, form a basis of imu\operatorname{im} u (the restriction is an isomorphism), completed into a basis of FF. In these bases the matrix of uu is exactly JrJ_r. So A=QJrP1A = Q J_r P^{-1} for invertible P,QP, Q.

Transposing: AT=(P1)TJrTQTA^{\mathsf T} = (P^{-1})^{\mathsf T} J_r^{\mathsf T} Q^{\mathsf T} with JrTJ_r^{\mathsf T} of the same form (rank rr) and the outer factors invertible (transpose of invertible is invertible, from (AB)T=BTAT(AB)^{\mathsf T} = B^{\mathsf T}A^{\mathsf T} applied to AA1=IAA^{-1} = I): rkAT=r\operatorname{rk} A^{\mathsf T} = r.

21.3 Row operations

Method 21.14 (Gaussian elimination on matrices)

The three elementary row operations — swap two rows, multiply a row by λ0\lambda \neq 0, add a multiple of a row to another — do not change the rank (each is left multiplication by an invertible matrix). Algorithm: create a pivot (leftmost nonzero entry), clear its column below, move to the next row and column; the number of pivots of the resulting echelon form is the rank.

Inverse computation: run the algorithm on the block (AIn)(A \mid I_n) until the left block becomes InI_n (possible iff AA is invertible); the right block is then A1A^{-1} — indeed the product of the elementary matrices used equals A1A^{-1}.

Example 21.15

A=(1234)A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}: reduce (AI2)(A \mid I_2):

(12103401)(12100231)(1021013212),\begin{pmatrix} 1 & 2 & 1 & 0\\ 3 & 4 & 0 & 1 \end{pmatrix} \to \begin{pmatrix} 1 & 2 & 1 & 0\\ 0 & -2 & -3 & 1 \end{pmatrix} \to \begin{pmatrix} 1 & 0 & -2 & 1\\ 0 & 1 & \tfrac32 & -\tfrac12 \end{pmatrix},

(operations: L2L23L1L_2 \leftarrow L_2 - 3L_1; then L1L1+L2L_1 \leftarrow L_1 + L_2, L212L2L_2 \leftarrow -\frac12 L_2). So A1=(213212)A^{-1} = \begin{pmatrix} -2 & 1 \\ \tfrac32 & -\tfrac12\end{pmatrix}. Check: AA1=I2AA^{-1} = I_2.

Example 21.16 (Rank with a parameter, by rows alone)

For mRm \in \R, the rank of Mm=(11m1m1m11)M_m = \begin{pmatrix} 1 & 1 & m\\ 1 & m & 1\\ m & 1 & 1\end{pmatrix}. Reduce: L2L2L1L_2 \leftarrow L_2 - L_1 and L3L3mL1L_3 \leftarrow L_3 - mL_1 give the rows

(1, 1, m),(0, m1, 1m),(0, 1m, 1m2).(1,\ 1,\ m), \qquad (0,\ m - 1,\ 1 - m), \qquad (0,\ 1 - m,\ 1 - m^2).

Case m=1m = 1: the last two rows vanish — one pivot, rkM1=1\operatorname{rk} M_1 = 1 (all three original rows were equal). Case m1m \neq 1: scale L2L_2 by 1m1\frac1{m-1} and L3L_3 by 11m\frac1{1-m} to get (0,1,1)(0, 1, -1) and (0,1,1+m)(0, 1, 1 + m), then L3L3L2=(0,0,m+2)L_3 \leftarrow L_3 - L_2 = (0, 0, m + 2). If m=2m = -2: two pivots, rank 22; otherwise three pivots, rank 33. Summary:

rkMm={1m=1,2m=2,3otherwise.\operatorname{rk} M_m = \begin{cases} 1 & m = 1,\\ 2 & m = -2,\\ 3 & \text{otherwise}. \end{cases}

The same thresholds will drop out of one determinant computation in Chapter 22 (the polynomial (m+2)(m1)2-(m+2)(m-1)^2 of Exercise 22.7) — but note what elimination gives that the determinant does not: the value of the rank in the degenerate cases, not just the fact that it dropped.

Example 21.17 (Computing powers)

A=(1101)=I+NA = \begin{pmatrix} 1 & 1 \\ 0 & 1\end{pmatrix} = I + N with N=E12N = E_{12}, N2=0N^2 = 0. Since II and NN commute, the binomial theorem (Proposition 7.20) truncates:

Ak=I+kN=(1k01)(kN, and kZ using A1=IN).A^k = I + kN = \begin{pmatrix} 1 & k \\ 0 & 1 \end{pmatrix} \qquad (k \in \N, \text{ and } k \in \Z \text{ using } A^{-1} = I - N).

Method 21.18 (Computing AnA^n: the three routes)

  1. Binomial route: if A=λI+NA = \lambda I + N with NN nilpotent, the binomial theorem truncates (Example 21.17, Exercise 21.5); it applies because λI\lambda I commutes with everything.
  2. Polynomial route: find a polynomial identity satisfied by AA (in dimension 22, always A2=sApIA^2 = sA - pI) and reduce XnX^n modulo it; the weekend problem below builds this route completely.
  3. Similarity route: find an invertible PP with P1AP=DP^{-1}AP = D simple (diagonal, or shift), compute DnD^n, and undo: An=PDnP1A^n = P D^n P^{-1} (Theorem 21.10, Example 21.11); the systematic search for such PP is Year 2’s reduction theory.

Whatever the route, check the result on n=0,1,2n = 0, 1, 2: three cheap tests that catch nearly every slip.

Remark 21.19 (Common pitfalls: the price of non-commutativity)

Every identity of scalar algebra whose proof reorders factors dies in Mn(K)\mathcal{M}_n(K), n2n \geq 2. Squares: (A+B)2=A2+AB+BA+B2(A + B)^2 = A^2 + AB + BA + B^2, and the middle collapses to 2AB2AB only if AB=BAAB = BA (Exercise 21.1). Powers of products: (AB)k(AB)^k is ABABABAB\cdots, not AkBkA^kB^k. Zero divisors: E12E12=0E_{12}E_{12} = 0 with E120E_{12} \neq 0; consequently no cancellation: AB=ACAB = AC implies B=CB = C only when AA is invertible (multiply by A1A^{-1} — on the correct side). Traces: tr(AB)=tr(BA)\operatorname{tr}(AB) = \operatorname{tr}(BA) always, but tr(AB)trAtrB\operatorname{tr}(AB) \neq \operatorname{tr}A\operatorname{tr}B in general (take A=B=I2A = B = I_2: 242 \neq 4), and tr(ABC)=tr(BCA)\operatorname{tr}(ABC) = \operatorname{tr}(BCA) (cyclic) while tr(ACB)\operatorname{tr}(ACB) may differ. Transposes reverse: (AB)T=BTAT(AB)^{\mathsf T} = B^{\mathsf T}A^{\mathsf T} — forgetting the reversal is the most common error in orthogonality computations (Chapter 23). When in doubt, test any claimed identity on E12E_{12} and E21E_{21}: the smallest non-commuting pair refutes most false formulas in one line.

Remark 21.20 (Where the dictionary goes)

The matrix dictionary is used on every remaining page of this volume: Chapter 22 attaches to each square matrix a single number deciding invertibility, and solves AX=BAX = B systematically; Chapter 23 singles out the matrices preserving lengths (orthogonal matrices); and in Chapter 25, the second-order behavior of a function of two variables is a symmetric 2×22 \times 2 matrix. The trace, introduced above almost in passing, becomes a powerful invariant: Exercises 21.6 and 21.8 give a first taste, and the Year 2 volume builds eigenvalue theory on it. The weekend problem develops the other workhorse: polynomial identities satisfied by a matrix, which turn the computation of AnA^n into a two-term linear recurrence.

Remark 21.21 (Perspectives inside Book 3)

Three matrix families introduced here have appointments later in this volume. Symmetric matrices (Example 21.7) carry the second-order data of functions of two variables: the Monge test of Chapter 25 is a statement about the sign behavior of a symmetric 2×22\times2 matrix, and its determinant rts2rt - s^2 is computed by Chapter 22’s machinery. Orthogonal matrices (ATA=IA^{\mathsf T}A = I) are the isometries of Chapter 23, where the transpose finally acquires its geometric meaning: it is the algebraic shadow of the inner product. Invertible matrices meet their practical test in Chapter 22 — one number, detA0\det A \neq 0 — closing the search this chapter began with row reduction. Trace and determinant then travel as the invariant pair (s,p)(s, p) of the weekend problem, all the way to the eigenvalue theory of Year 2.

21.4 Exercises

Exercise 21.1

Let A=(1201)A = \begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix} and B=(0110)B = \begin{pmatrix} 0 & 1 \\ 1 & 0\end{pmatrix}. Compute ABAB, BABA, A2B2A^2 - B^2 and (A+B)(AB)(A+B)(A-B); explain why the last two differ.

Solution

Solution of Exercise 21.1.

AB=(2110),BA=(0112),A2B2=(1401)I=(0400),AB = \begin{pmatrix} 2 & 1\\ 1 & 0\end{pmatrix}, \quad BA = \begin{pmatrix} 0 & 1\\ 1 & 2\end{pmatrix}, \quad A^2 - B^2 = \begin{pmatrix} 1 & 4\\ 0 & 1\end{pmatrix} - I = \begin{pmatrix} 0 & 4\\ 0 & 0\end{pmatrix},
(A+B)(AB)=A2AB+BAB2=(0400)+(2002)=(2402).(A+B)(A-B) = A^2 - AB + BA - B^2 = \begin{pmatrix} 0 & 4\\ 0 & 0\end{pmatrix} + \begin{pmatrix} -2 & 0\\ 0 & 2 \end{pmatrix} = \begin{pmatrix} -2 & 4\\ 0 & 2\end{pmatrix}.

They differ by BAAB0BA - AB \neq 0: the identity (a+b)(ab)=a2b2(a+b)(a-b) = a^2 - b^2 requires commutativity, which fails here.

Exercise 21.2

Compute the rank of

M=(123246111),N=(110201111213).M = \begin{pmatrix} 1 & 2 & 3\\ 2 & 4 & 6\\ 1 & 1 & 1 \end{pmatrix}, \qquad N = \begin{pmatrix} 1 & 1 & 0 & 2\\ 0 & 1 & 1 & 1\\ 1 & 2 & 1 & 3 \end{pmatrix}.
Solution

Solution of Exercise 21.2.

MM: L2L22L1L_2 \leftarrow L_2 - 2L_1 kills the second row; L3L3L1L_3 \leftarrow L_3 - L_1 gives (0,1,2)(0, -1, -2). Two pivots: rkM=2\operatorname{rk} M = 2.

NN: L3L3L1L_3 \leftarrow L_3 - L_1 gives (0,1,1,1)=L2(0,1,1,1) = L_2; then L3L3L2=0L_3 \leftarrow L_3 - L_2 = 0. Two pivots: rkN=2\operatorname{rk} N = 2.

Exercise 21.3

Invert, by row reduction, A=(101211111)A = \begin{pmatrix} 1 & 0 & 1\\ 2 & 1 & 1\\ 1 & 1 & 1 \end{pmatrix}, and check on one product.

Solution

Solution of Exercise 21.3.

Reducing (AI3)(A \mid I_3): L2L22L1L_2 \leftarrow L_2 - 2L_1, L3L3L1L_3 \leftarrow L_3 - L_1:

(101100011210010101)L3L3L2(101100011210001111),\begin{pmatrix} 1 & 0 & 1 & 1 & 0 & 0\\ 0 & 1 & -1 & -2 & 1 & 0\\ 0 & 1 & 0 & -1 & 0 & 1 \end{pmatrix} \xrightarrow{L_3 \leftarrow L_3 - L_2} \begin{pmatrix} 1 & 0 & 1 & 1 & 0 & 0\\ 0 & 1 & -1 & -2 & 1 & 0\\ 0 & 0 & 1 & 1 & -1 & 1 \end{pmatrix},

then L1L1L3L_1 \leftarrow L_1 - L_3, L2L2+L3L_2 \leftarrow L_2 + L_3:

A1=(011101111).A^{-1} = \begin{pmatrix} 0 & 1 & -1\\ -1 & 0 & 1\\ 1 & -1 & 1 \end{pmatrix}.

Check: first row of AA times first column of A1A^{-1}: 10+0(1)+11=11 \cdot 0 + 0\cdot(-1) + 1\cdot 1 = 1; times second column: 101=01 - 0 - 1 = 0; times third: 1+0+1=0-1 + 0 + 1 = 0.

Exercise 21.4

Write the matrix, in the canonical basis of R2[X]\R_2[X], of the endomorphism u(P)=P(X+1)u(P) = P(X + 1). Explain, without computation, why it is invertible, and give the matrix of u1u^{-1}.

Solution

Solution of Exercise 21.4.

u(1)=1u(1) = 1, u(X)=X+1u(X) = X + 1, u(X2)=X2+2X+1u(X^2) = X^2 + 2X + 1: columns of coordinates in (1,X,X2)(1, X, X^2) give

M=(111012001).M = \begin{pmatrix} 1 & 1 & 1\\ 0 & 1 & 2\\ 0 & 0 & 1 \end{pmatrix}.

uu is invertible because it has the obvious inverse PP(X1)P \mapsto P(X - 1) (composition of substitutions). Its matrix is obtained the same way from u1(Xk)=(X1)ku^{-1}(X^k) = (X-1)^k:

M1=(111012001).M^{-1} = \begin{pmatrix} 1 & -1 & 1\\ 0 & 1 & -2\\ 0 & 0 & 1 \end{pmatrix}.

Exercise 21.5 ★★

Let A=(2102)A = \begin{pmatrix} 2 & 1 \\ 0 & 2\end{pmatrix}. Write A=2I+NA = 2I + N, compute N2N^2, and deduce AkA^k for all kNk \in \N by the binomial theorem.

Solution

Solution of Exercise 21.5.

N=(0100)N = \begin{pmatrix} 0 & 1\\ 0 & 0\end{pmatrix}, N2=0N^2 = 0. Since 2I2I and NN commute, the binomial expansion truncates after two terms:

Ak=(2I+N)k=2kI+k2k1N=(2kk2k102k).A^k = (2I + N)^k = 2^k I + k\,2^{k-1} N = \begin{pmatrix} 2^k & k\,2^{k-1}\\ 0 & 2^k\end{pmatrix}.

(Check k=2k = 2: A2=(4404)A^2 = \begin{pmatrix}4 & 4\\ 0 & 4\end{pmatrix}, correct by direct product.)

Exercise 21.6 ★★

Prove that there are no matrices A,BMn(K)A, B \in \mathcal{M}_n(K) (with K=RK = \R or C\C) such that ABBA=InAB - BA = I_n. (Take traces.)

Solution

Solution of Exercise 21.6.

Traces: tr(ABBA)=tr(AB)tr(BA)=0\operatorname{tr}(AB - BA) = \operatorname{tr}(AB) - \operatorname{tr}(BA) = 0 (Definition 21.5), while tr(In)=n0\operatorname{tr}(I_n) = n \neq 0 in R\R or C\C. No solution. (On infinite-dimensional spaces the identity is realizable — differentiation and multiplication by xx satisfy it — precisely because no trace exists there.)

Exercise 21.7 ★★

A matrix AA is nilpotent when Am=0A^m = 0 for some mm. Prove that IAI - A is then invertible, with

(IA)1=I+A+A2++Am1.(I - A)^{-1} = I + A + A^2 + \dots + A^{m-1} .

Application: invert (123012001)\begin{pmatrix} 1 & 2 & 3\\ 0 & 1 & 2\\ 0 & 0 & 1\end{pmatrix}.

Solution

Solution of Exercise 21.7.

Telescoping product, all powers of AA commuting:

(IA)(I+A++Am1)=IAm=I,(I - A)(I + A + \dots + A^{m-1}) = I - A^m = I ,

and Proposition 21.4 upgrades the one-sided inverse. For the application: the given matrix is I+NI + N with

N=(023002000),N2=(004000000),N3=0,N = \begin{pmatrix} 0 & 2 & 3\\ 0 & 0 & 2\\ 0&0&0 \end{pmatrix}, \quad N^2 = \begin{pmatrix} 0&0&4\\ 0&0&0\\ 0&0&0\end{pmatrix}, \quad N^3 = 0 ,

so, replacing AA by N-N in the formula:

(I+N)1=IN+N2=(121012001).(I + N)^{-1} = I - N + N^2 = \begin{pmatrix} 1 & -2 & 1\\ 0 & 1 & -2\\ 0 & 0 & 1 \end{pmatrix}.

Exercise 21.8 ★★

Let AMn(R)A \in \mathcal{M}_n(\R) satisfy A2=AA^2 = A (idempotent). Prove that trA=rkA\operatorname{tr} A = \operatorname{rk} A. (Interpret AA as a projection and choose an adapted basis; Theorem 21.10 says the trace is basis-independent since tr(P1MP)=trM\operatorname{tr}(P^{-1}MP) = \operatorname{tr} M.)

Solution

Solution of Exercise 21.8.

A2=AA^2 = A: the endomorphism aa is a projection (Theorem 20.15), E=imakeraE = \operatorname{im} a \oplus \ker a with dimima=r=rkA\dim\operatorname{im} a = r = \operatorname{rk} A. In a basis adapted to this decomposition (rr vectors of the image, then a basis of the kernel), the matrix of aa is (Ir000)\begin{pmatrix} I_r & 0\\ 0 & 0\end{pmatrix}, of trace rr. The trace is invariant under change of basis: tr(P1MP)=tr(MPP1)=trM\operatorname{tr}(P^{-1}MP) = \operatorname{tr}(MPP^{-1}) = \operatorname{tr} M by the cyclic identity. Hence trA=r=rkA\operatorname{tr} A = r = \operatorname{rk} A.

Exercise 21.9 ★★★

Let JMn(R)J \in \mathcal{M}_n(\R) be the all-ones matrix. Compute J2J^2, and deduce, for a,bRa, b \in \R, the condition of invertibility of M=aI+bJM = aI + bJ together with M1M^{-1} (look for an inverse of the same form αI+βJ\alpha I + \beta J).

Solution

Solution of Exercise 21.9.

J2=nJJ^2 = nJ (each entry of J2J^2 sums nn ones). Seek M1=αI+βJM^{-1} = \alpha I + \beta J:

(aI+bJ)(αI+βJ)=aαI+(aβ+bα+nbβ)J.(aI + bJ)(\alpha I + \beta J) = a\alpha\, I + (a\beta + b\alpha + nb\beta)\, J .

This equals II iff aα=1a\alpha = 1 and aβ+bα+nbβ=0a\beta + b\alpha + nb\beta = 0, i.e. α=1a\alpha = \frac1a and β(a+nb)=ba\beta(a + nb) = -\frac ba. If a0a \neq 0 and a+nb0a + nb \neq 0:

M1=1aIba(a+nb)J.M^{-1} = \frac 1a I - \frac{b}{a(a + nb)}\, J .

Conversely, if a=0a = 0: M=bJM = bJ has rank 1<n\leq 1 < n (for n2n \geq 2): not invertible (n=1n = 1 is the scalar case). If a+nb=0a + nb = 0: the vector v=(1,,1)Tv = (1, \dots, 1)^{\mathsf T} satisfies Mv=(a+nb)v=0Mv = (a + nb)v = 0 with v0v \neq 0: not invertible. So MGLn    a0M \in GL_n \iff a \neq 0 and a+nb0a + nb \neq 0.

Exercise 21.10 ★★★

(Rank inequalities) For A,BMn(K)A, B \in \mathcal{M}_n(K), prove

rk(A+B)rkA+rkB,rk(AB)rkA+rkBn.\operatorname{rk}(A + B) \leq \operatorname{rk} A + \operatorname{rk} B, \qquad \operatorname{rk}(AB) \geq \operatorname{rk} A + \operatorname{rk} B - n .

(For the second — Sylvester’s inequality — apply rank–nullity to the restriction of the map of AA to imB\operatorname{im} B.)

Solution

Solution of Exercise 21.10.

Sum: im(A+B)imA+imB\operatorname{im}(A + B) \subseteq \operatorname{im} A + \operatorname{im} B (each (A+B)x=Ax+Bx(A+B)x = Ax + Bx), and Grassmann bounds the dimension of a sum by the sum of dimensions.

Sylvester: let aa be the map of AA restricted to V=imBV = \operatorname{im} B (dimension rkB\operatorname{rk} B). Its image is im(AB)\operatorname{im}(AB) (a(Bx)=ABxa(Bx) = ABx), and rank–nullity in VV:

rkB=dimker(aV)+rk(AB).\operatorname{rk} B = \dim\ker(a_{|V}) + \operatorname{rk}(AB) .

Now ker(aV)kerA\ker(a_{|V}) \subseteq \ker A, of dimension nrkAn - \operatorname{rk} A: so

rk(AB)rkB(nrkA)=rkA+rkBn.\operatorname{rk}(AB) \geq \operatorname{rk} B - (n - \operatorname{rk} A) = \operatorname{rk} A + \operatorname{rk} B - n . \qedhere

Exercise 21.11 ★★

Let D=diag(d1,,dn)D = \operatorname{diag}(d_1, \dots, d_n) with the did_i pairwise distinct.

  1. Prove that a matrix AA commutes with DD if and only if AA is diagonal. (Compare the (i,j)(i,j) entries of ADAD and DADA.)
  2. Deduce the center of Mn(K)\mathcal{M}_n(K): the matrices commuting with every matrix are exactly the scalar matrices λIn\lambda I_n. (Test against DD, then against the matrices EijE_{ij}.)
Solution

Solution of Exercise 21.11.

  1. Entrywise, (AD)ij=aijdj(AD)_{ij} = a_{ij}\,d_j and (DA)ij=diaij(DA)_{ij} = d_i\,a_{ij}. So AD=DAAD = DA iff aij(djdi)=0a_{ij}(d_j - d_i) = 0 for all i,ji, j; when iji \neq j the factor djdid_j - d_i is nonzero, forcing aij=0a_{ij} = 0: AA is diagonal. Conversely diagonal matrices commute with each other.
  2. If AA commutes with every matrix, it commutes with diag(1,2,,n)\operatorname{diag}(1, 2, \dots, n), so A=diag(λ1,,λn)A = \operatorname{diag}(\lambda_1, \dots, \lambda_n) by (1). Then AEij=λiEijA E_{ij} = \lambda_i E_{ij} (only row ii of EijE_{ij} survives) while EijA=λjEijE_{ij} A = \lambda_j E_{ij}: commuting with EijE_{ij} forces λi=λj\lambda_i = \lambda_j. Hence A=λInA = \lambda I_n; and scalar matrices do commute with everything. The center of Mn(K)\mathcal{M}_n(K) is KInK\,I_n.

Exercise 21.12 ★★★

(Rank-one matrices) Let AMn(K)A \in \mathcal{M}_n(K), A0A \neq 0.

  1. Prove that rkA=1\operatorname{rk} A = 1 if and only if A=CLA = CL for a nonzero column CMn,1C \in \mathcal{M}_{n,1} and a nonzero row LM1,nL \in \mathcal{M}_{1,n}.
  2. For such an AA, prove A2=(trA)AA^2 = (\operatorname{tr} A)\,A; deduce that a rank-one matrix is nilpotent if and only if its trace is zero.
  3. If trA1\operatorname{tr} A \neq -1, prove that In+AI_n + A is invertible with

    (In+A)1=In11+trAA,(I_n + A)^{-1} = I_n - \frac{1}{1 + \operatorname{tr} A}\,A ,

    and that In+AI_n + A is not invertible when trA=1\operatorname{tr} A = -1. (Find a vector killed by In+AI_n + A.)

Solution

Solution of Exercise 21.12.

  1. If rkA=1\operatorname{rk} A = 1: the image of AA is a line Vect(C)\operatorname{Vect}(C), C0C \neq 0, so the jj-th column of AA is jC\ell_j\,C for scalars j\ell_j (not all zero), i.e. A=CLA = C L with L=(1,,n)0L = (\ell_1, \dots, \ell_n) \neq 0. Conversely if A=CL0A = CL \neq 0, all columns are multiples of CC: rank 11.
  2. A2=C(LC)LA^2 = C\,(L C)\,L, and LCLC is the scalar iici=tr(CL)=trA\sum_i \ell_i c_i = \operatorname{tr}(CL) = \operatorname{tr} A. So A2=(trA)AA^2 = (\operatorname{tr} A)\,A, hence by induction Am=(trA)m1AA^m = (\operatorname{tr} A)^{m-1} A. If trA0\operatorname{tr} A \neq 0, no power vanishes; if trA=0\operatorname{tr} A = 0, then A2=0A^2 = 0: a rank-one matrix is nilpotent iff its trace is zero.
  3. With t=trA1t = \operatorname{tr} A \neq -1:

    (In+A)(InA1+t)=In+AA+A21+t=In+A(1+t)A1+t=In,(I_n + A)\Bigl(I_n - \frac{A}{1 + t}\Bigr) = I_n + A - \frac{A + A^2}{1 + t} = I_n + A - \frac{(1 + t)A}{1 + t} = I_n ,

    using A2=tAA^2 = tA. If t=1t = -1: (In+A)A=A+A2=AA=0(I_n + A)A = A + A^2 = A - A = 0 with A0A \neq 0, so In+AI_n + A kills every (nonzero) column of AA: not injective, not invertible.

21.5 Problem: powers of a matrix by polynomial division

Problem 21.1

Computing A100A^{100} entry by entry is hopeless; computing it through a polynomial identity satisfied by AA is three lines. This problem builds the method from scratch: euclidean division of XnX^n, the identity A2sA+pI=0A^2 - sA + pI = 0 verified by every 2×22 \times 2 matrix (the Cayley–Hamilton theorem in dimension 22), and the dictionary between matrix powers and linear recurrences — with the Fibonacci numbers as running example.

Part I — The remainder calculus. Fix s,pKs, p \in K and D=X2sX+pD = X^2 - sX + p.

  1. Justify that for each nNn \in \N there are unique QnK[X]Q_n \in K[X] and (an,bn)K2(a_n, b_n) \in K^2 with

    Xn=QnD+anX+bn,X^n = Q_n\,D + a_n X + b_n ,

    and compute (a0,b0)(a_0, b_0) and (a1,b1)(a_1, b_1).

  2. Multiplying by XX and dividing again, establish the recurrences

    an+1=san+bn,bn+1=pan,a_{n+1} = s\,a_n + b_n, \qquad b_{n+1} = -p\,a_n ,

    and deduce an+2=san+1pana_{n+2} = s\,a_{n+1} - p\,a_n: the coefficient sequence obeys the linear recurrence attached to DD.

  3. Suppose DD has two distinct roots λμ\lambda \neq \mu. Evaluating the division identity, prove

    an=λnμnλμ,bn=λμnμλnλμ.a_n = \frac{\lambda^n - \mu^n}{\lambda - \mu}, \qquad b_n = \frac{\lambda\mu^n - \mu\lambda^n}{\lambda - \mu} .
  4. Suppose D=(Xλ)2D = (X - \lambda)^2. Using the derivative of the division identity, prove an=nλn1a_n = n\lambda^{n-1} and bn=(1n)λnb_n = (1 - n)\lambda^{n}.
  5. Show that substituting a fixed matrix MMk(K)M \in \mathcal{M}_k(K) into polynomials respects sums and products: (PQ)(M)=P(M)Q(M)(PQ)(M) = P(M)\,Q(M). Deduce that if D(M)=0D(M) = 0, then

    Mn=anM+bnI(nN).M^n = a_n\,M + b_n\,I \qquad (n \in \N).

Part II — Dimension 2: trace, determinant number, Cayley–Hamilton. For A=(abcd)A = \begin{pmatrix} a & b\\ c & d\end{pmatrix} set s=a+d=trAs = a + d = \operatorname{tr} A and p=adbcp = ad - bc (the number that Chapter 22 will name the determinant).

  1. Verify by direct computation the Cayley–Hamilton identity in dimension 22:

    A2sA+pI2=0.A^2 - s\,A + p\,I_2 = 0 .
  2. Prove by direct expansion that pp is multiplicative: with obvious notation, p(AB)=p(A)p(B)p(AB) = p(A)\,p(B). Then show: AA is invertible if and only if p0p \neq 0, in which case

    A1=1p(sI2A).A^{-1} = \frac1p\,\bigl(s\,I_2 - A\bigr).
  3. Let A=(1102)A = \begin{pmatrix} 1 & 1\\ 0 & 2\end{pmatrix}. Compute ss, pp, the roots of DD, and deduce a closed formula for AnA^n; check it against a direct computation of A2A^2.
  4. Let A=(3111)A = \begin{pmatrix} 3 & 1\\ -1 & 1\end{pmatrix}. Show that DD has a double root and compute AnA^n; check at n=2n = 2.
  5. Let F=(1110)F = \begin{pmatrix} 1 & 1\\ 1 & 0\end{pmatrix} and define the Fibonacci numbers by F0=0F_0 = 0, F1=1F_1 = 1, Fn+2=Fn+1+FnF_{n+2} = F_{n+1} + F_n. Prove

    Fn=(Fn+1FnFnFn1)(n1),F^n = \begin{pmatrix} F_{n+1} & F_n\\ F_n & F_{n-1}\end{pmatrix} \quad (n \geq 1),

    deduce Binet’s formula Fn=φnψn5F_n = \dfrac{\varphi^n - \psi^n}{\sqrt5} where φ=1+52\varphi = \frac{1 + \sqrt5}2, ψ=152\psi = \frac{1 - \sqrt5}2, and, using question 7, Cassini’s identity Fn+1Fn1Fn2=(1)nF_{n+1}F_{n-1} - F_n^2 = (-1)^n.

Part III — Linear recurrences, structurally. Fix s,pKs, p \in K with p0p \neq 0, and let EDE_D be the set of sequences with un+2=sun+1punu_{n+2} = s\,u_{n+1} - p\,u_n for all nn.

  1. Show that EDE_D is a vector space of dimension 22 (adapt Exercise 19.10).
  2. Show that the sequence (an)(a_n) of Part I is the element of EDE_D with initial values 0,10, 1, and that every uEDu \in E_D satisfies

    un=u1an+u0bn(nN),u_n = u_1\,a_n + u_0\,b_n \qquad (n \in \N),

    with (bn)(b_n) as in Part I: the division remainders solve all recurrences at once.

  3. If λμ\lambda \neq \mu are the roots of DD, show that ((λn),(μn))\bigl((\lambda^n), (\mu^n)\bigr) is a basis of EDE_D; if D=(Xλ)2D = (X-\lambda)^2 with λ0\lambda \neq 0, show that ((λn),(nλn))\bigl((\lambda^n), (n\lambda^n)\bigr) is one.
  4. Solve completely: un+2=un+1+6unu_{n+2} = u_{n+1} + 6u_n, u0=1u_0 = 1, u1=8u_1 = 8; check the answer on u2u_2 and u3u_3.
  5. Let C=(01ps)C = \begin{pmatrix} 0 & 1\\ -p & s\end{pmatrix} (the companion matrix of DD). Show that

    (unun+1)=Cn(u0u1)(uED),\begin{pmatrix} u_{n}\\ u_{n+1}\end{pmatrix} = C^n \begin{pmatrix} u_0\\ u_1\end{pmatrix} \quad (u \in E_D),

    and that trC=s\operatorname{tr} C = s and p(C)=pp(C) = p: the recurrence and the matrix carry the same polynomial DD.

Part IV — Degree three. Let D3=X3αX2βXγD_3 = X^3 - \alpha X^2 - \beta X - \gamma and

C3=(010001γβα).C_3 = \begin{pmatrix} 0 & 1 & 0\\ 0 & 0 & 1\\ \gamma & \beta & \alpha \end{pmatrix}.
  1. Show that D3(C3)=0D_3(C_3) = 0. (Compute the images of the canonical basis vectors under powers of C3C_3: the map of C3C_3 sends e1e_1 \mapsto \dots \mapsto a combination forced by the last row.)
  2. Show that if D3D_3 has three distinct roots λ1,λ2,λ3\lambda_1, \lambda_2, \lambda_3, the remainder RnR_n of XnX^n divided by D3D_3 is the Lagrange interpolant of the values λin\lambda_i^n at the nodes λi\lambda_i (Theorem 8.23); deduce that every entry of C3nC_3^{\,n} is a fixed linear combination of λ1n,λ2n,λ3n\lambda_1^n, \lambda_2^n, \lambda_3^n.
  3. Solve: un+3=2un+2+un+12unu_{n+3} = 2u_{n+2} + u_{n+1} - 2u_n with u0=0u_0 = 0, u1=1u_1 = 1, u2=1u_2 = 1. (Factor D3=(X1)(X+1)(X2)D_3 = (X - 1)(X + 1)(X - 2).) Check on u3u_3.
  4. Compute the remainder of XnX^n modulo (Xλ)3(X - \lambda)^3 (Taylor expansion of XnX^n at λ\lambda), and deduce a formula for (λI+N)n(\lambda I + N)^n when N3=0N^3 = 0 and NN commutes with everything in sight; check it against the binomial theorem.
  5. Show that for D3D_3 with distinct roots, the general solution of the order-33 recurrence is un=c1λ1n+c2λ2n+c3λ3nu_n = c_1 \lambda_1^n + c_2\lambda_2^n + c_3\lambda_3^n: prove that the three geometric sequences form a basis of the solution space. (For freeness, evaluate a null combination at n=0,1,2n = 0, 1, 2 and recognize an interpolation system at the distinct nodes λi\lambda_i.)

Part V — Fibonacci dividends, and synthesis.

  1. Prove F1+F2++Fn=Fn+21F_1 + F_2 + \dots + F_n = F_{n+2} - 1.
  2. From Fm+n=FmFnF^{m+n} = F^m F^n, derive the addition formula

    Fm+n=Fm+1Fn+FmFn1,F_{m+n} = F_{m+1}F_n + F_m F_{n-1},

    and deduce F2n=Fn(Fn+1+Fn1)F_{2n} = F_n(F_{n+1} + F_{n-1}).

  3. Prove that FnF_n is the nearest integer to φn/5\varphi^n/\sqrt5 for every n0n \geq 0.
  4. Let tn=tr(Fn)=Fn+1+Fn1t_n = \operatorname{tr}(F^n) = F_{n+1} + F_{n-1} (the Lucas numbers LnL_n). Show tn+2=tn+1+tnt_{n+2} = t_{n+1} + t_n, t1=1t_1 = 1, t2=3t_2 = 3, that Ln=φn+ψnL_n = \varphi^n + \psi^n, and recover F2n=FnLnF_{2n} = F_n L_n.
  5. Synthesis, in four sentences: why the powers of a 2×22 \times 2 matrix live in the plane Vect(I,A)\operatorname{Vect}(I, A) of M2(K)\mathcal{M}_2(K) (which dimension argument guarantees a quadratic identity, and which explicit identity Part II produced); how euclidean division converts exponentiation into a two-term recurrence; which statement of this problem is the n=2n = 2 case of a theorem valid in all dimensions (name it, and say where it is proved in this series); and what the companion matrix construction adds to the picture.
Solution

Solution of Problem 21.1.

1. Euclidean division of XnX^n by the degree-22 monic DD (Theorem 8.3): quotient and remainder exist and are unique, and the remainder has degree 1\leq 1: Xn=QnD+anX+bnX^n = Q_n D + a_n X + b_n. For n=0n = 0: Q0=0Q_0 = 0, (a0,b0)=(0,1)(a_0, b_0) = (0, 1); for n=1n = 1: (a1,b1)=(1,0)(a_1, b_1) = (1, 0).

2. Multiply by XX and reduce X2=D+sXpX^2 = D + sX - p:

Xn+1=XQnD+anX2+bnX=(XQn+an)D+(san+bn)Xpan.X^{n+1} = X Q_n D + a_n X^2 + b_n X = (X Q_n + a_n)\,D + (s\,a_n + b_n)\,X - p\,a_n .

The last expression has remainder shape (degree 1\leq 1), so by uniqueness an+1=san+bna_{n+1} = s a_n + b_n and bn+1=panb_{n+1} = -p a_n. Substituting bn+1=panb_{n+1} = -pa_n into an+2=san+1+bn+1a_{n+2} = s a_{n+1} + b_{n+1} gives an+2=san+1pana_{n+2} = s\,a_{n+1} - p\,a_n.

3. Evaluate Xn=QnD+anX+bnX^n = Q_n D + a_n X + b_n at the roots: λn=anλ+bn\lambda^n = a_n\lambda + b_n and μn=anμ+bn\mu^n = a_n\mu + b_n. Subtracting and dividing by λμ0\lambda - \mu \neq 0:

an=λnμnλμ,bn=λnanλ=λμnμλnλμ.a_n = \frac{\lambda^n - \mu^n}{\lambda - \mu}, \qquad b_n = \lambda^n - a_n\lambda = \frac{\lambda\mu^n - \mu\lambda^n}{\lambda - \mu} .

4. At the double root: λn=anλ+bn\lambda^n = a_n\lambda + b_n. Differentiating the identity, nXn1=Qn(Xλ)2+2Qn(Xλ)+annX^{n-1} = Q_n'\,(X - \lambda)^2 + 2Q_n\,(X - \lambda) + a_n, and evaluating at λ\lambda: an=nλn1a_n = n\lambda^{n-1}; then bn=λnnλn=(1n)λnb_n = \lambda^n - n\lambda^{n} = (1 - n)\lambda^{n}.

5. For P=ipiXiP = \sum_i p_i X^i and Q=jqjXjQ = \sum_j q_j X^j,

P(M)Q(M)=i,jpiqjMi+j=(PQ)(M),P(M)\,Q(M) = \sum_{i,j} p_i q_j M^{i+j} = (PQ)(M),

because powers of the single matrix MM commute with each other (sums are clear by linearity). If D(M)=0D(M) = 0, substituting MM into Xn=QnD+anX+bnX^n = Q_n D + a_n X + b_n gives Mn=Qn(M)D(M)+anM+bnI=anM+bnIM^n = Q_n(M)\,D(M) + a_n M + b_n I = a_n M + b_n I.

6. Direct products:

A2=(a2+bcb(a+d)c(a+d)d2+bc),sA=(a(a+d)b(a+d)c(a+d)d(a+d)),A^2 = \begin{pmatrix} a^2 + bc & b(a + d)\\ c(a + d) & d^2 + bc \end{pmatrix}, \qquad s A = \begin{pmatrix} a(a+d) & b(a+d)\\ c(a+d) & d(a+d) \end{pmatrix},

so A2sAA^2 - sA has zero off-diagonal entries and diagonal entries a2+bca2ad=bcad=pa^2 + bc - a^2 - ad = bc - ad = -p: A2sA+pI2=0A^2 - sA + pI_2 = 0.

7. With A=(abcd)A' = \begin{pmatrix} a' & b'\\ c' & d'\end{pmatrix}, expanding p(AA)=(aa+bc)(cb+dd)(ab+bd)(ca+dc)p(AA') = (aa' + bc')(cb' + dd') - (ab' + bd')(ca' + dc'): the terms aacbaa'cb' and abcaab'ca' cancel, the terms bcddbc'dd' and bddcbd'dc' cancel, and what remains is

aaddbcad+bcbcadbc=(adbc)(adbc)=p(A)p(A).aa'dd' - bca'd' + bcb'c' - adb'c' = (ad - bc)(a'd' - b'c') = p(A)\,p(A').

If p0p \neq 0, Cayley–Hamilton gives A(1p(sI2A))=1p(sAA2)=I2A\,\bigl(\tfrac1p(sI_2 - A)\bigr) = \tfrac1p(sA - A^2) = I_2, whence the inverse (and Proposition 21.4 makes it two-sided). If p=0p = 0 and AA were invertible, multiplicativity gives 1=p(I2)=p(A)p(A1)=01 = p(I_2) = p(A)\,p(A^{-1}) = 0: impossible. So AGL2    p0A \in GL_2 \iff p \neq 0.

8. s=3s = 3, p=2p = 2, D=X23X+2=(X1)(X2)D = X^2 - 3X + 2 = (X - 1)(X - 2): λ=2\lambda = 2, μ=1\mu = 1, so an=2n1a_n = 2^n - 1 and bn=22nb_n = 2 - 2^n (question 3). Hence

An=(2n1)A+(22n)I=(12n102n).A^n = (2^n - 1)A + (2 - 2^n)I = \begin{pmatrix} 1 & 2^n - 1\\ 0 & 2^n \end{pmatrix}.

Check: A2=(1304)A^2 = \begin{pmatrix} 1 & 3\\ 0 & 4\end{pmatrix} both by the formula and by squaring directly.

9. s=4s = 4, p=311(1)=4p = 3\cdot1 - 1\cdot(-1) = 4: D=X24X+4=(X2)2D = X^2 - 4X + 4 = (X - 2)^2, double root λ=2\lambda = 2. Question 4: an=n2n1a_n = n\,2^{n-1}, bn=(1n)2nb_n = (1 - n)2^n, so

An=n2n1A+(1n)2nI=2n1(n+2nn2n).A^n = n\,2^{n-1}A + (1 - n)2^n I = 2^{n-1}\begin{pmatrix} n + 2 & n\\ -n & 2 - n \end{pmatrix}.

At n=2n = 2: 2(4220)=(8440)2\begin{pmatrix} 4 & 2\\ -2 & 0\end{pmatrix} = \begin{pmatrix} 8 & 4\\ -4 & 0 \end{pmatrix}, which is A2A^2 computed directly.

10. Induction: F1=(F2F1F1F0)F^1 = \begin{pmatrix} F_2 & F_1\\ F_1 & F_0\end{pmatrix}, and

Fn+1=FnF=(Fn+1+FnFn+1Fn+Fn1Fn)=(Fn+2Fn+1Fn+1Fn).F^{n+1} = F^n F = \begin{pmatrix} F_{n+1} + F_n & F_{n+1}\\ F_n + F_{n-1} & F_n \end{pmatrix} = \begin{pmatrix} F_{n+2} & F_{n+1}\\ F_{n+1} & F_n \end{pmatrix}.

Here s=1s = 1, p=1p = -1, D=X2X1D = X^2 - X - 1 with roots φ,ψ\varphi, \psi (φψ=5\varphi - \psi = \sqrt5, φψ=1\varphi\psi = -1). The sequence (Fn)(F_n) has F0=0=a0F_0 = 0 = a_0, F1=1=a1F_1 = 1 = a_1 and obeys the same recurrence as (an)(a_n): Fn=an=(φnψn)/5F_n = a_n = (\varphi^n - \psi^n)/\sqrt5, Binet’s formula. Cassini: applying question 7’s multiplicativity to FnF^n,

Fn+1Fn1Fn2=p(Fn)=p(F)n=(1)n.F_{n+1}F_{n-1} - F_n^2 = p(F^n) = p(F)^n = (-1)^n .

11. The condition is linear and contains the zero sequence: a subspace. By induction u0,u1u_0, u_1 determine uu linearly, and every pair of initial values is realized by exactly one solution: as in Exercise 19.10, EDE_D is parametrized bijectively and linearly by (u0,u1)K2(u_0, u_1) \in K^2: dimED=2\dim E_D = 2.

12. (an)(a_n) obeys the recurrence (question 2) with a0=0a_0 = 0, a1=1a_1 = 1. So does (bn)(b_n): bn+2=pan+1=p(san+bn)=sbn+1pbnb_{n+2} = -p\,a_{n+1} = -p(s a_n + b_n) = s\,b_{n+1} - p\,b_n (using bn+1=panb_{n+1} = -pa_n twice), with b0=1b_0 = 1, b1=0b_1 = 0. The combination vn=u1an+u0bnv_n = u_1 a_n + u_0 b_n is then a solution with v0=u0v_0 = u_0, v1=u1v_1 = u_1; two solutions with the same initial values coincide (induction), so un=u1an+u0bnu_n = u_1 a_n + u_0 b_n for all nn.

13. (λn)(\lambda^n) is a solution iff λn+2=sλn+1pλn\lambda^{n+2} = s\lambda^{n+1} - p\lambda^n for all nn, i.e. D(λ)=0D(\lambda) = 0 (after dividing by λn0\lambda^n \neq 0; note λ,μ0\lambda, \mu \neq 0 since p=λμ0p = \lambda\mu \neq 0). Freeness of ((λn),(μn))\bigl((\lambda^n), (\mu^n)\bigr): a relation at n=0,1n = 0, 1 gives c+c=0c + c' = 0, cλ+cμ=0c\lambda + c'\mu = 0, so c(λμ)=0c(\lambda - \mu) = 0: c=c=0c = c' = 0. Two free vectors in dimension 22: a basis. Double root: ((nλn))\bigl((n\lambda^n)\bigr) is a solution since, with s=2λs = 2\lambda, p=λ2p = \lambda^2:

s(n+1)λn+1pnλn=λn+2(2(n+1)n)=(n+2)λn+2;s(n+1)\lambda^{n+1} - p\,n\lambda^n = \lambda^{n+2}\bigl(2(n+1) - n\bigr) = (n+2)\lambda^{n+2} ;

freeness at n=0,1n = 0, 1: c=0c = 0, then cλ=0c'\lambda = 0 with λ0\lambda \neq 0.

14. D=X2X6=(X3)(X+2)D = X^2 - X - 6 = (X - 3)(X + 2). General solution un=A3n+B(2)nu_n = A\,3^n + B(-2)^n; the initial conditions give A+B=1A + B = 1 and 3A2B=83A - 2B = 8, so A=2A = 2, B=1B = -1:

un=23n(2)n.u_n = 2\cdot 3^n - (-2)^n .

Check: u2=184=14=u1+6u0u_2 = 18 - 4 = 14 = u_1 + 6u_0; u3=54+8=62=u2+6u1=14+48u_3 = 54 + 8 = 62 = u_2 + 6u_1 = 14 + 48.

15. C(unun+1)=(un+1pun+sun+1)=(un+1un+2)C\begin{pmatrix} u_n\\ u_{n+1}\end{pmatrix} = \begin{pmatrix} u_{n+1}\\ -p\,u_n + s\,u_{n+1}\end{pmatrix} = \begin{pmatrix} u_{n+1}\\ u_{n+2}\end{pmatrix}, and induction gives the formula with CnC^n. Moreover trC=0+s=s\operatorname{tr} C = 0 + s = s and p(C)=0s1(p)=pp(C) = 0\cdot s - 1\cdot(-p) = p: the companion matrix has exactly DD as its Cayley–Hamilton polynomial.

16. For any solution uu of un+3=αun+2+βun+1+γunu_{n+3} = \alpha u_{n+2} + \beta u_{n+1} + \gamma u_n, the state vectors vn=(un,un+1,un+2)Tv_n = (u_n, u_{n+1}, u_{n+2})^{\mathsf T} satisfy C3vn=vn+1C_3 v_n = v_{n+1} (the first two rows shift, the last row applies the recurrence). Hence

D3(C3)v0=v3αv2βv1γv0,D_3(C_3)\,v_0 = v_3 - \alpha v_2 - \beta v_1 - \gamma v_0 ,

whose three components are uk+3αuk+2βuk+1γuk=0u_{k+3} - \alpha u_{k+2} - \beta u_{k+1} - \gamma u_k = 0 (k=0,1,2k = 0, 1, 2). As the initial state v0=(u0,u1,u2)Tv_0 = (u_0, u_1, u_2)^{\mathsf T} ranges over all of K3K^3 (initial values are free), the matrix D3(C3)D_3(C_3) kills every vector: D3(C3)=0D_3(C_3) = 0.

17. Write Xn=QD3+RnX^n = Q\,D_3 + R_n with degRn2\deg R_n \leq 2 and evaluate at each root: λin=Rn(λi)\lambda_i^n = R_n(\lambda_i). So RnR_n is a polynomial of degree 2\leq 2 interpolating the three values λin\lambda_i^n at the three distinct nodes λi\lambda_i: by uniqueness in Theorem 8.23, Rn=iλinLiR_n = \sum_i \lambda_i^n L_i with (Li)(L_i) the Lagrange basis of the nodes. Substituting C3C_3 (questions 5 and 16):

C3n=Rn(C3)=i=13λinLi(C3),C_3^{\,n} = R_n(C_3) = \sum_{i=1}^{3} \lambda_i^n\,L_i(C_3),

with the three matrices Li(C3)L_i(C_3) independent of nn: every entry of C3nC_3^{\,n} is a fixed combination of λ1n,λ2n,λ3n\lambda_1^n, \lambda_2^n, \lambda_3^n.

18. D3=X32X2X+2=(X1)(X+1)(X2)D_3 = X^3 - 2X^2 - X + 2 = (X-1)(X+1)(X-2). General solution un=A+B(1)n+C2nu_n = A + B(-1)^n + C\,2^n. Initial conditions: A+B+C=0A + B + C = 0, AB+2C=1A - B + 2C = 1, A+B+4C=1A + B + 4C = 1. Subtracting the first from the third: 3C=13C = 1, C=13C = \frac13; then A+B=13A + B = -\frac13 and AB=13A - B = \frac13: A=0A = 0, B=13B = -\frac13. Hence

un=2n(1)n3u_n = \frac{2^n - (-1)^n}{3}

(the Jacobsthal numbers). Check: u3=8+13=3=2u2+u12u0=2+10u_3 = \frac{8 + 1}{3} = 3 = 2u_2 + u_1 - 2u_0 = 2 + 1 - 0.

19. Taylor expansion of the polynomial XnX^n at λ\lambda:

Xn=k=0n(nk)λnk(Xλ)k,X^n = \sum_{k=0}^{n} \binom nk \lambda^{n-k}(X - \lambda)^k ,

and all terms with k3k \geq 3 are divisible by (Xλ)3(X - \lambda)^3: the remainder is

Rn=λn+nλn1(Xλ)+(n2)λn2(Xλ)2.R_n = \lambda^n + n\lambda^{n-1}(X - \lambda) + \binom n2\lambda^{n-2}(X - \lambda)^2 .

For M=λI+NM = \lambda I + N with N3=0N^3 = 0: (MλI)3=N3=0(M - \lambda I)^3 = N^3 = 0, so question 5 gives

Mn=λnI+nλn1N+(n2)λn2N2,M^n = \lambda^n I + n\lambda^{n-1} N + \binom n2 \lambda^{n-2} N^2 ,

which is exactly the binomial expansion of (λI+N)n(\lambda I + N)^n truncated at N2N^2 — the two methods agree.

20. The solution space has dimension 33 (same parametrization by (u0,u1,u2)(u_0, u_1, u_2) as in question 11), and each (λin)(\lambda_i^n) is a solution. Freeness: suppose c1λ1n+c2λ2n+c3λ3n=0c_1\lambda_1^n + c_2\lambda_2^n + c_3\lambda_3^n = 0 for n=0,1,2n = 0, 1, 2. Fix ii and let Li=k2pkXkL_i = \sum_{k \leq 2} p_k X^k be the Lagrange polynomial of the nodes with Li(λj)=δijL_i(\lambda_j) = \delta_{ij}. Then

0=k=02pk(jcjλjk)=jcjLi(λj)=ci.0 = \sum_{k=0}^{2} p_k\Bigl(\sum_j c_j\lambda_j^k\Bigr) = \sum_j c_j\,L_i(\lambda_j) = c_i .

So all ci=0c_i = 0: three free solutions in dimension 33, a basis; the general solution is c1λ1n+c2λ2n+c3λ3nc_1\lambda_1^n + c_2\lambda_2^n + c_3\lambda_3^n.

21. From Fk=Fk+2Fk+1F_k = F_{k+2} - F_{k+1}, the sum telescopes:

k=1nFk=k=1n(Fk+2Fk+1)=Fn+2F2=Fn+21.\sum_{k=1}^{n} F_k = \sum_{k=1}^{n}\bigl(F_{k+2} - F_{k+1}\bigr) = F_{n+2} - F_2 = F_{n+2} - 1 .

22. Take the (1,2)(1,2) entry of Fm+n=FmFnF^{m+n} = F^m F^n: the left side is Fm+nF_{m+n}; the right side is (row 11 of FmF^m) times (column 22 of FnF^n), i.e. Fm+1Fn+FmFn1F_{m+1}F_n + F_m F_{n-1}. With m=nm = n:

F2n=Fn+1Fn+FnFn1=Fn(Fn+1+Fn1).F_{2n} = F_{n+1}F_n + F_nF_{n-1} = F_n\,(F_{n+1} + F_{n-1}).

23. By Binet, Fnφn5=ψn5F_n - \dfrac{\varphi^n}{\sqrt5} = -\dfrac{\psi^n}{\sqrt5}, and ψ=512<1\abs\psi = \frac{\sqrt5 - 1}2 < 1, so

Fnφn515<12(n0):\Bigl|F_n - \frac{\varphi^n}{\sqrt5}\Bigr| \leq \frac{1}{\sqrt5} < \frac12 \qquad (n \geq 0):

FnF_n is the nearest integer to φn/5\varphi^n/\sqrt5.

24. tn=Fn+1+Fn1t_n = F_{n+1} + F_{n-1} is a combination of shifted Fibonacci sequences, hence satisfies the same recurrence: tn+2=tn+1+tnt_{n+2} = t_{n+1} + t_n; and t1=F2+F0=1t_1 = F_2 + F_0 = 1, t2=F3+F1=3t_2 = F_3 + F_1 = 3: these are the Lucas numbers LnL_n. The sequence φn+ψn\varphi^n + \psi^n is a solution with the same first two values (φ+ψ=1\varphi + \psi = 1, φ2+ψ2=(φ+ψ)22φψ=3\varphi^2 + \psi^2 = ( \varphi + \psi)^2 - 2\varphi\psi = 3), so Ln=φn+ψnL_n = \varphi^n + \psi^n. Finally

FnLn=(φnψn)(φn+ψn)5=φ2nψ2n5=F2n,F_n L_n = \frac{(\varphi^n - \psi^n)(\varphi^n + \psi^n)}{\sqrt5} = \frac{\varphi^{2n} - \psi^{2n}}{\sqrt5} = F_{2n},

recovering question 22.

25. (i) The five matrices I,A,A2,A3,A4I, A, A^2, A^3, A^4 live in the 44-dimensional M2(K)\mathcal{M}_2(K), so some nonzero polynomial of degree 4\leq 4 kills AA; Part II sharpened this to the explicit quadratic A2=sApIA^2 = sA - pI, which locks all powers into the plane Vect(I,A)\operatorname{Vect}(I, A). (ii) Euclidean division reduces XnX^n modulo that quadratic, and the remainder’s two coefficients obey the two-term recurrence an+2=san+1pana_{n+2} = s\,a_{n+1} - p\,a_n: exponentiation has become iteration. (iii) Question 6 is the n=2n = 2 case of the Cayley–Hamilton theorem, valid in every dimension and proved in the Year 2 volume. (iv) The companion matrix closes the loop: every linear recurrence is a matrix power, with the same polynomial DD appearing as trace-and-determinant data, so the remainder calculus solves recurrences and computes powers in one stroke.