Books
Theme
Text size
Width

[ and ] go to the previous and next page.

Once bases are fixed, a linear map and its matrix carry the same information (Theorem 2.3.20). Linear maps can be composed (Proposition 2.1.17), so matrices should be able to multiply, and the product of two matrices should be the matrix of the composite. This section takes that as the definition of the product. The formula for the entries, the algebraic laws, and the failures of commutativity and cancellation all follow from it, and each of them is the shadow of a fact about composition.

Throughout, 𝑈, 𝑉, and 𝑊 are vector spaces over 𝐹 with bases 𝒜︀=𝐮1,…,𝐮𝑛 of 𝑈, ℬ︀=𝐯1,…,𝐯𝑚 of 𝑉, and 𝒞︀=𝐰1,…,𝐰ℓ of 𝑊, where 𝑛,𝑚,ℓ≥1. As in Notation 2.1.18, we write 𝑇𝑆 for the composite 𝑇∘𝑆.

2.4.1The product of two matrices

Intuition (Computing [𝑇𝑆] from [𝑇] and [𝑆]). Let 𝑆∈L(𝑈,𝑉) and 𝑇∈L(𝑉,𝑊), so that 𝑇𝑆∈L(𝑈,𝑊). The 𝑗-th column of [𝑇𝑆]𝒞︀𝒜︀ is the coordinate vector of (𝑇𝑆)(𝐮𝑗)=𝑇(𝑆(𝐮𝑗)). By Theorem 2.3.9, applied to 𝑇 at the vector 𝑆(𝐮𝑗),

[𝑇(𝑆(𝐮𝑗))]𝒞︀=[𝑇]𝒞︀ℬ︀[𝑆(𝐮𝑗)]ℬ︀,

and [𝑆(𝐮𝑗)]ℬ︀ is the 𝑗-th column of [𝑆]ℬ︀𝒜︀. So the 𝑗-th column of [𝑇𝑆]𝒞︀𝒜︀ is [𝑇]𝒞︀ℬ︀ times the 𝑗-th column of [𝑆]ℬ︀𝒜︀. As with the matrix–vector product in Section 2.3.2, the answer no longer mentions 𝑆, 𝑇, the spaces, or the bases. It is computed from the two matrices alone, so it is an operation on matrices, and we give it a name.

Definition 2.4.1 (Matrix product). Let 𝐴∈𝐹ℓ×𝑚 and 𝐵∈𝐹𝑚×𝑛, and let 𝐛1,…,𝐛𝑛∈𝐹𝑚 be the columns of 𝐵. The product 𝐴𝐵 is the ℓ×𝑛 matrix whose 𝑗-th column is 𝐴𝐛𝑗:

𝐴𝐵=(𝐴𝐛1𝐴𝐛2⋯𝐴𝐛𝑛).

It is defined only when the number of columns of 𝐴 equals the number of rows of 𝐵. By Proposition 2.3.11, applied to the 𝑗-th column, the entry of 𝐴𝐵 in row 𝑖 and column 𝑗 is

𝑎𝑖1𝑏1𝑗+𝑎𝑖2𝑏2𝑗+⋯+𝑎𝑖𝑚𝑏𝑚𝑗=∑𝑘=1𝑚𝑎𝑖𝑘𝑏𝑘𝑗.

The sizes behave like dominoes: an ℓ×𝑚 matrix times an 𝑚×𝑛 matrix is an ℓ×𝑛 matrix, and the two inner sizes must match. A column 𝐱∈𝐹𝑚 is an 𝑚×1 matrix, and the product of 𝐴 with it in the sense of Definition 2.4.1 has the single column 𝐴𝐱. So the matrix–vector product of Definition 2.3.8 is the special case 𝑛=1, and the notation 𝐴𝐱 is unambiguous.

Theorem 2.4.2 (The matrix of a composite).
  1. (a)For 𝑆∈L(𝑈,𝑉) and 𝑇∈L(𝑉,𝑊),

    [𝑇𝑆]𝒞︀𝒜︀=[𝑇]𝒞︀ℬ︀[𝑆]ℬ︀𝒜︀.
  2. (b)For 𝐴∈𝐹ℓ×𝑚 and 𝐵∈𝐹𝑚×𝑛, 𝑇𝐴𝐵=𝑇𝐴𝑇𝐵. That is, (𝐴𝐵)𝐱=𝐴(𝐵𝐱) for every 𝐱∈𝐹𝑛.

Proof.routine

Uses. Definition 2.3.1 (Matrix of a linear map), Theorem 2.3.9 (The matrix of a map computes the map), Definition 2.4.1 (Matrix product), Proposition 2.3.16 (The matrix of 𝑇𝐴), Proposition 2.3.17 (Every linear map 𝐹𝑛→𝐹𝑚 is some 𝑇𝐴), Proposition 2.1.17 (Compositions of linear maps are linear)

Techniques. Translate between maps and matrices (Technique 2.3.27)

Hint 1. Two matrices of the same size are equal when their columns are. What is the 𝑗-th column of each side of (a)?
Hint 2. The 𝑗-th column of [𝑇𝑆]𝒞︀𝒜︀ is [𝑇(𝑆(𝐮𝑗))]𝒞︀. Apply Theorem 2.3.9 to 𝑇 at the vector 𝑆(𝐮𝑗).
Hint 3. For (b), apply (a) with the standard bases, and then use that a linear map 𝐹𝑛→𝐹ℓ is determined by its standard matrix.
Sketch. (a) The 𝑗-th column of [𝑇𝑆]𝒞︀𝒜︀ is [𝑇(𝑆(𝐮𝑗))]𝒞︀=[𝑇]𝒞︀ℬ︀[𝑆(𝐮𝑗)]ℬ︀, which is [𝑇]𝒞︀ℬ︀ times the 𝑗-th column of [𝑆]ℬ︀𝒜︀, the 𝑗-th column of the product. (b) By (a) with standard bases, [𝑇𝐴𝑇𝐵]ℰ︀ℰ︀=𝐴𝐵, so 𝑇𝐴𝑇𝐵=𝑇𝐴𝐵 by Proposition 2.3.17.

(a) Both sides are ℓ×𝑛 matrices. By Definition 2.3.1, the 𝑗-th column of [𝑇𝑆]𝒞︀𝒜︀ is [(𝑇𝑆)(𝐮𝑗)]𝒞︀. By the definition of composition and Theorem 2.3.9,

[(𝑇𝑆)(𝐮𝑗)]𝒞︀=[𝑇(𝑆(𝐮𝑗))]𝒞︀=[𝑇]𝒞︀ℬ︀[𝑆(𝐮𝑗)]ℬ︀.

The vector [𝑆(𝐮𝑗)]ℬ︀ is the 𝑗-th column of [𝑆]ℬ︀𝒜︀ (Definition 2.3.1), so by Definition 2.4.1 this is the 𝑗-th column of [𝑇]𝒞︀ℬ︀[𝑆]ℬ︀𝒜︀. The two matrices have the same columns, so they are equal.

(b) The map 𝑇𝐴𝑇𝐵:𝐹𝑛→𝐹ℓ is linear (Proposition 2.1.17). By (a) with the standard bases of 𝐹𝑛, 𝐹𝑚, and 𝐹ℓ, and by Proposition 2.3.16,

[𝑇𝐴𝑇𝐵]ℰ︀ℰ︀=[𝑇𝐴]ℰ︀ℰ︀[𝑇𝐵]ℰ︀ℰ︀=𝐴𝐵.

By Proposition 2.3.17, every linear map 𝐹𝑛→𝐹ℓ is multiplication by its standard matrix, so 𝑇𝐴𝑇𝐵=𝑇𝐴𝐵. Evaluating at 𝐱 gives 𝐴(𝐵𝐱)=(𝐴𝐵)𝐱. □

The subscripts in (a) behave like the sizes: in [𝑇]𝒞︀ℬ︀[𝑆]ℬ︀𝒜︀ the two inner bases agree and drop out, leaving [𝑇𝑆]𝒞︀𝒜︀. Also notice the order. 𝑇𝑆 means “first 𝑆, then 𝑇”, and the matrix of the map applied first stands on the right, as 𝑆 does in 𝑇(𝑆(𝐮)). This is the price of writing functions to the left of their arguments, and it is why products of matrices are read from right to left.

As with the matrix–vector product (Proposition 2.3.10), the definition is not a convention. Even the special case of standard bases leaves no other choice.

Proposition 2.4.3 (The product is forced). Suppose that for all ℓ,𝑚,𝑛≥1 we are given a rule that assigns to each 𝐴∈𝐹ℓ×𝑚 and 𝐵∈𝐹𝑚×𝑛 a matrix 𝐴⋆𝐵∈𝐹ℓ×𝑛, such that for all 𝑆∈L(𝐹𝑛,𝐹𝑚) and 𝑇∈L(𝐹𝑚,𝐹ℓ),

[𝑇𝑆]ℰ︀ℰ︀=[𝑇]ℰ︀ℰ︀⋆[𝑆]ℰ︀ℰ︀.

Then 𝐴⋆𝐵=𝐴𝐵 for all 𝐴 and 𝐵.

Proof.routine

Uses. Proposition 2.3.16 (The matrix of 𝑇𝐴), Theorem 2.4.2 (The matrix of a composite)

Techniques. Uniqueness via two candidates (Technique 1.1.8)

Hint 1. Given 𝐴 and 𝐵, find linear maps whose standard matrices are 𝐴 and 𝐵.
Hint 2. Take 𝑇=𝑇𝐴 and 𝑆=𝑇𝐵, and compute [𝑇𝐴𝑇𝐵]ℰ︀ℰ︀ in two ways.
Sketch. With 𝑇=𝑇𝐴 and 𝑆=𝑇𝐵, the hypothesis gives 𝐴⋆𝐵=[𝑇𝐴𝑇𝐵]ℰ︀ℰ︀, and Theorem 2.4.2 gives [𝑇𝐴𝑇𝐵]ℰ︀ℰ︀=𝐴𝐵.

Let 𝐴∈𝐹ℓ×𝑚 and 𝐵∈𝐹𝑚×𝑛. By Proposition 2.3.16, [𝑇𝐴]ℰ︀ℰ︀=𝐴 and [𝑇𝐵]ℰ︀ℰ︀=𝐵. Applying the hypothesis to 𝑇=𝑇𝐴 and 𝑆=𝑇𝐵, and then Theorem 2.4.2,

𝐴⋆𝐵=[𝑇𝐴]ℰ︀ℰ︀⋆[𝑇𝐵]ℰ︀ℰ︀=[𝑇𝐴𝑇𝐵]ℰ︀ℰ︀=[𝑇𝐴]ℰ︀ℰ︀[𝑇𝐵]ℰ︀ℰ︀=𝐴𝐵.

□

Figure 2.4.1 shows Theorem 2.4.2(b) in the plane. The grid in the last panel of each row is the image of the square grid under the composite, and the two colored arrows are the columns of the product.

Figure 2.4.1. Composition in the plane, with 𝐴=(1101) (a shear) and 𝐵=(0−110) (rotation by a right angle). Blue and ochre arrows are the images of 𝐞1 and 𝐞2. Top row: first 𝐵, then 𝐴. The result is 𝑇𝐴𝑇𝐵=𝑇𝐴𝐵, and its arrows are the columns (1,1) and (−1,0) of 𝐴𝐵=(1−110). Bottom row: the same two maps in the other order, giving 𝐵𝐴=(0−111). The final grids differ, so 𝐴𝐵≠𝐵𝐴.

Example 2.4.4 (A product by columns). Let 𝐴=(1−12031)∈ℝ2×3 and 𝐵=(2110−14)∈ℝ3×2. The columns of 𝐴𝐵 are 𝐴(2,1,−1) and 𝐴(1,0,4), which by Definition 2.3.8 are

2(10)+(−13)−(21)=(−12),(10)+4(21)=(94),

so 𝐴𝐵=(−1924). The product 𝐵𝐴 is also defined, but it is a 3×3 matrix:

𝐵𝐴=(2151−12−1132),

whose columns are 𝐵(10), 𝐵(−13), and 𝐵(21). Even the sizes of 𝐴𝐵 and 𝐵𝐴 differ.

Example 2.4.5 (Composites through their matrices).
  1. (a)Let 𝐷∈L(𝐹[𝑥]≤2) be differentiation and ℬ︀=1,𝑥,𝑥2, so that 𝑁=[𝐷]ℬ︀ℬ︀=(010002000) (Example 2.3.4). By Theorem 2.4.2, [𝐷2]ℬ︀ℬ︀=𝑁𝑁 and [𝐷3]ℬ︀ℬ︀=𝑁𝑁𝑁, and indeed

    𝑁𝑁=(002000000),𝑁𝑁𝑁=(000000000).

    The first says 𝐷2(𝑎+𝑏𝑥+𝑐𝑥2)=2𝑐. The second is the matrix form of 𝐷3=0, which we could only observe one vector at a time in Intuition (One basis or two).

  2. (b)Rotating by 𝛽 and then by 𝛼 is rotating by 𝛼+𝛽, so 𝑅𝛼𝑅𝛽=𝑅𝛼+𝛽 (Exercise 2.1.43). By Theorem 2.4.2 and Example 2.3.3,

    [𝑅𝛼+𝛽]ℰ︀ℰ︀=(cos𝛼−sin𝛼sin𝛼cos𝛼)(cos𝛽−sin𝛽sin𝛽cos𝛽).

    The first column of the left side is (cos(𝛼+𝛽),sin(𝛼+𝛽)), and by the column view of the product, the first column of the right side is

    cos𝛽(cos𝛼sin𝛼)+sin𝛽(−sin𝛼cos𝛼)=(cos𝛼cos𝛽−sin𝛼sin𝛽sin𝛼cos𝛽+cos𝛼sin𝛽).

    These are the angle addition formulas for cos(𝛼+𝛽) and sin(𝛼+𝛽). In Example 2.1.11 we used those formulas to show that rotations are linear, so here they are recovered rather than proved. But if one accepts from geometry that rotations are linear, then their matrices come from Corollary 2.2.17 without any trigonometric identity, as noted in Section 2.2.5, and this computation is a proof of the angle addition formulas.

  3. (c)Let ℬ︀=(1,1),(1,−1), a basis of 𝐹2 when 1+1≠0. In Example 2.3.24 we found [id]ℰ︀ℬ︀=(111−1) and [id]ℬ︀ℰ︀=12(111−1). Since idid=id, Theorem 2.4.2 gives

    [id]ℰ︀ℬ︀[id]ℬ︀ℰ︀=[id]ℰ︀ℰ︀=𝐼2,

    and indeed (111−1)(111−1)=(2002), which becomes 𝐼2 after multiplying by 12. Converting standard coordinates into ℬ︀-coordinates and back changes nothing. Matrices whose products are 𝐼 in this way are the invertible matrices of Section 2.5, and those of the form [id]𝒞︀ℬ︀ are studied in Section 4.5.

Exercise 2.4.6.routine
  1. (a)Over 𝔽5, let 𝐴=(120314) and 𝐵=(210311). Compute 𝐴𝐵 and 𝐵𝐴. Which of 𝐴2=𝐴𝐴 and 𝐵2=𝐵𝐵 are defined?
  2. (b)Over ℂ, compute (1𝑖02)(𝑖11−𝑖) and (𝑖11−𝑖)(1𝑖02).

Solution.

Uses. Definition 2.4.1 (Matrix product), Definition 2.3.8 (Matrix–vector product)

Hint 1. Compute column by column: column 𝑗 of 𝐴𝐵 is 𝐴 times column 𝑗 of 𝐵. Or use the entry formula: row 𝑖 of 𝐴 against column 𝑗 of 𝐵.
Hint 2. Work with integers and reduce modulo 5 at the end. In (b), use 𝑖2=−1.
Sketch. (a) 𝐴𝐵=(271010)=(2200) and 𝐵𝐴=(5549312434)=(004432434) in 𝔽5. 𝐴2 needs 3=2 and 𝐵2 needs 2=3, so neither is defined. (b) (2𝑖22−2𝑖) and (𝑖11−𝑖).

(a) By columns, 𝐴(2,0,1)=2(1,3)+(0,4)=(2,10) and 𝐴(1,3,1)=(1,3)+3(2,1)+(0,4)=(7,10). Reducing modulo 5,

𝐴𝐵=(2200).

The columns of 𝐵𝐴 are 𝐵(1,3)=(2+3,0+9,1+3), 𝐵(2,1)=(4+1,0+3,2+1), and 𝐵(0,4)=(0+4,0+12,0+4), so

𝐵𝐴=(5549312434)=(004432434)in𝔽5.

A product 𝑋𝑌 needs as many columns in 𝑋 as rows in 𝑌. 𝐴 is 2×3, so 𝐴𝐴 is not defined, and 𝐵 is 3×2, so 𝐵𝐵 is not defined either.

(b) By the entry formula, the first product has entries 1⋅𝑖+𝑖⋅1=2𝑖, 1⋅1+𝑖(−𝑖)=2, 0⋅𝑖+2⋅1=2, and 0⋅1+2(−𝑖)=−2𝑖, and the second has entries 𝑖, 𝑖2+2=1, 1, and 𝑖−2𝑖=−𝑖:

(1𝑖02)(𝑖11−𝑖)=(2𝑖22−2𝑖),(𝑖11−𝑖)(1𝑖02)=(𝑖11−𝑖).

The two products differ.

2.4.2Four views of the product

The definition describes 𝐴𝐵 one column at a time, but a product can be read in several other ways, and choosing the right one often makes a problem easy. We first fix some notation.

Notation 2.4.7 (Entries, rows, and columns). For a matrix 𝑀 given by an expression, such as 𝐴𝐵, we write (𝑀)𝑖𝑗 or 𝑀𝑖𝑗 for its entry in row 𝑖 and column 𝑗, and

𝑀𝑖,⋅=row𝑖of𝑀,𝑀⋅,𝑗=column𝑗of𝑀.

A row of an ℓ×𝑚 matrix is a 1×𝑚 matrix, and a column is an ℓ×1 matrix, that is, an element of 𝐹ℓ. We identify a 1×1 matrix (𝑐) with the scalar 𝑐. The Kronecker delta is

𝛿𝑖𝑗={1if𝑖=𝑗0if𝑖≠𝑗,

so that 𝐼𝑛=(𝛿𝑖𝑗) and 𝐞𝑗=(𝛿1𝑗,…,𝛿𝑛𝑗).

Proposition 2.4.8 (Four views of the product). Let 𝐴∈𝐹ℓ×𝑚 and 𝐵∈𝐹𝑚×𝑛, and let 1≤𝑖≤ℓ and 1≤𝑗≤𝑛.
  1. (a)Entries. The (𝑖,𝑗) entry of 𝐴𝐵 is row 𝑖 of 𝐴 times column 𝑗 of 𝐵:

    (𝐴𝐵)𝑖𝑗=𝐴𝑖,⋅𝐵⋅,𝑗=∑𝑘=1𝑚𝑎𝑖𝑘𝑏𝑘𝑗.
  2. (b)Columns. Column 𝑗 of 𝐴𝐵 is a combination of the columns of 𝐴, with coefficients from column 𝑗 of 𝐵:

    (𝐴𝐵)⋅,𝑗=𝐴𝐵⋅,𝑗=𝑏1𝑗𝐴⋅,1+⋯+𝑏𝑚𝑗𝐴⋅,𝑚.
  3. (c)Rows. Row 𝑖 of 𝐴𝐵 is a combination of the rows of 𝐵, with coefficients from row 𝑖 of 𝐴:

    (𝐴𝐵)𝑖,⋅=𝐴𝑖,⋅𝐵=𝑎𝑖1𝐵1,⋅+⋯+𝑎𝑖𝑚𝐵𝑚,⋅.
  4. (d)Columns times rows. 𝐴𝐵 is a sum of 𝑚 products of a column with a row:

    𝐴𝐵=𝐴⋅,1𝐵1,⋅+⋯+𝐴⋅,𝑚𝐵𝑚,⋅.

Proof.routine

Uses. Definition 2.4.1 (Matrix product), Definition 2.3.8 (Matrix–vector product), Definition 1.2.7 (Matrices)

Hint 1. (a) and (b) are restatements of Definition 2.4.1. For (c) and (d), compare entries using (a).
Hint 2. In (d), 𝐴⋅,𝑘𝐵𝑘,⋅ is an ℓ×1 matrix times a 1×𝑛 matrix. Its inner size is 1, so the sum in (a) has a single term. What is its (𝑖,𝑗) entry?
Sketch. (a) is the entry formula of Definition 2.4.1, read for a 1×𝑚 times 𝑚×1 product. (b) is the definition together with Definition 2.3.8. In (c) and (d), the (𝑖,𝑗) entry of each side is ∑𝑘𝑎𝑖𝑘𝑏𝑘𝑗: the matrix 𝐴⋅,𝑘𝐵𝑘,⋅ has (𝑖,𝑗) entry 𝑎𝑖𝑘𝑏𝑘𝑗, and the operations on matrices are entrywise.

(a) The formula (𝐴𝐵)𝑖𝑗=∑𝑘𝑎𝑖𝑘𝑏𝑘𝑗 is part of Definition 2.4.1. Applied to the 1×𝑚 matrix 𝐴𝑖,⋅ and the 𝑚×1 matrix 𝐵⋅,𝑗, the same formula says that 𝐴𝑖,⋅𝐵⋅,𝑗 is the 1×1 matrix with entry ∑𝑘𝑎𝑖𝑘𝑏𝑘𝑗.

(b) By Definition 2.4.1, column 𝑗 of 𝐴𝐵 is 𝐴𝐛𝑗 with 𝐛𝑗=𝐵⋅,𝑗=(𝑏1𝑗,…,𝑏𝑚𝑗), and by Definition 2.3.8, 𝐴𝐛𝑗=𝑏1𝑗𝐴⋅,1+⋯+𝑏𝑚𝑗𝐴⋅,𝑚.

(c) By (a), applied to 𝐴𝑖,⋅∈𝐹1×𝑚 and 𝐵, the 1×𝑛 matrix 𝐴𝑖,⋅𝐵 has 𝑗-th entry ∑𝑘𝑎𝑖𝑘𝑏𝑘𝑗. Matrices are added and scaled entrywise (Definition 1.2.7), so the 𝑗-th entry of ∑𝑘𝑎𝑖𝑘𝐵𝑘,⋅ is also ∑𝑘𝑎𝑖𝑘𝑏𝑘𝑗. By (a), both equal the 𝑗-th entry of (𝐴𝐵)𝑖,⋅.

(d) By (a), applied with inner size 1, the ℓ×𝑛 matrix 𝐴⋅,𝑘𝐵𝑘,⋅ has (𝑖,𝑗) entry 𝑎𝑖𝑘𝑏𝑘𝑗. Adding these matrices entrywise over 𝑘=1,…,𝑚 gives the matrix with (𝑖,𝑗) entry ∑𝑘𝑎𝑖𝑘𝑏𝑘𝑗=(𝐴𝐵)𝑖𝑗. □

Each view is the right one for some job.

  • The entry view (a) is the quickest way to compute a product by hand, and the one to use in proofs about individual entries, such as the shape of a product of triangular matrices (Proposition 2.4.36).
  • The column view (b) answers questions about columns. Since every column of 𝐴𝐵 is a linear combination of the columns of 𝐴, the span of the columns of 𝐴𝐵 is contained in the span of the columns of 𝐴 (Proposition 1.4.14): multiplying 𝐴 on the right cannot produce new directions. This is the first step towards rank(𝐴𝐵)≤rank𝐴 (Section 4.3). It also says that multiplying on the right recombines columns, which is how column operations become matrix products (Section 3.2).
  • The row view (c) is the mirror image: multiplying 𝐵 on the left recombines its rows. This is why row operations, and Gauss–Jordan elimination as a whole, are left multiplications (Section 3.2, Section 3.3).
  • The column–row view (d) writes 𝐴𝐵 as a sum of 𝑚 simple pieces, each built from one column and one row. It is the view to use when 𝐴 has few columns, for block multiplication (Theorem 2.4.34), and for decompositions of a matrix into simple pieces (Section 4.3, Section 9.1).

Example 2.4.9 (One product, four ways). Let 𝐴=(12−10) and 𝐵=(3101−24) over ℝ.

Entries. (𝐴𝐵)11=1⋅3+2⋅1=5, (𝐴𝐵)12=1−4=−3, and so on, giving 𝐴𝐵=(5−38−3−10).

Columns. (𝐴𝐵)⋅,1=3(1−1)+1(20)=(5−3), and similarly for the other two columns.

Rows. Row 1 of 𝐴 is (12), so

(𝐴𝐵)1,⋅=1(310)+2(1−24)=(5−38).

Row 2 of 𝐴 is (−10), so row 2 of 𝐴𝐵 is −1 times row 1 of 𝐵, that is, (−3−10). The row view gave this row with no computation at all.

Columns times rows.

𝐴𝐵=(1−1)(310)+(20)(1−24).

The two terms are (310−3−10) and (2−48000), and their sum is 𝐴𝐵.

Example 2.4.10 (Diagonal matrices). A square matrix 𝐷 is diagonal if 𝑑𝑖𝑗=0 whenever 𝑖≠𝑗. We write 𝐷=diag(𝑑1,…,𝑑𝑛) for the diagonal matrix with diagonal entries 𝑑1,…,𝑑𝑛. Row 𝑖 of 𝐷 is 𝑑𝑖𝐞𝑖 written as a row, so by the row view, row 𝑖 of 𝐷𝐴 is 𝑑𝑖𝐴𝑖,⋅: multiplying by 𝐷 on the left scales row 𝑖 by 𝑑𝑖. Column 𝑗 of 𝐷 is 𝑑𝑗𝐞𝑗, so by the column view, column 𝑗 of 𝐴𝐷 is 𝑑𝑗𝐴⋅,𝑗: multiplying on the right scales columns. In particular

diag(𝑐1,…,𝑐𝑛)diag(𝑑1,…,𝑑𝑛)=diag(𝑐1𝑑1,…,𝑐𝑛𝑑𝑛),

so diagonal matrices multiply entry by entry and commute with each other.

Exercise 2.4.11.routine Let 𝐴∈𝐹ℓ×𝑚 and 𝐵∈𝐹𝑚×𝑛.

  1. (a)Show that if column 𝑗 of 𝐵 is zero, then so is column 𝑗 of 𝐴𝐵, and that if row 𝑖 of 𝐴 is zero, then so is row 𝑖 of 𝐴𝐵.
  2. (b)Show that if 𝐵⋅,3=𝐵⋅,1+2𝐵⋅,2, then (𝐴𝐵)⋅,3=(𝐴𝐵)⋅,1+2(𝐴𝐵)⋅,2.
  3. (c)Give an example in which 𝐴𝐵 has a zero column but 𝐵 has none.

Solution.

Uses. Proposition 2.4.8 (Four views of the product), Proposition 2.3.13 (Linearity of the product)

Hint 1. Use the column view for statements about columns of 𝐴𝐵, and the row view for rows.
Hint 2. Column 𝑗 of 𝐴𝐵 is 𝐴𝐵⋅,𝑗, and 𝐱↦𝐴𝐱 is linear. For (c), you need a nonzero column 𝐛 with 𝐴𝐛=𝟎.
Sketch. (a) (𝐴𝐵)⋅,𝑗=𝐴𝟎=𝟎, and (𝐴𝐵)𝑖,⋅=𝐴𝑖,⋅𝐵 is a combination of rows of 𝐵 with all coefficients 0. (b) Apply the linear map 𝐱↦𝐴𝐱 to the relation. (c) 𝐴=(11) and 𝐵=(1−1) give 𝐴𝐵=(0).

(a) By the column view (Proposition 2.4.8(b)), (𝐴𝐵)⋅,𝑗=𝐴𝐵⋅,𝑗=𝐴𝟎=𝟎. By the row view (Proposition 2.4.8(c)), (𝐴𝐵)𝑖,⋅=𝑎𝑖1𝐵1,⋅+⋯+𝑎𝑖𝑚𝐵𝑚,⋅, and every coefficient 𝑎𝑖𝑘 is 0, so this row is zero.

(b) By the column view and the linearity of 𝐱↦𝐴𝐱 (Proposition 2.3.13),

(𝐴𝐵)⋅,3=𝐴(𝐵⋅,1+2𝐵⋅,2)=𝐴𝐵⋅,1+2𝐴𝐵⋅,2=(𝐴𝐵)⋅,1+2(𝐴𝐵)⋅,2.

In words: every linear relation among the columns of 𝐵 also holds among the columns of 𝐴𝐵.

(c) We need a nonzero column 𝐛 with 𝐴𝐛=𝟎. Take 𝐴=(11)∈ℝ1×2 and 𝐵=(1−1)∈ℝ2×1. Then 𝐴𝐵=(1−1)=(0), a zero column, while 𝐵 has none. A square example: (1111)(12−1−2)=(0000).

2.4.3Sums and scalar multiples

Matrices of the same size can also be added and scaled entrywise (Definition 1.2.7), and linear maps can be added and scaled pointwise (Proposition 2.1.23). These operations correspond to each other as well.

Proposition 2.4.12 (Matrices of sums and scalar multiples). Let 𝑆,𝑇∈L(𝑉,𝑊) and 𝑎∈𝐹. Then

[𝑆+𝑇]𝒞︀ℬ︀=[𝑆]𝒞︀ℬ︀+[𝑇]𝒞︀ℬ︀,[𝑎𝑇]𝒞︀ℬ︀=𝑎[𝑇]𝒞︀ℬ︀.

So 𝑇↦[𝑇]𝒞︀ℬ︀ is a linear bijection from L(𝑉,𝑊) onto 𝐹ℓ×𝑚.

Proof.routine

Uses. Definition 2.3.1 (Matrix of a linear map), Definition 2.1.21 (Pointwise operations), Proposition 1.6.19 (Coordinates respect linear combinations), Definition 1.2.7 (Matrices), Theorem 2.3.20 (Linear maps correspond to matrices)

Hint 1. Compare the 𝑗-th columns of the two sides.
Hint 2. (𝑆+𝑇)(𝐯𝑗)=𝑆(𝐯𝑗)+𝑇(𝐯𝑗) by the definition of 𝑆+𝑇. Taking coordinates is linear.
Sketch. The 𝑗-th column of [𝑆+𝑇]𝒞︀ℬ︀ is [𝑆(𝐯𝑗)+𝑇(𝐯𝑗)]𝒞︀=[𝑆(𝐯𝑗)]𝒞︀+[𝑇(𝐯𝑗)]𝒞︀, the sum of the 𝑗-th columns of [𝑆] and [𝑇]. Scalars are the same. Bijectivity is Theorem 2.3.20.

By Definition 2.3.1, Definition 2.1.21, and the linearity of [⋅]𝒞︀ (Proposition 1.6.19), the 𝑗-th column of [𝑆+𝑇]𝒞︀ℬ︀ is

[(𝑆+𝑇)(𝐯𝑗)]𝒞︀=[𝑆(𝐯𝑗)+𝑇(𝐯𝑗)]𝒞︀=[𝑆(𝐯𝑗)]𝒞︀+[𝑇(𝐯𝑗)]𝒞︀.

Matrices are added entrywise (Definition 1.2.7), so the 𝑗-th column of [𝑆]𝒞︀ℬ︀+[𝑇]𝒞︀ℬ︀ is the sum of their 𝑗-th columns, which is the same vector. Likewise the 𝑗-th column of [𝑎𝑇]𝒞︀ℬ︀ is [𝑎𝑇(𝐯𝑗)]𝒞︀=𝑎[𝑇(𝐯𝑗)]𝒞︀, the 𝑗-th column of 𝑎[𝑇]𝒞︀ℬ︀. So 𝑇↦[𝑇]𝒞︀ℬ︀ is linear, and it is a bijection by Theorem 2.3.20. □

So the dictionary of Section 2.3.6 has three more entries: sums, scalar multiples, and composites of maps correspond to sums, scalar multiples, and products of matrices. In the language of Section 4.5, the proposition says that L(𝑉,𝑊) and 𝐹ℓ×𝑚 are isomorphic vector spaces, and dimension counting there gives dimL(𝑉,𝑊)=ℓ𝑚.

Example 2.4.13 (The difference operator). Let 𝑇∈L(𝐹[𝑥]≤2) be the substitution 𝑇(𝑝)=𝑝(𝑥+1), and ℬ︀=1,𝑥,𝑥2. From 𝑇(1)=1, 𝑇(𝑥)=1+𝑥, and 𝑇(𝑥2)=1+2𝑥+𝑥2,

[𝑇]ℬ︀ℬ︀=(111012001).

The difference operator of Example 2.3.28 is Δ=𝑇−id, so by Proposition 2.4.12 and Example 2.3.6,

[Δ]ℬ︀ℬ︀=[𝑇]ℬ︀ℬ︀−𝐼3=(011002000),

which is the matrix computed there column by column.

2.4.4The algebraic laws

Proposition 2.4.14 (Algebra of matrices). Let 𝐴,𝐴′∈𝐹ℓ×𝑚, 𝐵,𝐵′∈𝐹𝑚×𝑛, 𝐶∈𝐹𝑛×𝑝, and 𝑎∈𝐹.
  1. (a)Associativity. (𝐴𝐵)𝐶=𝐴(𝐵𝐶).
  2. (b)Identities. 𝐼ℓ𝐴=𝐴=𝐴𝐼𝑚.
  3. (c)Distributivity. 𝐴(𝐵+𝐵′)=𝐴𝐵+𝐴𝐵′ and (𝐴+𝐴′)𝐵=𝐴𝐵+𝐴′𝐵.
  4. (d)Scalars. (𝑎𝐴)𝐵=𝑎(𝐴𝐵)=𝐴(𝑎𝐵).

Intuition (The laws come from composition). Read a product of matrices as a sequence of maps, applied from right to left:

𝐹𝑝⟶𝑇𝐶𝐹𝑛⟶𝑇𝐵𝐹𝑚⟶𝑇𝐴𝐹ℓ.

Both (𝐴𝐵)𝐶 and 𝐴(𝐵𝐶) are the matrix of “first 𝑇𝐶, then 𝑇𝐵, then 𝑇𝐴”. The parentheses only record which two of the three steps were combined first, and the composite of three functions does not depend on that: both are 𝐱↦𝑇𝐴(𝑇𝐵(𝑇𝐶(𝐱))). So associativity of matrix multiplication should follow from associativity of composition (Proposition 2.1.24) with no computation, once we can translate in both directions. That translation is Technique 2.3.27, and the dictionary we need is now complete: 𝑇𝐴𝐵=𝑇𝐴𝑇𝐵 (Theorem 2.4.2), 𝑇𝑎𝐴+𝐴′=𝑎𝑇𝐴+𝑇𝐴′ and 𝑇𝐼ℓ=id (Proposition 2.3.13), and 𝐴 is determined by 𝑇𝐴 (Proposition 2.3.17).

Proof (via composition).routine

Uses. Theorem 2.4.2 (The matrix of a composite), Proposition 2.1.24 (Algebra of composition), Proposition 2.3.13 (Linearity of the product), Proposition 2.3.17 (Every linear map 𝐹𝑛→𝐹𝑚 is some 𝑇𝐴)

Techniques. Translate between maps and matrices (Technique 2.3.27)

Hint 1. Two matrices of the same size are equal when the maps 𝑇𝑋 they define are equal (Proposition 2.3.17). So compute 𝑇(𝐴𝐵)𝐶 and 𝑇𝐴(𝐵𝐶).
Hint 2. 𝑇(𝐴𝐵)𝐶=𝑇𝐴𝐵𝑇𝐶=(𝑇𝐴𝑇𝐵)𝑇𝐶. Now use associativity of composition and go back.
Hint 3. For (b), (c), and (d) you also need 𝑇𝐼ℓ=id, 𝑇𝐵+𝐵′=𝑇𝐵+𝑇𝐵′, and 𝑇𝑎𝐴=𝑎𝑇𝐴, all from Proposition 2.3.13.
Sketch. Translate each side into a composite of maps 𝑇𝑋 with Theorem 2.4.2 and Proposition 2.3.13, apply the matching identity of Proposition 2.1.24, and translate back. For instance 𝑇(𝐴𝐵)𝐶=(𝑇𝐴𝑇𝐵)𝑇𝐶=𝑇𝐴(𝑇𝐵𝑇𝐶)=𝑇𝐴(𝐵𝐶), so (𝐴𝐵)𝐶=𝐴(𝐵𝐶) by the uniqueness in Proposition 2.3.17.

By Proposition 2.3.17, two matrices 𝑋,𝑌∈𝐹𝑟×𝑠 with 𝑇𝑋=𝑇𝑌 are equal. So in each case it suffices to show that the two sides define the same linear map. We use Theorem 2.4.2(b), 𝑇𝑋𝑌=𝑇𝑋𝑇𝑌, and Proposition 2.3.13, which says that 𝑇𝑐𝑋+𝑋′=𝑐𝑇𝑋+𝑇𝑋′ and that 𝑇𝐼𝑟=id𝐹𝑟.

(a) By Theorem 2.4.2 and part (a) of Proposition 2.1.24,

𝑇(𝐴𝐵)𝐶=𝑇𝐴𝐵𝑇𝐶=(𝑇𝐴𝑇𝐵)𝑇𝐶=𝑇𝐴(𝑇𝐵𝑇𝐶)=𝑇𝐴𝑇𝐵𝐶=𝑇𝐴(𝐵𝐶).

(b) 𝑇𝐼ℓ𝐴=𝑇𝐼ℓ𝑇𝐴=id𝑇𝐴=𝑇𝐴, and 𝑇𝐴𝐼𝑚=𝑇𝐴id=𝑇𝐴, by part (b) of Proposition 2.1.24.

(c) By part (c) of Proposition 2.1.24,

𝑇𝐴(𝐵+𝐵′)=𝑇𝐴(𝑇𝐵+𝑇𝐵′)=𝑇𝐴𝑇𝐵+𝑇𝐴𝑇𝐵′=𝑇𝐴𝐵+𝑇𝐴𝐵′=𝑇𝐴𝐵+𝐴𝐵′,

and in the same way 𝑇(𝐴+𝐴′)𝐵=(𝑇𝐴+𝑇𝐴′)𝑇𝐵 equals 𝑇𝐴𝐵+𝐴′𝐵.

(d) By part (d) of Proposition 2.1.24,

𝑇(𝑎𝐴)𝐵=(𝑎𝑇𝐴)𝑇𝐵=𝑎(𝑇𝐴𝑇𝐵)=𝑇𝐴(𝑎𝑇𝐵)=𝑇𝐴(𝑎𝐵),

and the middle expression is 𝑎𝑇𝐴𝐵=𝑇𝑎(𝐴𝐵). □

The first proof never looks at an entry. The second proof works with entries only, and it is the prototype of a move we will use constantly.

Technique 2.4.15 (Compute entry by entry). To prove an identity between matrices, show that the (𝑖,𝑗) entries of the two sides agree for all 𝑖 and 𝑗. Write each entry of a product with Proposition 2.4.8(a), using a new summation index for every product, then rearrange: pull constant factors out of sums, exchange the order of two finite sums, ∑𝑘∑𝑙=∑𝑙∑𝑘, and collapse sums containing a Kronecker delta, ∑𝑘𝛿𝑖𝑘𝑥𝑘=𝑥𝑖.

Reach for it when the statement is about the entries themselves (transposes, traces, triangular or block shapes), or when there is no linear map in sight, for example for matrices whose entries are integers, polynomials, or other matrices. Two things go wrong in practice. Reusing a summation index in a nested sum silently identifies two different indices. And moving a factor past another needs commutativity of the entries, which holds for scalars but not for blocks (Section 2.4.8). The canonical example is the second proof of associativity below.

Proof (entry by entry).routine

Uses. Proposition 2.4.8 (Four views of the product), Definition 1.1.1 (Field), Notation 2.4.7 (Entries, rows, and columns)

Techniques. Compute entry by entry (Technique 2.4.15)

Hint 1. Write ((𝐴𝐵)𝐶)𝑖𝑗 as a double sum, using the entry formula twice with two different summation indices.
Hint 2. ((𝐴𝐵)𝐶)𝑖𝑗=∑𝑙(∑𝑘𝑎𝑖𝑘𝑏𝑘𝑙)𝑐𝑙𝑗. Distribute, exchange the two sums, and factor out 𝑎𝑖𝑘.
Sketch. Both ((𝐴𝐵)𝐶)𝑖𝑗 and (𝐴(𝐵𝐶))𝑖𝑗 equal ∑𝑘∑𝑙𝑎𝑖𝑘𝑏𝑘𝑙𝑐𝑙𝑗, after distributing and exchanging the finite sums. The other laws follow in the same way from the field axioms, with (𝐼ℓ)𝑖𝑘=𝛿𝑖𝑘 for (b).

(a) For 1≤𝑖≤ℓ and 1≤𝑗≤𝑝, by Proposition 2.4.8(a) twice,

((𝐴𝐵)𝐶)𝑖𝑗=∑𝑙=1𝑛(𝐴𝐵)𝑖𝑙𝑐𝑙𝑗=∑𝑙=1𝑛(∑𝑘=1𝑚𝑎𝑖𝑘𝑏𝑘𝑙)𝑐𝑙𝑗=∑𝑙=1𝑛∑𝑘=1𝑚𝑎𝑖𝑘𝑏𝑘𝑙𝑐𝑙𝑗=∑𝑘=1𝑚∑𝑙=1𝑛𝑎𝑖𝑘𝑏𝑘𝑙𝑐𝑙𝑗=∑𝑘=1𝑚𝑎𝑖𝑘(∑𝑙=1𝑛𝑏𝑘𝑙𝑐𝑙𝑗)=∑𝑘=1𝑚𝑎𝑖𝑘(𝐵𝐶)𝑘𝑗=(𝐴(𝐵𝐶))𝑖𝑗.

The steps used distributivity and associativity in 𝐹 and the reordering of a finite sum.

(b) (𝐼ℓ𝐴)𝑖𝑗=∑𝑘𝛿𝑖𝑘𝑎𝑘𝑗=𝑎𝑖𝑗, since only the term 𝑘=𝑖 survives, and similarly (𝐴𝐼𝑚)𝑖𝑗=∑𝑘𝑎𝑖𝑘𝛿𝑘𝑗=𝑎𝑖𝑗.

(c) By distributivity in 𝐹,

(𝐴(𝐵+𝐵′))𝑖𝑗=∑𝑘𝑎𝑖𝑘(𝑏𝑘𝑗+𝑏𝑘𝑗′)=∑𝑘𝑎𝑖𝑘𝑏𝑘𝑗+∑𝑘𝑎𝑖𝑘𝑏𝑘𝑗′=(𝐴𝐵+𝐴𝐵′)𝑖𝑗,

and the other law is the same with the factors on the other side.

(d) Using commutativity of 𝐹 to move 𝑎 to the front,

((𝑎𝐴)𝐵)𝑖𝑗=∑𝑘(𝑎𝑎𝑖𝑘)𝑏𝑘𝑗=𝑎∑𝑘𝑎𝑖𝑘𝑏𝑘𝑗=∑𝑘𝑎𝑖𝑘(𝑎𝑏𝑘𝑗)=(𝐴(𝑎𝐵))𝑖𝑗,

and the middle expression is (𝑎(𝐴𝐵))𝑖𝑗. □

The two proofs teach different things. The first explains why the laws hold: matrices multiply like composites because they are composites in disguise, and composition of functions is associative for trivial reasons. All the work went into the dictionary between maps and matrices. The second is self-contained and mechanical. Look at what it used in (a): the laws of addition, associativity of multiplication, and distributivity, but nothing about inverses or commutativity of multiplication. So the same computation proves associativity for matrices with entries in ℤ, in 𝐹[𝑥], or in any other number system with these laws, even one whose multiplication is not commutative, where there may be no vector spaces and linear maps to translate into. This is what makes block multiplication associative (Section 2.4.8), since blocks are matrices whose “entries” are matrices.

By associativity, products of three or more matrices need no parentheses.

Notation 2.4.16 (Powers of a matrix). For 𝐴∈𝐹𝑛×𝑛 and an integer 𝑘≥1, 𝐴𝑘=𝐴𝐴⋯𝐴 (𝑘 factors), and 𝐴0=𝐼𝑛. Then 𝐴𝑗𝐴𝑘=𝐴𝑗+𝑘, and if 𝑇∈L(𝑉) and ℬ︀ is a basis of 𝑉, then [𝑇𝑘]ℬ︀ℬ︀=([𝑇]ℬ︀ℬ︀)𝑘 by Theorem 2.4.2 and induction on 𝑘. Together with Proposition 2.4.12,

[𝑎0id+𝑎1𝑇+⋯+𝑎𝑘𝑇𝑘]ℬ︀ℬ︀=𝑎0𝐼𝑛+𝑎1𝐴+⋯+𝑎𝑘𝐴𝑘,

where 𝐴=[𝑇]ℬ︀ℬ︀.

Exercise 2.4.17.routine Let 𝐴,𝐵∈𝐹𝑛×𝑛. Show that (𝐴+𝐵)2=𝐴2+𝐴𝐵+𝐵𝐴+𝐵2, and deduce that (𝐴+𝐵)2=𝐴2+2𝐴𝐵+𝐵2 if and only if 𝐴𝐵=𝐵𝐴. (Here 2𝐴𝐵=𝐴𝐵+𝐴𝐵.)

Solution.

Uses. Proposition 2.4.14 (Algebra of matrices), Definition 1.2.7 (Matrices)

Hint 1. Expand (𝐴+𝐵)(𝐴+𝐵) with both distributive laws. Do not reorder any product.
Hint 2. Subtract 𝐴2+𝐴𝐵+𝐵2 from both expressions and compare what is left.
Sketch. Distributivity gives (𝐴+𝐵)2=𝐴2+𝐴𝐵+𝐵𝐴+𝐵2. This equals 𝐴2+𝐴𝐵+𝐴𝐵+𝐵2 exactly when 𝐵𝐴=𝐴𝐵, by cancelling in the vector space 𝐹𝑛×𝑛.

By the two distributive laws of Proposition 2.4.14,

(𝐴+𝐵)(𝐴+𝐵)=𝐴(𝐴+𝐵)+𝐵(𝐴+𝐵)=𝐴2+𝐴𝐵+𝐵𝐴+𝐵2.

So (𝐴+𝐵)2=𝐴2+2𝐴𝐵+𝐵2 holds if and only if 𝐴2+𝐴𝐵+𝐵𝐴+𝐵2=𝐴2+𝐴𝐵+𝐴𝐵+𝐵2. Adding −(𝐴2+𝐴𝐵+𝐵2) to both sides in the vector space 𝐹𝑛×𝑛, this holds if and only if 𝐵𝐴=𝐴𝐵. The familiar identity from high school algebra secretly uses commutativity.

2.4.5What fails

Matrix multiplication shares associativity and distributivity with the multiplication of numbers, but three other familiar properties fail. In each case the failure is already visible for composition of maps.

Example 2.4.18 (𝐴𝐵≠𝐵𝐴). Let

𝐴=(0100),𝐵=(0010).

Then

𝐴𝐵=(1000),𝐵𝐴=(0001).

In terms of maps, 𝑇𝐴 sends 𝐞2↦𝐞1↦𝟎 and 𝑇𝐵 sends 𝐞1↦𝐞2↦𝟎. Following 𝐞1 through 𝑇𝐴𝑇𝐵 returns it to 𝐞1, but following it through 𝑇𝐵𝑇𝐴 kills it. For a geometric example, let 𝑃 be the projection onto the 𝑥-axis and 𝑅 the rotation by a right angle, so that 𝑃𝑅≠𝑅𝑃 by Example 2.1.19. In matrices,

(1000)(0−110)=(0−100),(0−110)(1000)=(0010).

Figure 2.4.1 is a third example. When 𝐴𝐵 is defined, 𝐵𝐴 may not be, and if both are defined they may have different sizes (Example 2.4.4). So “𝐴𝐵=𝐵𝐴” is a strong condition, which we express by saying that 𝐴 and 𝐵 commute.

Example 2.4.19 (Zero divisors and the failure of cancellation). With 𝐴 as above and 𝑃=(1000),

𝐴2=𝐴𝑃=(0000),𝑃𝐴=(0100).

So a product of nonzero matrices can be zero, and even a nonzero square can be zero. In the language of Proposition 1.1.17, 𝐹2×2 has zero divisors. Note also that 𝐴𝑃=0 while 𝑃𝐴≠0.

Cancellation fails with them: 𝐴𝑃=𝐴0 with 𝐴≠0, but 𝑃≠0. In general, 𝐴𝐵=𝐴𝐶 means 𝐴(𝐵−𝐶)=0 (Proposition 2.4.14(c)), so cancelling 𝐴 is legitimate exactly when 𝐴𝑋=0 forces 𝑋=0. For 𝐴 that are left-invertible (Section 2.5) this holds; for the 𝐴 above it does not, since 𝑇𝐴 kills 𝐞1, and any 𝑋 whose columns lie in span(𝐞1) satisfies 𝐴𝑋=0.

These examples are 2×2, which is the smallest size where anything can go wrong: 𝐹1×1 is just 𝐹, where multiplication is commutative and there are no zero divisors. For 𝑛≥2, put the 2×2 examples in the top left corner of an 𝑛×𝑛 matrix that is zero elsewhere. By block multiplication (Theorem 2.4.34) the products are computed in that corner, so 𝐹𝑛×𝑛 has the same failures. Finding such examples is an instance of Technique 1.4.18: the first place to look is 2×2 matrices whose entries are 0 and 1.

Some matrices do commute. A scalar matrix 𝑐𝐼𝑛 commutes with every 𝐴∈𝐹𝑛×𝑛, since (𝑐𝐼𝑛)𝐴=𝑐𝐴=𝐴(𝑐𝐼𝑛) by Proposition 2.4.14. Any 𝐴 commutes with its own powers, since 𝐴𝐴𝑘=𝐴𝑘+1=𝐴𝑘𝐴, and hence with every 𝑎0𝐼𝑛+𝑎1𝐴+⋯+𝑎𝑘𝐴𝑘. Diagonal matrices commute with each other (Example 2.4.10), and so do the rotation matrices [𝑅𝛼] and [𝑅𝛽], since both products equal [𝑅𝛼+𝛽]. Which matrices commute with a given one is a recurring question; see Exercise 2.4.42 and Exercise 2.4.43.

Exercise 2.4.20.standard Find 𝐴,𝐵∈ℝ2×2, none of whose eight entries is 0, with 𝐴𝐵=0 but 𝐵𝐴≠0.

Solution.

Uses. Proposition 2.4.8 (Four views of the product), Definition 2.3.8 (Matrix–vector product)

Hint 1. By the column view, 𝐴𝐵=0 means 𝐴𝐛=𝟎 for each column 𝐛 of 𝐵. Start from an 𝐴 that kills some nonzero vector.
Hint 2. Try 𝐴=(1212). Which vectors does it kill? Build 𝐵 from such columns, and then compute 𝐵𝐴.
Sketch. 𝐴=(1212) kills (2,−1), so 𝐵=(22−1−1) gives 𝐴𝐵=0, while 𝐵𝐴=(48−2−4)≠0.

By the column view (Proposition 2.4.8(b)), 𝐴𝐵=0 means that 𝐴 sends each column of 𝐵 to 𝟎. Let 𝐴=(1212). By Definition 2.3.8, 𝐴(𝑥,𝑦)=(𝑥+2𝑦,𝑥+2𝑦), so 𝐴(2,−1)=𝟎. Let 𝐵=(22−1−1), whose columns are both (2,−1). Then 𝐴𝐵=0, and

𝐵𝐴=(2+24+4−1−1−2−2)=(48−2−4)≠0.

No entry of 𝐴 or 𝐵 is 0.

2.4.6The transpose

The row view and the column view are mirror images of each other. The transpose makes the mirror precise.

Definition 2.4.21 (Transpose). The transpose of 𝐴=(𝑎𝑖𝑗)∈𝐹𝑚×𝑛 is the matrix 𝐴𝖳∈𝐹𝑛×𝑚 with

(𝐴𝖳)𝑖𝑗=𝑎𝑗𝑖(1≤𝑖≤𝑛,1≤𝑗≤𝑚).

That is, row 𝑖 of 𝐴𝖳 is column 𝑖 of 𝐴 written as a row, and column 𝑗 of 𝐴𝖳 is row 𝑗 of 𝐴 written as a column. A square matrix 𝐴 is symmetric if 𝐴𝖳=𝐴 and skew-symmetric if 𝐴𝖳=−𝐴.

For example,

(10−2354)𝖳=(1305−24),(1227)𝖳=(1227),(03−30)𝖳=(0−330).

The second matrix is symmetric and the third skew-symmetric; symmetric matrices form the subspace of Example 1.4.11. A vector 𝐱∈𝐹𝑛 is a column, so 𝐱𝖳=(𝑥1⋯𝑥𝑛) is a row, and for 𝐱,𝐲∈𝐹𝑛 the 1×1 product

𝐱𝖳𝐲=𝑥1𝑦1+𝑥2𝑦2+⋯+𝑥𝑛𝑦𝑛

is a scalar. In the other order, for 𝐮∈𝐹𝑚 and 𝐯∈𝐹𝑛, the column–row product 𝐮𝐯𝖳∈𝐹𝑚×𝑛 has (𝑖,𝑗) entry 𝑢𝑖𝑣𝑗, as in Proposition 2.4.8(d).

Proposition 2.4.22 (Transpose is a linear involution). For 𝐴,𝐵∈𝐹𝑚×𝑛 and 𝑎∈𝐹,

(𝐴𝖳)𝖳=𝐴,𝐼𝑛𝖳=𝐼𝑛,(𝑎𝐴+𝐵)𝖳=𝑎𝐴𝖳+𝐵𝖳.

So 𝐴↦𝐴𝖳 is a linear bijection 𝐹𝑚×𝑛→𝐹𝑛×𝑚, whose inverse is transposition 𝐹𝑛×𝑚→𝐹𝑚×𝑛.

Proof.routine

Uses. Definition 2.4.21 (Transpose), Definition 1.2.7 (Matrices), Definition 2.3.5 (Identity matrix)

Hint 1. Compare entries. The (𝑖,𝑗) entry of (𝐴𝖳)𝖳 is the (𝑗,𝑖) entry of 𝐴𝖳.
Hint 2. For the last claim, transposing twice gives back the matrix you started with, whichever of the two directions you apply first.
Sketch. ((𝐴𝖳)𝖳)𝑖𝑗=(𝐴𝖳)𝑗𝑖=𝑎𝑖𝑗, ((𝑎𝐴+𝐵)𝖳)𝑖𝑗=𝑎𝑎𝑗𝑖+𝑏𝑗𝑖, and 𝛿𝑗𝑖=𝛿𝑖𝑗. The two transposition maps 𝐹𝑚×𝑛→𝐹𝑛×𝑚 and back are inverse to each other.

By Definition 2.4.21, ((𝐴𝖳)𝖳)𝑖𝑗=(𝐴𝖳)𝑗𝑖=𝑎𝑖𝑗, and since matrices are added and scaled entrywise,

((𝑎𝐴+𝐵)𝖳)𝑖𝑗=(𝑎𝐴+𝐵)𝑗𝑖=𝑎𝑎𝑗𝑖+𝑏𝑗𝑖=(𝑎𝐴𝖳+𝐵𝖳)𝑖𝑗.

The (𝑖,𝑗) entry of 𝐼𝑛𝖳 is 𝛿𝑗𝑖=𝛿𝑖𝑗. So transposition is linear, and applying it twice gives the identity map. Hence it is a bijection from 𝐹𝑚×𝑛 to 𝐹𝑛×𝑚, with transposition 𝐹𝑛×𝑚→𝐹𝑚×𝑛 as its inverse. □

Intuition (Why the order reverses). Before guessing a formula for (𝐴𝐵)𝖳, check sizes. If 𝐴∈𝐹ℓ×𝑚 and 𝐵∈𝐹𝑚×𝑛, then (𝐴𝐵)𝖳 is 𝑛×ℓ, while 𝐴𝖳∈𝐹𝑚×ℓ and 𝐵𝖳∈𝐹𝑛×𝑚. So 𝐴𝖳𝐵𝖳 is not even defined unless ℓ=𝑛, and the only product of the two transposes with the right size is 𝐵𝖳𝐴𝖳. The same reversal will appear for inverses of composites (Section 2.5) and for adjoints (Section 6.6).

Proposition 2.4.23 (Transpose of a product). For 𝐴∈𝐹ℓ×𝑚 and 𝐵∈𝐹𝑚×𝑛,

(𝐴𝐵)𝖳=𝐵𝖳𝐴𝖳.

Proof (entry by entry).routine

Uses. Definition 2.4.21 (Transpose), Proposition 2.4.8 (Four views of the product), Definition 1.1.1 (Field)

Techniques. Compute entry by entry (Technique 2.4.15)

Hint 1. Compute the (𝑖,𝑗) entry of each side with Definition 2.4.21 and the entry formula.
Hint 2. ((𝐴𝐵)𝖳)𝑖𝑗=(𝐴𝐵)𝑗𝑖=∑𝑘𝑎𝑗𝑘𝑏𝑘𝑖. Write each factor as an entry of a transpose, and reorder each product.
Sketch. The (𝑖,𝑗) entry of (𝐴𝐵)𝖳 is ∑𝑘𝑎𝑗𝑘𝑏𝑘𝑖. Since 𝑎𝑗𝑘𝑏𝑘𝑖=𝑏𝑘𝑖𝑎𝑗𝑘=(𝐵𝖳)𝑖𝑘(𝐴𝖳)𝑘𝑗, this sum is the (𝑖,𝑗) entry of 𝐵𝖳𝐴𝖳.

Both sides are 𝑛×ℓ. Let 1≤𝑖≤𝑛 and 1≤𝑗≤ℓ. By Definition 2.4.21 and Proposition 2.4.8(a), then commutativity of multiplication in 𝐹, then Definition 2.4.21 and Proposition 2.4.8(a) again,

((𝐴𝐵)𝖳)𝑖𝑗=(𝐴𝐵)𝑗𝑖=∑𝑘=1𝑚𝑎𝑗𝑘𝑏𝑘𝑖=∑𝑘=1𝑚𝑏𝑘𝑖𝑎𝑗𝑘=∑𝑘=1𝑚(𝐵𝖳)𝑖𝑘(𝐴𝖳)𝑘𝑗=(𝐵𝖳𝐴𝖳)𝑖𝑗.

□

The first proof used commutativity of 𝐹 at one step, and that step is where the order of the factors flips. The second proof explains the reversal through the views of the product: the row view of 𝐴𝐵 is the column view of 𝐵𝖳𝐴𝖳 in a mirror.

Proof (rows become columns).routine

Uses. Proposition 2.4.8 (Four views of the product), Proposition 2.4.22 (Transpose is a linear involution), Definition 2.4.21 (Transpose), Definition 2.3.8 (Matrix–vector product)

Hint 1. Column 𝑖 of (𝐴𝐵)𝖳 is row 𝑖 of 𝐴𝐵, written as a column. What is row 𝑖 of 𝐴𝐵 in the row view?
Hint 2. Column 𝑖 of 𝐵𝖳𝐴𝖳 is 𝐵𝖳 times column 𝑖 of 𝐴𝖳. Expand this with the column view, and compare with the transpose of the row-view expansion.
Sketch. By the row view, row 𝑖 of 𝐴𝐵 is ∑𝑘𝑎𝑖𝑘𝐵𝑘,⋅; transposing (a linear operation) gives ∑𝑘𝑎𝑖𝑘(𝐵𝖳)⋅,𝑘. By the column view, column 𝑖 of 𝐵𝖳𝐴𝖳 is 𝐵𝖳(𝐴𝖳)⋅,𝑖=∑𝑘𝑎𝑖𝑘(𝐵𝖳)⋅,𝑘, since (𝐴𝖳)𝑘𝑖=𝑎𝑖𝑘. The two matrices have the same columns.

By Definition 2.4.21, column 𝑖 of (𝐴𝐵)𝖳 is the transpose of row 𝑖 of 𝐴𝐵. By the row view (Proposition 2.4.8(c)) and the linearity of transposition (Proposition 2.4.22),

((𝐴𝐵)𝑖,⋅)𝖳=(∑𝑘=1𝑚𝑎𝑖𝑘𝐵𝑘,⋅)𝖳=∑𝑘=1𝑚𝑎𝑖𝑘(𝐵𝑘,⋅)𝖳=∑𝑘=1𝑚𝑎𝑖𝑘(𝐵𝖳)⋅,𝑘,

since the transpose of row 𝑘 of 𝐵 is column 𝑘 of 𝐵𝖳. On the other side, column 𝑖 of 𝐴𝖳 is the transpose of row 𝑖 of 𝐴, with entries 𝑎𝑖1,…,𝑎𝑖𝑚. By the column view (Proposition 2.4.8(b)), column 𝑖 of 𝐵𝖳𝐴𝖳 is

𝐵𝖳(𝐴𝖳)⋅,𝑖=𝑎𝑖1(𝐵𝖳)⋅,1+⋯+𝑎𝑖𝑚(𝐵𝖳)⋅,𝑚.

So (𝐴𝐵)𝖳 and 𝐵𝖳𝐴𝖳 have the same columns. □

By induction, (𝐴1𝐴2⋯𝐴𝑘)𝖳=𝐴𝑘𝖳⋯𝐴2𝖳𝐴1𝖳, and in particular (𝐴𝑘)𝖳=(𝐴𝖳)𝑘. Proposition 2.4.23 is the engine of Technique 3.2.27, which turns facts about rows and left multiplication into facts about columns and right multiplication. The transpose also has a meaning in terms of linear maps, which needs more structure than a matrix: with an inner product it is the adjoint (Section 6.6), and in general it is the dual map (Section 13.1).

The column–row products 𝐞𝑖𝐞𝑗𝖳 of standard basis vectors are the simplest matrices of all, and we will use them repeatedly.

Lemma 2.4.24 (Matrix units). For 1≤𝑖≤𝑚 and 1≤𝑗≤𝑛, the matrix 𝐞𝑖𝐞𝑗𝖳∈𝐹𝑚×𝑛 has a 1 in position (𝑖,𝑗) and 0 everywhere else.
  1. (a)Every 𝐴∈𝐹𝑚×𝑛 is 𝐴=∑𝑖=1𝑚∑𝑗=1𝑛𝑎𝑖𝑗𝐞𝑖𝐞𝑗𝖳, and these are the only coefficients that work. So the 𝑚𝑛 matrices 𝐞𝑖𝐞𝑗𝖳 form a basis of 𝐹𝑚×𝑛.
  2. (b)For 𝐴∈𝐹𝑚×𝑛: 𝐴𝐞𝑗=𝐴⋅,𝑗, 𝐞𝑖𝖳𝐴=𝐴𝑖,⋅, and 𝐞𝑖𝖳𝐴𝐞𝑗=𝑎𝑖𝑗.
  3. (c)(𝐞𝑖𝐞𝑗𝖳)(𝐞𝑘𝐞𝑙𝖳)=𝛿𝑗𝑘𝐞𝑖𝐞𝑙𝖳, for matrices of compatible sizes.

Proof.routine

Uses. Proposition 2.4.8 (Four views of the product), Proposition 2.4.14 (Algebra of matrices), Proposition 2.3.13 (Linearity of the product), Definition 1.6.1 (Basis), Notation 2.4.7 (Entries, rows, and columns)

Hint 1. The (𝑘,𝑙) entry of the column–row product 𝐮𝐯𝖳 is 𝑢𝑘𝑣𝑙. For 𝐮=𝐞𝑖 and 𝐯=𝐞𝑗 that is 𝛿𝑘𝑖𝛿𝑙𝑗.
Hint 2. For (c), regroup with associativity: 𝐞𝑖(𝐞𝑗𝖳𝐞𝑘)𝐞𝑙𝖳, and the middle factor is a 1×1 matrix.
Sketch. The (𝑘,𝑙) entry of 𝐞𝑖𝐞𝑗𝖳 is 𝛿𝑘𝑖𝛿𝑙𝑗. (a) The (𝑘,𝑙) entry of ∑𝑐𝑖𝑗𝐞𝑖𝐞𝑗𝖳 is 𝑐𝑘𝑙, so it equals 𝐴 exactly when 𝑐𝑘𝑙=𝑎𝑘𝑙. (b) Column and row views. (c) Associativity and 𝐞𝑗𝖳𝐞𝑘=𝛿𝑗𝑘.

By Proposition 2.4.8(a) with inner size 1, the (𝑘,𝑙) entry of 𝐞𝑖𝐞𝑗𝖳 is 𝛿𝑘𝑖𝛿𝑙𝑗, which is 1 if (𝑘,𝑙)=(𝑖,𝑗) and 0 otherwise.

(a) Since matrices are added and scaled entrywise, the (𝑘,𝑙) entry of ∑𝑖,𝑗𝑐𝑖𝑗𝐞𝑖𝐞𝑗𝖳 is ∑𝑖,𝑗𝑐𝑖𝑗𝛿𝑘𝑖𝛿𝑙𝑗=𝑐𝑘𝑙. So this sum equals 𝐴 if and only if 𝑐𝑘𝑙=𝑎𝑘𝑙 for all 𝑘,𝑙. Every matrix is therefore a linear combination of the 𝐞𝑖𝐞𝑗𝖳 in exactly one way, which is what it means for them to form a basis (Definition 1.6.1), with the entries of 𝐴 as its coordinates.

(b) 𝐴𝐞𝑗=𝐴⋅,𝑗 is Proposition 2.3.13(c). By the row view (Proposition 2.4.8(c)), 𝐞𝑖𝖳𝐴=∑𝑘𝛿𝑖𝑘𝐴𝑘,⋅=𝐴𝑖,⋅. Then 𝐞𝑖𝖳𝐴𝐞𝑗=𝐴𝑖,⋅𝐞𝑗 is the 𝑗-th entry of row 𝑖, which is 𝑎𝑖𝑗.

(c) By associativity (Proposition 2.4.14) and (b), 𝐞𝑗𝖳𝐞𝑘 is the (𝑗,𝑘) entry of 𝐼, which is 𝛿𝑗𝑘. So

(𝐞𝑖𝐞𝑗𝖳)(𝐞𝑘𝐞𝑙𝖳)=𝐞𝑖(𝐞𝑗𝖳𝐞𝑘)𝐞𝑙𝖳=𝛿𝑗𝑘𝐞𝑖𝐞𝑙𝖳.

□

Part (c) gives the noncommutativity of Example 2.4.18 in its purest form: for 𝑖≠𝑗, (𝐞𝑖𝐞𝑗𝖳)(𝐞𝑗𝐞𝑖𝖳)=𝐞𝑖𝐞𝑖𝖳, while (𝐞𝑗𝐞𝑖𝖳)(𝐞𝑖𝐞𝑗𝖳)=𝐞𝑗𝐞𝑗𝖳. The matrices 𝐴 and 𝐵 of that example are 𝐞1𝐞2𝖳 and 𝐞2𝐞1𝖳.

Exercise 2.4.25.routine
  1. (a)Show that 𝐴𝖳𝐴 and 𝐴𝐴𝖳 are symmetric for every 𝐴∈𝐹𝑚×𝑛.
  2. (b)Let 𝐴,𝐵∈𝐹𝑛×𝑛 be symmetric. Show that 𝐴𝐵+𝐵𝐴 is symmetric, that 𝐴𝐵−𝐵𝐴 is skew-symmetric, and that 𝐴𝐵 is symmetric if and only if 𝐴𝐵=𝐵𝐴.

Solution.

Uses. Proposition 2.4.23 (Transpose of a product), Proposition 2.4.22 (Transpose is a linear involution)

Hint 1. Take the transpose of each expression with Proposition 2.4.23, and use (𝐴𝖳)𝖳=𝐴.
Hint 2. For symmetric 𝐴 and 𝐵, (𝐴𝐵)𝖳=𝐵𝖳𝐴𝖳=𝐵𝐴.
Sketch. (a) (𝐴𝖳𝐴)𝖳=𝐴𝖳(𝐴𝖳)𝖳=𝐴𝖳𝐴, and likewise for 𝐴𝐴𝖳. (b) (𝐴𝐵)𝖳=𝐵𝐴, so transposing swaps 𝐴𝐵 and 𝐵𝐴: 𝐴𝐵+𝐵𝐴 is fixed, 𝐴𝐵−𝐵𝐴 changes sign, and 𝐴𝐵 is fixed exactly when 𝐴𝐵=𝐵𝐴.

(a) By Proposition 2.4.23 and Proposition 2.4.22, (𝐴𝖳𝐴)𝖳=𝐴𝖳(𝐴𝖳)𝖳=𝐴𝖳𝐴 and (𝐴𝐴𝖳)𝖳=(𝐴𝖳)𝖳𝐴𝖳=𝐴𝐴𝖳.

(b) Since 𝐴𝖳=𝐴 and 𝐵𝖳=𝐵, Proposition 2.4.23 gives (𝐴𝐵)𝖳=𝐵𝖳𝐴𝖳=𝐵𝐴, and likewise (𝐵𝐴)𝖳=𝐴𝐵. By linearity of transposition (Proposition 2.4.22),

(𝐴𝐵+𝐵𝐴)𝖳=𝐵𝐴+𝐴𝐵,(𝐴𝐵−𝐵𝐴)𝖳=𝐵𝐴−𝐴𝐵=−(𝐴𝐵−𝐵𝐴).

Finally 𝐴𝐵 is symmetric if and only if 𝐴𝐵=(𝐴𝐵)𝖳=𝐵𝐴.

2.4.7The trace

Matrix multiplication is not commutative, but there is a number attached to a square matrix that cannot tell 𝐴𝐵 from 𝐵𝐴.

Definition 2.4.26 (Trace). The trace of 𝐴=(𝑎𝑖𝑗)∈𝐹𝑛×𝑛 is the sum of its diagonal entries,

tr𝐴=𝑎11+𝑎22+⋯+𝑎𝑛𝑛=∑𝑖=1𝑛𝑎𝑖𝑖.

For example, tr(1234)=5 and tr𝐼𝑛=𝑛∗1, which is 𝑛 over ℚ, ℝ, or ℂ and is 0 over 𝔽𝑝 when 𝑝∣𝑛. In this notation, the trace-zero matrices of Example 1.4.11 are those with tr𝐴=0.

Proposition 2.4.27 (The trace is linear). For 𝐴,𝐵∈𝐹𝑛×𝑛 and 𝑎∈𝐹, tr(𝑎𝐴+𝐵)=𝑎tr𝐴+tr𝐵 and tr𝐴𝖳=tr𝐴.

Proof.routine

Uses. Definition 2.4.26 (Trace), Definition 1.2.7 (Matrices), Definition 2.4.21 (Transpose)

Hint 1. The diagonal entries of 𝑎𝐴+𝐵 are 𝑎𝑎𝑖𝑖+𝑏𝑖𝑖.
Hint 2. Transposing does not move the diagonal entries: (𝐴𝖳)𝑖𝑖=𝑎𝑖𝑖.
Sketch. The diagonal entries of 𝑎𝐴+𝐵 are 𝑎𝑎𝑖𝑖+𝑏𝑖𝑖; add them up. Transposing fixes the diagonal: (𝐴𝖳)𝑖𝑖=𝑎𝑖𝑖.

Matrices are added and scaled entrywise, so

tr(𝑎𝐴+𝐵)=∑𝑖(𝑎𝑎𝑖𝑖+𝑏𝑖𝑖)=𝑎∑𝑖𝑎𝑖𝑖+∑𝑖𝑏𝑖𝑖=𝑎tr𝐴+tr𝐵.

By Definition 2.4.21, (𝐴𝖳)𝑖𝑖=𝑎𝑖𝑖, so tr𝐴𝖳=tr𝐴. □

The trace is not multiplicative: for 𝐴=diag(1,0) and 𝐵=diag(0,1) we have 𝐴𝐵=0, so tr(𝐴𝐵)=0, but tr𝐴tr𝐵=1. What it does satisfy is the following.

Proposition 2.4.28 (Cyclicity of the trace). For 𝐴∈𝐹𝑚×𝑛 and 𝐵∈𝐹𝑛×𝑚,

tr(𝐴𝐵)=tr(𝐵𝐴).
Intuition. Here 𝐴𝐵 is 𝑚×𝑚 and 𝐵𝐴 is 𝑛×𝑛, so the two products may not even have the same size, let alone be equal. But the diagonal entries of 𝐴𝐵 are (𝐴𝐵)𝑖𝑖=∑𝑘𝑎𝑖𝑘𝑏𝑘𝑖, so tr(𝐴𝐵) is the sum of 𝑎𝑖𝑘𝑏𝑘𝑖 over all pairs (𝑖,𝑘): every entry of 𝐴 multiplied by the entry of 𝐵 in the mirror position. That description is symmetric in 𝐴 and 𝐵. There is also an approach that avoids indices. For fixed 𝐴, both sides are linear in 𝐵, so by Technique 2.2.7 it is enough to check the identity for the matrix units of Lemma 2.4.24.

Proof (entry by entry).routine

Uses. Definition 2.4.26 (Trace), Proposition 2.4.8 (Four views of the product), Definition 1.1.1 (Field)

Techniques. Compute entry by entry (Technique 2.4.15)

Hint 1. Write tr(𝐴𝐵)=∑𝑖(𝐴𝐵)𝑖𝑖 and expand each diagonal entry with the entry formula.
Hint 2. You get a double sum ∑𝑖∑𝑘𝑎𝑖𝑘𝑏𝑘𝑖. Exchange the order of summation and recognize the diagonal entries of 𝐵𝐴.
Sketch. Both tr(𝐴𝐵) and tr(𝐵𝐴) expand to the double sum of 𝑎𝑖𝑘𝑏𝑘𝑖 over all 𝑖≤𝑚 and 𝑘≤𝑛; the two expansions differ only in the order of summation.

By Definition 2.4.26 and Proposition 2.4.8(a),

tr(𝐴𝐵)=∑𝑖=1𝑚(𝐴𝐵)𝑖𝑖=∑𝑖=1𝑚∑𝑘=1𝑛𝑎𝑖𝑘𝑏𝑘𝑖=∑𝑘=1𝑛∑𝑖=1𝑚𝑏𝑘𝑖𝑎𝑖𝑘=∑𝑘=1𝑛(𝐵𝐴)𝑘𝑘=tr(𝐵𝐴),

where we exchanged the two finite sums and used commutativity of multiplication in 𝐹. □

Proof (check on matrix units).standard

Uses. Lemma 2.4.24 (Matrix units), Proposition 2.4.27 (The trace is linear), Proposition 2.4.14 (Algebra of matrices), Corollary 2.2.6 (Agreeing on a spanning list), Definition 2.4.26 (Trace)

Techniques. Check it on a basis (Technique 2.2.7)

Hint 1. Fix 𝐴 and define 𝜑,𝜓:𝐹𝑛×𝑚→𝐹 by 𝜑(𝑋)=tr(𝐴𝑋) and 𝜓(𝑋)=tr(𝑋𝐴). Why are these linear?
Hint 2. By Corollary 2.2.6, it is enough that 𝜑 and 𝜓 agree on the matrix units 𝐞𝑘𝐞𝑖𝖳 (1≤𝑘≤𝑛, 1≤𝑖≤𝑚).
Hint 3. 𝐴𝐞𝑘𝐞𝑖𝖳 is zero except for column 𝑖, which is 𝐴⋅,𝑘. Which diagonal entry survives? Do the same for 𝐞𝑘𝐞𝑖𝖳𝐴 with rows.
Sketch. 𝜑(𝑋)=tr(𝐴𝑋) and 𝜓(𝑋)=tr(𝑋𝐴) are linear in 𝑋 by distributivity and Proposition 2.4.27. 𝐴(𝐞𝑘𝐞𝑖𝖳)=𝐴⋅,𝑘𝐞𝑖𝖳 has only column 𝑖 nonzero, so its trace is its (𝑖,𝑖) entry 𝑎𝑖𝑘; (𝐞𝑘𝐞𝑖𝖳)𝐴=𝐞𝑘𝐴𝑖,⋅ has only row 𝑘 nonzero, with (𝑘,𝑘) entry 𝑎𝑖𝑘. They agree on a spanning list, so 𝜑=𝜓; take 𝑋=𝐵.

Fix 𝐴∈𝐹𝑚×𝑛, and define 𝜑,𝜓:𝐹𝑛×𝑚→𝐹 by 𝜑(𝑋)=tr(𝐴𝑋) and 𝜓(𝑋)=tr(𝑋𝐴). Both are linear: for instance 𝜑(𝑐𝑋+𝑌)=tr(𝑐𝐴𝑋+𝐴𝑌)=𝑐𝜑(𝑋)+𝜑(𝑌) by Proposition 2.4.14 and Proposition 2.4.27. By Lemma 2.4.24(a), the matrices 𝐞𝑘𝐞𝑖𝖳 with 1≤𝑘≤𝑛 and 1≤𝑖≤𝑚 span 𝐹𝑛×𝑚, so by Corollary 2.2.6 it suffices to show 𝜑(𝐞𝑘𝐞𝑖𝖳)=𝜓(𝐞𝑘𝐞𝑖𝖳).

By associativity and Lemma 2.4.24(b), 𝐴(𝐞𝑘𝐞𝑖𝖳)=(𝐴𝐞𝑘)𝐞𝑖𝖳=𝐴⋅,𝑘𝐞𝑖𝖳. This 𝑚×𝑚 matrix has (𝑟,𝑠) entry 𝑎𝑟𝑘𝛿𝑠𝑖, so its only nonzero column is column 𝑖, and its only diagonal entry that can be nonzero is the (𝑖,𝑖) entry 𝑎𝑖𝑘. Hence 𝜑(𝐞𝑘𝐞𝑖𝖳)=𝑎𝑖𝑘. Similarly, (𝐞𝑘𝐞𝑖𝖳)𝐴=𝐞𝑘(𝐞𝑖𝖳𝐴)=𝐞𝑘𝐴𝑖,⋅ is the 𝑛×𝑛 matrix with (𝑟,𝑠) entry 𝛿𝑟𝑘𝑎𝑖𝑠, whose only possibly nonzero diagonal entry is the (𝑘,𝑘) entry 𝑎𝑖𝑘. So 𝜓(𝐞𝑘𝐞𝑖𝖳)=𝑎𝑖𝑘 as well. Hence 𝜑=𝜓, and 𝜑(𝐵)=𝜓(𝐵) is the claim. □

The first proof is shorter. The second shows what linearity in 𝐵 buys: only 𝑚𝑛 very simple products need to be computed, and each is a picture (one nonzero column, one nonzero row) rather than a sum.

Cyclicity extends to longer products by grouping: tr(𝐴𝐵𝐶)=tr(𝐴(𝐵𝐶))=tr((𝐵𝐶)𝐴)=tr(𝐵𝐶𝐴), and likewise tr(𝐵𝐶𝐴)=tr(𝐶𝐴𝐵). A product inside a trace can be rotated, but not rearranged arbitrarily (Exercise 2.4.32). This makes the trace a test for identities in which the order of factors matters.

Technique 2.4.29 (Cyclicity of trace). The trace is linear, and it does not see the order of two factors: tr(𝐴𝐵)=tr(𝐵𝐴), so tr(𝐴1𝐴2⋯𝐴𝑘) is unchanged by rotating the factors cyclically. Take the trace of both sides of a claimed identity. If the traces differ, the identity is false; and quantities such as 𝐴𝐵−𝐵𝐴, which are invisible to the trace, can be eliminated.

Reach for it when commutators 𝐴𝐵−𝐵𝐴 appear (they always have trace 0), when a product is conjugated as in 𝑆−1𝐴𝑆 (once inverses are available, tr(𝑆−1𝐴𝑆)=tr(𝐴𝑆𝑆−1)=tr𝐴, which makes the trace a similarity invariant, Section 4.5), and when an inner product of matrices is written as tr(𝐵𝖳𝐴) (Section 6.1). Only cyclic rotations are allowed: tr(𝐴𝐵𝐶) and tr(𝐵𝐴𝐶) differ in general. And the trace detects nothing about a matrix of trace 0; it is a single number, so it can rule things out but rarely proves them. The canonical example is Proposition 2.4.30.

Proposition 2.4.30 (𝐴𝐵−𝐵𝐴≠𝐼). Let 𝑛≥1, and suppose that 𝑛∗1≠0 in 𝐹; for instance, 𝐹 has characteristic 0 (Definition 1.1.28). Then 𝐴𝐵−𝐵𝐴≠𝐼𝑛 for all 𝐴,𝐵∈𝐹𝑛×𝑛.

Proof.routine

Uses. Proposition 2.4.27 (The trace is linear), Proposition 2.4.28 (Cyclicity of the trace), Definition 2.4.26 (Trace)

Techniques. Cyclicity of trace (Technique 2.4.29)

Hint 1. Take the trace of both sides of 𝐴𝐵−𝐵𝐴=𝐼𝑛.
Hint 2. By linearity and cyclicity, tr(𝐴𝐵−𝐵𝐴)=tr(𝐴𝐵)−tr(𝐵𝐴)=0. What is tr𝐼𝑛?
Sketch. tr(𝐴𝐵−𝐵𝐴)=tr(𝐴𝐵)−tr(𝐵𝐴)=0, but tr𝐼𝑛=𝑛∗1≠0.
By Proposition 2.4.27 and Proposition 2.4.28, tr(𝐴𝐵−𝐵𝐴)=tr(𝐴𝐵)−tr(𝐵𝐴)=0. But tr𝐼𝑛=1+⋯+1=𝑛∗1, which is nonzero by hypothesis. So 𝐴𝐵−𝐵𝐴 and 𝐼𝑛 have different traces and cannot be equal. □

In terms of maps: on the infinite-dimensional space 𝐹[𝑥], differentiation 𝐷 and multiplication by 𝑥 satisfy 𝐷𝑀−𝑀𝐷=id, by the product rule (Exercise 2.4.51). Proposition 2.4.30 says that this identity has no solution by 𝑛×𝑛 matrices, that is, by operators on 𝐹𝑛, when 𝑛∗1≠0. In quantum mechanics the same relation holds between the position and momentum operators, and this is why they cannot act on a finite-dimensional space.

Remark 2.4.31 (The hypothesis 𝑛∗1≠0 is needed). The matrices of Example 2.4.18 satisfy

𝐴𝐵−𝐵𝐴=(1000)−(0001)=(100−1).

Over 𝔽2, where −1=1, this is 𝐼2. There is no contradiction with Proposition 2.4.30, because 2∗1=0 in 𝔽2, and indeed tr𝐼2=0 there. In general, over 𝔽𝑝 there are 𝑝×𝑝 matrices with 𝐴𝐵−𝐵𝐴=𝐼𝑝 (Exercise 2.4.52).

Exercise 2.4.32.standard Find the error in the following argument, and show that its conclusion is false.

Claim. For all 𝐴,𝐵,𝐶∈𝐹𝑛×𝑛, tr(𝐴𝐵𝐶)=tr(𝐵𝐴𝐶).

Proof. By associativity and Proposition 2.4.28,

tr(𝐴𝐵𝐶)=tr((𝐴𝐵)𝐶)=tr((𝐵𝐴)𝐶)=tr(𝐵𝐴𝐶).

Solution.

Uses. Proposition 2.4.28 (Cyclicity of the trace), Lemma 2.4.24 (Matrix units)

Hint 1. Proposition 2.4.28 says tr(𝑋𝑌)=tr(𝑌𝑋), an equality of two numbers. Does it say 𝑋𝑌=𝑌𝑋?
Hint 2. For a counterexample, try 𝐴=𝐞1𝐞2𝖳, 𝐵=𝐞2𝐞1𝖳, and 𝐶=𝐞1𝐞1𝖳 in 𝐹2×2.
Sketch. The step tr((𝐴𝐵)𝐶)=tr((𝐵𝐴)𝐶) replaces 𝐴𝐵 by 𝐵𝐴 inside a product, which needs 𝐴𝐵=𝐵𝐴; cyclicity only gives tr(𝑋𝑌)=tr(𝑌𝑋). With the matrix units above, 𝐴𝐵𝐶=𝐞1𝐞1𝖳 has trace 1 and 𝐵𝐴𝐶=0.

The error is in the step tr((𝐴𝐵)𝐶)=tr((𝐵𝐴)𝐶). Proposition 2.4.28 says that tr(𝑋𝑌)=tr(𝑌𝑋) for two matrices 𝑋 and 𝑌. With 𝑋=𝐴𝐵 and 𝑌=𝐶 it gives tr(𝐴𝐵𝐶)=tr(𝐶𝐴𝐵), a rotation. It does not say that 𝐴𝐵 and 𝐵𝐴 are equal, or that they can be exchanged inside a longer product; the argument used tr(𝐴𝐵)=tr(𝐵𝐴) as if it were 𝐴𝐵=𝐵𝐴.

The conclusion is false. In 𝐹2×2, let 𝐴=𝐞1𝐞2𝖳, 𝐵=𝐞2𝐞1𝖳, and 𝐶=𝐞1𝐞1𝖳. By Lemma 2.4.24(c), 𝐴𝐵=𝐞1𝐞1𝖳 and 𝐵𝐴=𝐞2𝐞2𝖳, so

𝐴𝐵𝐶=𝐞1𝐞1𝖳𝐞1𝐞1𝖳=𝐞1𝐞1𝖳,𝐵𝐴𝐶=𝐞2𝐞2𝖳𝐞1𝐞1𝖳=0.

Hence tr(𝐴𝐵𝐶)=1≠0=tr(𝐵𝐴𝐶). In matrices: 𝐴=(0100), 𝐵=(0010), 𝐶=(1000).

2.4.8Block matrices

Large matrices often have structure that is visible only when we group their entries into rectangular pieces, such as a block of zeros or a copy of the identity. Multiplication respects this grouping.

Definition 2.4.33 (Block matrix). Let 𝐴∈𝐹ℓ×𝑚. Split the row indices 1,…,ℓ into 𝑟 consecutive groups of sizes ℓ1,…,ℓ𝑟, so ℓ1+⋯+ℓ𝑟=ℓ, and the column indices into 𝑠 consecutive groups of sizes 𝑚1,…,𝑚𝑠. The block 𝐴𝐼𝐾∈𝐹ℓ𝐼×𝑚𝐾 is the submatrix of 𝐴 formed by the entries in the 𝐼-th group of rows and the 𝐾-th group of columns. We then write 𝐴 as an 𝑟×𝑠 array of blocks,

𝐴=(𝐴11⋯𝐴1𝑠⋮⋮𝐴𝑟1⋯𝐴𝑟𝑠),

and call this a block matrix, partitioned with row sizes ℓ1,…,ℓ𝑟 and column sizes 𝑚1,…,𝑚𝑠. A block of zeros is written 0.

For example, with row sizes 1,2 and column sizes 2,2,

(120301452067)=(𝐴11𝐴12𝐴21𝐴22),

where, for instance, 𝐴11=(12) and 𝐴22=(4567). A square block matrix with square diagonal blocks 𝐴11,…,𝐴𝑟𝑟 is block diagonal if all other blocks are zero, and block upper triangular if 𝐴𝐼𝐾=0 whenever 𝐼>𝐾.

Theorem 2.4.34 (Block multiplication). Let 𝐴∈𝐹ℓ×𝑚 be partitioned with row sizes ℓ1,…,ℓ𝑟 and column sizes 𝑚1,…,𝑚𝑠, and let 𝐵∈𝐹𝑚×𝑛 be partitioned with row sizes 𝑚1,…,𝑚𝑠 (the column sizes of 𝐴) and column sizes 𝑛1,…,𝑛𝑡. Partition 𝐴𝐵 with row sizes ℓ1,…,ℓ𝑟 and column sizes 𝑛1,…,𝑛𝑡. Then

(𝐴𝐵)𝐼𝐽=∑𝐾=1𝑠𝐴𝐼𝐾𝐵𝐾𝐽

for 1≤𝐼≤𝑟 and 1≤𝐽≤𝑡. That is, block matrices are multiplied by the entry formula, treating blocks as entries and keeping each product in its order.

Proof (entry by entry).standard

Uses. Definition 2.4.33 (Block matrix), Proposition 2.4.8 (Four views of the product)

Techniques. Compute entry by entry (Technique 2.4.15)

Hint 1. Fix an entry of 𝐴𝐵 in block (𝐼,𝐽), and write it with the entry formula as a sum over 𝑘=1,…,𝑚.
Hint 2. Split that sum according to the group of columns of 𝐴 (equivalently, rows of 𝐵) that 𝑘 lies in. Each piece is an entry of some 𝐴𝐼𝐾𝐵𝐾𝐽.
Sketch. For row 𝑖 in group 𝐼 and column 𝑗 in group 𝐽, (𝐴𝐵)𝑖𝑗=∑𝑘𝑎𝑖𝑘𝑏𝑘𝑗. Grouping the indices 𝑘 by the 𝐾-th group of columns of 𝐴, the 𝐾-th partial sum is exactly the corresponding entry of 𝐴𝐼𝐾𝐵𝐾𝐽, by the entry formula for that product. Adding over 𝐾 gives the entry of ∑𝐾𝐴𝐼𝐾𝐵𝐾𝐽.

Let 𝑖 be the 𝑝-th row index in the 𝐼-th group of rows, and 𝑗 the 𝑞-th column index in the 𝐽-th group of columns. Write 𝐺𝐾 for the 𝐾-th group of indices in {1,…,𝑚}, which has 𝑚𝐾 elements. For 𝑘 the 𝑢-th element of 𝐺𝐾, the entries 𝑎𝑖𝑘 and 𝑏𝑘𝑗 are the entries (𝐴𝐼𝐾)𝑝𝑢 and (𝐵𝐾𝐽)𝑢𝑞 of the blocks. Splitting the sum over 𝑘 into the groups 𝐺1,…,𝐺𝑠,

(𝐴𝐵)𝑖𝑗=∑𝑘=1𝑚𝑎𝑖𝑘𝑏𝑘𝑗=∑𝐾=1𝑠∑𝑘∈𝐺𝐾𝑎𝑖𝑘𝑏𝑘𝑗=∑𝐾=1𝑠∑𝑢=1𝑚𝐾(𝐴𝐼𝐾)𝑝𝑢(𝐵𝐾𝐽)𝑢𝑞=∑𝐾=1𝑠(𝐴𝐼𝐾𝐵𝐾𝐽)𝑝𝑞.

The left side is the (𝑝,𝑞) entry of (𝐴𝐵)𝐼𝐽 and the right side is the (𝑝,𝑞) entry of ∑𝐾𝐴𝐼𝐾𝐵𝐾𝐽. □

The second proof reduces the theorem to three special cases, each of which is one of the views of Proposition 2.4.8.

Proof (from the views).standard

Uses. Proposition 2.4.8 (Four views of the product), Definition 2.4.33 (Block matrix)

Hint 1. Handle three special cases first: only the columns of 𝐵 are split; only the rows of 𝐴 are split; only the inner index is split, 𝐴=(𝐴1⋯𝐴𝑠) and 𝐵 is 𝐵1,…,𝐵𝑠 stacked.
Hint 2. The first two cases are the column and row views. For the third, group the terms of the column–row view.
Hint 3. For the general case, block (𝐼,𝐽) of 𝐴𝐵 is (rows of group 𝐼 of 𝐴) times (columns of group 𝐽 of 𝐵) by the first two cases; now apply the third.
Sketch. By the column view, the columns of 𝐴𝐵 in group 𝐽 are 𝐴 times the columns of 𝐵 in group 𝐽; by the row view, the rows of 𝐴𝐵 in group 𝐼 are the rows of 𝐴 in group 𝐼 times 𝐵. So (𝐴𝐵)𝐼𝐽=𝐴𝐼𝐵𝐽, with 𝐴𝐼 the 𝐼-th block row of 𝐴 and 𝐵𝐽 the 𝐽-th block column of 𝐵. By the column–row view, 𝐴𝐼𝐵𝐽=∑𝑘(𝐴𝐼)⋅,𝑘(𝐵𝐽)𝑘,⋅, and grouping the 𝑘 by blocks gives ∑𝐾𝐴𝐼𝐾𝐵𝐾𝐽.

Let 𝐴𝐼 be the 𝐼-th block row of 𝐴, that is, the ℓ𝐼×𝑚 matrix formed by the rows of 𝐴 in the 𝐼-th group, and let 𝐵𝐽 be the 𝐽-th block column of 𝐵, the 𝑚×𝑛𝐽 matrix formed by its columns in the 𝐽-th group.

By the row view (Proposition 2.4.8(c)), each row of 𝐴𝐵 in the 𝐼-th group is the corresponding row of 𝐴 times 𝐵, so these rows form the matrix 𝐴𝐼𝐵. By the column view (Proposition 2.4.8(b)), applied to 𝐴𝐼𝐵, its columns in the 𝐽-th group are 𝐴𝐼 times the corresponding columns of 𝐵, which form 𝐴𝐼𝐵𝐽. Hence (𝐴𝐵)𝐼𝐽=𝐴𝐼𝐵𝐽.

By the column–row view (Proposition 2.4.8(d)), 𝐴𝐼𝐵𝐽=∑𝑘=1𝑚(𝐴𝐼)⋅,𝑘(𝐵𝐽)𝑘,⋅. Group the terms by the groups 𝐺1,…,𝐺𝑠 of the index 𝑘. The columns of 𝐴𝐼 with 𝑘∈𝐺𝐾 are the columns of 𝐴𝐼𝐾, and the rows of 𝐵𝐽 with 𝑘∈𝐺𝐾 are the rows of 𝐵𝐾𝐽, in the same order. So by the column–row view again, applied to 𝐴𝐼𝐾𝐵𝐾𝐽,

∑𝑘∈𝐺𝐾(𝐴𝐼)⋅,𝑘(𝐵𝐽)𝑘,⋅=𝐴𝐼𝐾𝐵𝐾𝐽,

and summing over 𝐾 gives (𝐴𝐵)𝐼𝐽=∑𝐾𝐴𝐼𝐾𝐵𝐾𝐽. □

In the second proof the three special cases are what to remember: blocks of columns of 𝐵 produce blocks of columns of 𝐴𝐵, blocks of rows of 𝐴 produce blocks of rows of 𝐴𝐵, and splitting the inner index turns the product into a sum. The partitions must match: the column sizes of 𝐴 must be the row sizes of 𝐵, or the products 𝐴𝐼𝐾𝐵𝐾𝐽 are not defined. And the factors cannot be swapped, since blocks are matrices: 𝐴𝐼𝐾𝐵𝐾𝐽 is not 𝐵𝐾𝐽𝐴𝐼𝐾.

For 2×2 block matrices the theorem says that the (𝐼,𝐽) block of 𝐴𝐵 is 𝐴𝐼1𝐵1𝐽+𝐴𝐼2𝐵2𝐽, exactly as for the entries of a product of 2×2 matrices. For block diagonal matrices it gives

(𝐴100𝐴2)(𝐵100𝐵2)=(𝐴1𝐵100𝐴2𝐵2),

and for block upper triangular matrices

(𝐴1𝑋0𝐴2)(𝐵1𝑌0𝐵2)=(𝐴1𝐵1𝐴1𝑌+𝑋𝐵20𝐴2𝐵2).

So block diagonal matrices multiply block by block, and in particular diag(𝐴1,𝐴2)𝑘=diag(𝐴1𝑘,𝐴2𝑘), where diag(𝐴1,𝐴2) denotes the block diagonal matrix.

Technique 2.4.35 (Block decomposition). Split matrices into blocks that match the structure of the problem, and compute with the blocks as if they were entries (Theorem 2.4.34). Typical splittings: off a single first row and column, to set up an induction on the size; along a basis that is split into two parts, for example a basis of a subspace extended to a basis of the whole space; or around a block of zeros or a copy of 𝐼.

Reach for it when a matrix has large zero or identity blocks, when an argument should reduce from size 𝑛 to size 𝑛−1, or when a statement concerns a map that preserves a subspace. Two checks: the partitions must match, and products of blocks must keep their order. The canonical example is Proposition 2.4.36. Later it computes determinants of block triangular matrices (Section 5.4), compares 𝐴𝐵 with 𝐵𝐴 (Section 7.3), and organizes the generalized eigenspace decomposition and the Jordan form (Section 10.2, Section 10.3).

Recall from Exercise 2.3.38 that 𝐴∈𝐹𝑛×𝑛 is upper triangular if 𝑎𝑖𝑗=0 whenever 𝑖>𝑗.

Proposition 2.4.36 (Products of upper triangular matrices). If 𝐴,𝐵∈𝐹𝑛×𝑛 are upper triangular, then so is 𝐴𝐵, and its diagonal entries are (𝐴𝐵)𝑖𝑖=𝑎𝑖𝑖𝑏𝑖𝑖.
Intuition. There are two natural strategies. The entry formula (𝐴𝐵)𝑖𝑗=∑𝑘𝑎𝑖𝑘𝑏𝑘𝑗 suggests looking at which terms can be nonzero. Alternatively, an upper triangular matrix of size 𝑛 is a 1×1 corner, a row, a zero column, and an upper triangular matrix of size 𝑛−1. That suggests block multiplication and induction on 𝑛. The second strategy is longer here, but it is the template for every later induction on the size of a triangular matrix (Section 5.3, Section 7.5).

Proof (by blocks, induction on 𝑛).standard

Uses. Theorem 2.4.34 (Block multiplication), Definition 2.4.33 (Block matrix)

Techniques. Block decomposition (Technique 2.4.35)

Hint 1. Partition with row and column sizes 1,𝑛−1. What do the blocks of an upper triangular matrix look like?
Hint 2. Write 𝐴=(𝑎11𝐚𝖳𝟎𝐴′) and similarly for 𝐵, with 𝐴′ and 𝐵′ upper triangular of size 𝑛−1. Multiply by blocks and apply the induction hypothesis to 𝐴′𝐵′.
Sketch. Induct on 𝑛; 𝑛=1 is clear. Split off the first row and column: 𝐴=(𝑎11𝐚𝖳𝟎𝐴′) and 𝐵=(𝑏11𝐛𝖳𝟎𝐵′) with 𝐴′,𝐵′ upper triangular. By block multiplication, 𝐴𝐵 has corner 𝑎11𝑏11, a zero column below it, and lower right block 𝐴′𝐵′, which is upper triangular with diagonal entries 𝑎𝑖𝑖𝑏𝑖𝑖 (𝑖≥2) by induction.

We induct on 𝑛. For 𝑛=1 every matrix is upper triangular and (𝐴𝐵)11=𝑎11𝑏11.

Let 𝑛≥2 and assume the claim for size 𝑛−1. Partition 𝐴 and 𝐵 with row sizes and column sizes 1,𝑛−1. Since 𝐴 is upper triangular, its lower left block is the zero column 𝟎∈𝐹𝑛−1, and its lower right block 𝐴′, which has entries 𝑎𝑖𝑗 with 𝑖,𝑗≥2, is upper triangular. So

𝐴=(𝑎11𝐚𝖳𝟎𝐴′),𝐵=(𝑏11𝐛𝖳𝟎𝐵′),

for some 𝐚,𝐛∈𝐹𝑛−1 and upper triangular 𝐴′,𝐵′∈𝐹(𝑛−1)×(𝑛−1). By Theorem 2.4.34, the blocks of 𝐴𝐵 are

𝑎11𝑏11+𝐚𝖳𝟎=𝑎11𝑏11,𝑎11𝐛𝖳+𝐚𝖳𝐵′,𝟎𝑏11+𝐴′𝟎=𝟎,𝟎𝐛𝖳+𝐴′𝐵′=𝐴′𝐵′,

that is,

𝐴𝐵=(𝑎11𝑏11𝑎11𝐛𝖳+𝐚𝖳𝐵′𝟎𝐴′𝐵′).

By the induction hypothesis, 𝐴′𝐵′ is upper triangular with diagonal entries 𝑎𝑖𝑖𝑏𝑖𝑖 for 𝑖=2,…,𝑛. So every entry of 𝐴𝐵 below the diagonal is either in the zero column or below the diagonal of 𝐴′𝐵′, hence zero, and the diagonal entries of 𝐴𝐵 are 𝑎11𝑏11 and those of 𝐴′𝐵′. □

Proof (entry by entry).routine

Uses. Proposition 2.4.8 (Four views of the product)

Techniques. Compute entry by entry (Technique 2.4.15)

Hint 1. In (𝐴𝐵)𝑖𝑗=∑𝑘𝑎𝑖𝑘𝑏𝑘𝑗, when can the term 𝑎𝑖𝑘𝑏𝑘𝑗 be nonzero?
Hint 2. It needs 𝑖≤𝑘 and 𝑘≤𝑗.
Sketch. 𝑎𝑖𝑘𝑏𝑘𝑗≠0 forces 𝑖≤𝑘≤𝑗. If 𝑖>𝑗 there is no such 𝑘, and if 𝑖=𝑗 only 𝑘=𝑖 remains.
In (𝐴𝐵)𝑖𝑗=∑𝑘=1𝑛𝑎𝑖𝑘𝑏𝑘𝑗, the factor 𝑎𝑖𝑘 is zero unless 𝑖≤𝑘, and 𝑏𝑘𝑗 is zero unless 𝑘≤𝑗. So only terms with 𝑖≤𝑘≤𝑗 can be nonzero. If 𝑖>𝑗 there are none, and (𝐴𝐵)𝑖𝑗=0. If 𝑖=𝑗, the only such term is 𝑘=𝑖, so (𝐴𝐵)𝑖𝑖=𝑎𝑖𝑖𝑏𝑖𝑖. □

A third proof translates to maps: by Exercise 2.3.38, [𝑇]ℬ︀ℬ︀ is upper triangular exactly when 𝑇 maps each span(𝐯1,…,𝐯𝑘) into itself, and a composite of two maps with this property has it too. That proof is the one that generalizes to triangularization in Section 7.5.

Exercise 2.4.37.routine Let 𝑋∈𝐹𝑝×𝑞, and let 𝑀=(𝐼𝑝𝑋0𝐼𝑞). Show that 𝑀𝑘=(𝐼𝑝𝑘𝑋0𝐼𝑞) for every 𝑘≥1, where 𝑘𝑋=𝑋+⋯+𝑋 (𝑘 terms), and that (𝐼𝑝𝑋0𝐼𝑞)(𝐼𝑝−𝑋0𝐼𝑞)=𝐼𝑝+𝑞.

Solution.

Uses. Theorem 2.4.34 (Block multiplication), Proposition 2.4.14 (Algebra of matrices)

Techniques. Block decomposition (Technique 2.4.35)

Hint 1. Multiply with Theorem 2.4.34, using sizes 𝑝,𝑞 for rows and columns of both factors.
Hint 2. Induct on 𝑘: 𝑀𝑘+1=𝑀𝑘𝑀.
Sketch. (𝐼𝑌0𝐼)(𝐼𝑍0𝐼)=(𝐼𝑍+𝑌0𝐼) by block multiplication. Induction gives 𝑀𝑘=(𝐼𝑘𝑋0𝐼), and 𝑌=𝑋, 𝑍=−𝑋 gives 𝐼.

Let 𝑌,𝑍∈𝐹𝑝×𝑞, and partition both factors below with sizes 𝑝,𝑞. By Theorem 2.4.34 and Proposition 2.4.14(b), the blocks of the product are 𝐼𝑝𝐼𝑝+𝑌0=𝐼𝑝, 𝐼𝑝𝑍+𝑌𝐼𝑞=𝑍+𝑌, 0𝐼𝑝+𝐼𝑞0=0, and 0𝑍+𝐼𝑞𝐼𝑞=𝐼𝑞:

(𝐼𝑝𝑌0𝐼𝑞)(𝐼𝑝𝑍0𝐼𝑞)=(𝐼𝑝𝑍+𝑌0𝐼𝑞).

For 𝑘=1 the claim is 𝑀=𝑀. If 𝑀𝑘=(𝐼𝑝𝑘𝑋0𝐼𝑞), then by the formula 𝑀𝑘+1=𝑀𝑘𝑀=(𝐼𝑝𝑋+𝑘𝑋0𝐼𝑞)=(𝐼𝑝(𝑘+1)𝑋0𝐼𝑞). Taking 𝑌=𝑋 and 𝑍=−𝑋 gives (𝐼𝑝𝑋0𝐼𝑞)(𝐼𝑝−𝑋0𝐼𝑞)=(𝐼𝑝00𝐼𝑞)=𝐼𝑝+𝑞. In the language of maps, 𝑀 adds 𝑋 times the last 𝑞 coordinates to the first 𝑝 coordinates, and the second factor subtracts it again.

2.4.9Counting walks Beyond 21-242

Applications to graphs are not part of 21-242.

Powers of a matrix count paths. This is the simplest instance of a theme that runs through Markov chains (Section 11.1) and spectral graph theory (Section 16.5). (Another application of the matrix product, homogeneous coordinates, which turn translations of 𝐹𝑛 into matrix products, is in Section 4.7.)

Definition 2.4.38 (Adjacency matrix). A directed graph 𝐺 on the vertices 1,…,𝑛 is a set of ordered pairs (𝑖,𝑗) of vertices, called edges. A walk of length 𝑘 from 𝑖 to 𝑗 is a sequence of vertices 𝑖=𝑣0,𝑣1,…,𝑣𝑘=𝑗 such that (𝑣𝑡−1,𝑣𝑡) is an edge for each 𝑡=1,…,𝑘. The adjacency matrix of 𝐺 is the 𝑛×𝑛 matrix 𝐴 over ℚ with 𝑎𝑖𝑗=1 if (𝑖,𝑗) is an edge and 𝑎𝑖𝑗=0 otherwise. An undirected graph is a directed graph in which (𝑗,𝑖) is an edge whenever (𝑖,𝑗) is; its adjacency matrix is symmetric.
Proposition 2.4.39 (Powers count walks). Let 𝐴 be the adjacency matrix of a directed graph 𝐺 on 1,…,𝑛. For every 𝑘≥0, (𝐴𝑘)𝑖𝑗 is the number of walks of length 𝑘 from 𝑖 to 𝑗. In particular, tr(𝐴𝑘) is the number of closed walks of length 𝑘, counted with their starting vertex.

Proof.standard

Uses. Proposition 2.4.8 (Four views of the product), Definition 2.4.38 (Adjacency matrix), Notation 2.4.16 (Powers of a matrix)

Techniques. Compute entry by entry (Technique 2.4.15)

Hint 1. Induct on 𝑘. For 𝑘=0, 𝐴0=𝐼𝑛, and a walk of length 0 from 𝑖 to 𝑗 exists only when 𝑖=𝑗.
Hint 2. A walk of length 𝑘+1 from 𝑖 to 𝑗 is a walk of length 𝑘 from 𝑖 to some vertex 𝑙, followed by the edge (𝑙,𝑗). Sort the walks by 𝑙, and compare with (𝐴𝑘+1)𝑖𝑗=∑𝑙(𝐴𝑘)𝑖𝑙𝑎𝑙𝑗.
Sketch. Induct on 𝑘. Grouping the walks of length 𝑘+1 from 𝑖 to 𝑗 by their next-to-last vertex 𝑙, there are (walks of length 𝑘 from 𝑖 to 𝑙) ×𝑎𝑙𝑗 of them for each 𝑙, and the sum over 𝑙 is ∑𝑙(𝐴𝑘)𝑖𝑙𝑎𝑙𝑗=(𝐴𝑘+1)𝑖𝑗.

We induct on 𝑘. For 𝑘=0, (𝐴0)𝑖𝑗=𝛿𝑖𝑗, and there is exactly one walk of length 0 from 𝑖 to 𝑖 (the sequence 𝑣0=𝑖) and none from 𝑖 to 𝑗≠𝑖.

Suppose the claim holds for 𝑘. A walk 𝑣0,…,𝑣𝑘+1 of length 𝑘+1 from 𝑖 to 𝑗 consists of the walk 𝑣0,…,𝑣𝑘 of length 𝑘 from 𝑖 to 𝑙=𝑣𝑘, followed by the edge (𝑙,𝑗); conversely, any walk of length 𝑘 from 𝑖 to 𝑙 can be extended in this way exactly when (𝑙,𝑗) is an edge. So the number of walks of length 𝑘+1 from 𝑖 to 𝑗 whose next-to-last vertex is 𝑙 equals the number of walks of length 𝑘 from 𝑖 to 𝑙 times 𝑎𝑙𝑗, which is (𝐴𝑘)𝑖𝑙𝑎𝑙𝑗 by the induction hypothesis. Summing over 𝑙, the number of walks of length 𝑘+1 from 𝑖 to 𝑗 is

∑𝑙=1𝑛(𝐴𝑘)𝑖𝑙𝑎𝑙𝑗=(𝐴𝑘+1)𝑖𝑗.

The last claim follows by adding the diagonal entries. □

Example 2.4.40 (Walks in a small graph).

Figure 2.4.2. The undirected graph with edges {1,2}, {2,3}, {3,4}, {4,1}, and {1,3}.

The graph of Figure 2.4.2 has

𝐴=(0111101011011010),𝐴2=(3121121221311212).

For instance (𝐴2)13=2 counts the walks 1,2,3 and 1,4,3. In an undirected graph, (𝐴2)𝑖𝑖 is the number of neighbours of 𝑖, and (𝐴2)𝑖𝑗 is the number of common neighbours of 𝑖 and 𝑗. The diagonal entries of 𝐴3 are 4,2,4,2, so tr(𝐴3)=12. A closed walk of length 3 in a graph without loops goes around a triangle, and each triangle gives 6 closed walks (3 starting vertices, 2 directions). So the graph has 12/6=2 triangles, namely {1,2,3} and {1,3,4}.

Exercises

Exercise 2.4.41.routine Let 𝐷:𝐹[𝑥]≤3→𝐹[𝑥]≤2 be differentiation and 𝑀:𝐹[𝑥]≤2→𝐹[𝑥]≤3 multiplication by 𝑥, with the bases ℬ︀2=1,𝑥,𝑥2 and ℬ︀3=1,𝑥,𝑥2,𝑥3.

  1. (a)Find [𝐷]ℬ︀2ℬ︀3 and [𝑀]ℬ︀3ℬ︀2.
  2. (b)Compute [𝐷𝑀]ℬ︀2ℬ︀2 and [𝑀𝐷]ℬ︀3ℬ︀3 as products of matrices, and check the answers against the formulas 𝐷𝑀(𝑝)=(𝑥𝑝)′ and 𝑀𝐷(𝑝)=𝑥𝑝′.
  3. (c)Compare tr(𝐷𝑀) and tr(𝑀𝐷), meaning the traces of these two matrices.

Solution.

Uses. Definition 2.3.1 (Matrix of a linear map), Theorem 2.4.2 (The matrix of a composite), Proposition 2.4.28 (Cyclicity of the trace), Example 2.1.9 (Maps of polynomials)

Hint 1. The columns of [𝐷]ℬ︀2ℬ︀3 are the coordinates of 𝐷(1),𝐷(𝑥),𝐷(𝑥2),𝐷(𝑥3) in ℬ︀2; the columns of [𝑀]ℬ︀3ℬ︀2 are those of 𝑥,𝑥2,𝑥3 in ℬ︀3.
Hint 2. By Theorem 2.4.2, [𝐷𝑀]=[𝐷][𝑀] and [𝑀𝐷]=[𝑀][𝐷]. Compute column by column. Then compute (𝑥⋅𝑥𝑘)′ and 𝑥(𝑥𝑘)′ directly.
Sketch. [𝐷]=(010000200003) and [𝑀] has columns 𝐞2,𝐞3,𝐞4. Then [𝐷𝑀]=diag(1,2,3) and [𝑀𝐷]=diag(0,1,2,3), matching (𝑥𝑘+1)′=(𝑘+1)𝑥𝑘 and 𝑥(𝑥𝑘)′=𝑘𝑥𝑘. Both traces are 6, as Proposition 2.4.28 predicts for a 3×4 and a 4×3 matrix.

(a) 𝐷(1)=𝟎, 𝐷(𝑥)=1, 𝐷(𝑥2)=2𝑥, and 𝐷(𝑥3)=3𝑥2, and 𝑀(1)=𝑥, 𝑀(𝑥)=𝑥2, 𝑀(𝑥2)=𝑥3, so

[𝐷]ℬ︀2ℬ︀3=(010000200003),[𝑀]ℬ︀3ℬ︀2=(000100010001).

(b) By Theorem 2.4.2, [𝐷𝑀]ℬ︀2ℬ︀2=[𝐷]ℬ︀2ℬ︀3[𝑀]ℬ︀3ℬ︀2. Its columns are [𝐷] times the columns 𝐞2,𝐞3,𝐞4 of [𝑀], which are columns 2,3,4 of [𝐷]:

[𝐷𝑀]ℬ︀2ℬ︀2=(100020003).

Similarly [𝑀𝐷]ℬ︀3ℬ︀3=[𝑀]ℬ︀3ℬ︀2[𝐷]ℬ︀2ℬ︀3 has columns [𝑀]𝟎=𝟎, [𝑀](1,0,0)=𝐞2, [𝑀](0,2,0)=2𝐞3, and [𝑀](0,0,3)=3𝐞4:

[𝑀𝐷]ℬ︀3ℬ︀3=(0000010000200003).

Directly, 𝐷𝑀(𝑥𝑘)=(𝑥𝑘+1)′=(𝑘+1)𝑥𝑘 for 𝑘=0,1,2, and 𝑀𝐷(𝑥𝑘)=𝑥⋅𝑘𝑥𝑘−1=𝑘𝑥𝑘 for 𝑘=0,1,2,3, which are the diagonal entries found above.

(c) Both traces are 1+2+3=6=0+1+2+3, although the matrices have different sizes. This is Proposition 2.4.28 for the 3×4 matrix [𝐷] and the 4×3 matrix [𝑀]. Note also that [𝐷𝑀]−[𝑀𝐷] is not defined, since the sizes differ; on all of 𝐹[𝑥], 𝐷𝑀−𝑀𝐷=id (Exercise 2.4.51).

Exercise 2.4.42.standard Let 𝐷=diag(𝑑1,…,𝑑𝑛)∈𝐹𝑛×𝑛.

  1. (a)Show that (𝐷𝑋)𝑖𝑗=𝑑𝑖𝑥𝑖𝑗 and (𝑋𝐷)𝑖𝑗=𝑥𝑖𝑗𝑑𝑗 for 𝑋∈𝐹𝑛×𝑛.
  2. (b)Suppose 𝑑1,…,𝑑𝑛 are distinct. Show that 𝑋 commutes with 𝐷 if and only if 𝑋 is diagonal.
  3. (c)Find all 𝑋∈𝐹3×3 that commute with diag(1,1,0).

Solution.

Uses. Example 2.4.10 (Diagonal matrices), Proposition 2.4.8 (Four views of the product), Proposition 1.1.17 (No zero divisors)

Hint 1. (a) is the row view and the column view of Example 2.4.10, read entry by entry.
Hint 2. 𝐷𝑋=𝑋𝐷 means (𝑑𝑖−𝑑𝑗)𝑥𝑖𝑗=0 for all 𝑖,𝑗. When does this force 𝑥𝑖𝑗=0?
Sketch. (a) 𝐷𝑋 scales row 𝑖 by 𝑑𝑖; 𝑋𝐷 scales column 𝑗 by 𝑑𝑗. (b) 𝑋𝐷=𝐷𝑋 iff (𝑑𝑖−𝑑𝑗)𝑥𝑖𝑗=0 for all 𝑖,𝑗; with distinct 𝑑’s this forces 𝑥𝑖𝑗=0 for 𝑖≠𝑗. (c) The condition kills exactly the entries 𝑥𝑖𝑗 with 𝑑𝑖≠𝑑𝑗, so 𝑋 is block diagonal with blocks of sizes 2,1.

(a) By Example 2.4.10, row 𝑖 of 𝐷𝑋 is 𝑑𝑖𝑋𝑖,⋅ and column 𝑗 of 𝑋𝐷 is 𝑑𝑗𝑋⋅,𝑗. Reading off the (𝑖,𝑗) entries gives (𝐷𝑋)𝑖𝑗=𝑑𝑖𝑥𝑖𝑗 and (𝑋𝐷)𝑖𝑗=𝑥𝑖𝑗𝑑𝑗.

(b) By (a), 𝐷𝑋=𝑋𝐷 if and only if 𝑑𝑖𝑥𝑖𝑗=𝑥𝑖𝑗𝑑𝑗, that is, (𝑑𝑖−𝑑𝑗)𝑥𝑖𝑗=0, for all 𝑖,𝑗. For 𝑖=𝑗 this always holds. For 𝑖≠𝑗, 𝑑𝑖−𝑑𝑗≠0, so it holds if and only if 𝑥𝑖𝑗=0 (Proposition 1.1.17). So 𝑋 commutes with 𝐷 exactly when all its off-diagonal entries vanish.

(c) Here 𝑑1=𝑑2=1 and 𝑑3=0. The condition (𝑑𝑖−𝑑𝑗)𝑥𝑖𝑗=0 is automatic when 𝑑𝑖=𝑑𝑗, that is, for 𝑖,𝑗∈{1,2} and for 𝑖=𝑗=3, and it forces 𝑥𝑖𝑗=0 when exactly one of 𝑖,𝑗 equals 3, since then 𝑑𝑖−𝑑𝑗=±1≠0. So the matrices commuting with diag(1,1,0) are

𝑋=(𝑥11𝑥120𝑥21𝑥22000𝑥33),

with the five remaining entries arbitrary. These are the block diagonal matrices with blocks of sizes 2 and 1, matching the blocks on which diag(1,1,0) is a scalar matrix.

Exercise 2.4.43.standard Let 𝑛≥2. Show that 𝐴∈𝐹𝑛×𝑛 commutes with every upper triangular matrix in 𝐹𝑛×𝑛 if and only if 𝐴=𝑐𝐼𝑛 for some 𝑐∈𝐹.

Solution.

Uses. Lemma 2.4.24 (Matrix units), Proposition 2.4.14 (Algebra of matrices)

Hint 1. Use only a few upper triangular matrices: the matrix units 𝐞𝑖𝐞𝑗𝖳 with 𝑖≤𝑗.
Hint 2. Commuting with 𝐞𝑖𝐞𝑖𝖳 says 𝐴⋅,𝑖𝐞𝑖𝖳=𝐞𝑖𝐴𝑖,⋅. The left side is zero outside column 𝑖, the right side zero outside row 𝑖. What does that force?
Hint 3. Once 𝐴 is diagonal, compare 𝐴(𝐞1𝐞𝑗𝖳) with (𝐞1𝐞𝑗𝖳)𝐴.
Sketch. Commuting with 𝐞𝑖𝐞𝑖𝖳 gives 𝐴⋅,𝑖𝐞𝑖𝖳=𝐞𝑖𝐴𝑖,⋅; comparing entries outside position (𝑖,𝑖), column 𝑖 and row 𝑖 of 𝐴 vanish off the diagonal, so 𝐴 is diagonal. Then 𝐴𝐞1𝐞𝑗𝖳=𝑎11𝐞1𝐞𝑗𝖳 and 𝐞1𝐞𝑗𝖳𝐴=𝑎𝑗𝑗𝐞1𝐞𝑗𝖳 give 𝑎𝑗𝑗=𝑎11.

If. 𝑐𝐼𝑛 commutes with every matrix, since (𝑐𝐼𝑛)𝑋=𝑐𝑋=𝑋(𝑐𝐼𝑛) by Proposition 2.4.14.

Only if. Suppose 𝐴 commutes with every upper triangular matrix. Fix 𝑖. The matrix unit 𝐞𝑖𝐞𝑖𝖳 is upper triangular, and by associativity and Lemma 2.4.24(b),

𝐴(𝐞𝑖𝐞𝑖𝖳)=𝐴⋅,𝑖𝐞𝑖𝖳,(𝐞𝑖𝐞𝑖𝖳)𝐴=𝐞𝑖𝐴𝑖,⋅.

The first matrix has (𝑘,𝑙) entry 𝑎𝑘𝑖𝛿𝑙𝑖: it is zero outside column 𝑖, where it equals column 𝑖 of 𝐴. The second has (𝑘,𝑙) entry 𝛿𝑘𝑖𝑎𝑖𝑙: it is zero outside row 𝑖, where it equals row 𝑖 of 𝐴. Comparing the entries in positions (𝑘,𝑖) with 𝑘≠𝑖 gives 𝑎𝑘𝑖=0, and comparing those in positions (𝑖,𝑙) with 𝑙≠𝑖 gives 𝑎𝑖𝑙=0. As 𝑖 was arbitrary, 𝐴 is diagonal, so 𝐴𝐞𝑗=𝑎𝑗𝑗𝐞𝑗 and 𝐞𝑗𝖳𝐴=𝑎𝑗𝑗𝐞𝑗𝖳 for every 𝑗.

Now let 2≤𝑗≤𝑛. The matrix unit 𝐞1𝐞𝑗𝖳 is upper triangular, and

𝐴(𝐞1𝐞𝑗𝖳)=(𝐴𝐞1)𝐞𝑗𝖳=𝑎11𝐞1𝐞𝑗𝖳,(𝐞1𝐞𝑗𝖳)𝐴=𝐞1(𝐞𝑗𝖳𝐴)=𝑎𝑗𝑗𝐞1𝐞𝑗𝖳.

These are equal, and 𝐞1𝐞𝑗𝖳≠0, so 𝑎𝑗𝑗=𝑎11. Hence 𝐴=𝑎11𝐼𝑛.

Exercise 2.4.44.standard Prove or disprove each statement about matrices in 𝐹𝑛×𝑛, 𝑛≥2.

  1. (a)If 𝐴2=𝐼𝑛, then 𝐴=𝐼𝑛 or 𝐴=−𝐼𝑛.
  2. (b)If 𝐴 and 𝐵 are symmetric, then 𝐴𝐵 is symmetric.
  3. (c)(𝐴𝐵)2=𝐴2𝐵2.
  4. (d)If 𝐹=ℝ and 𝐴𝖳𝐴=0, then 𝐴=0. What if 𝐹=ℂ or 𝐹=𝔽2?
  5. (e)If 𝐴 is upper triangular and 𝐴2=0, then every diagonal entry of 𝐴 is 0.

Solution.

Uses. Proposition 2.4.8 (Four views of the product), Definition 2.4.21 (Transpose), Exercise 2.4.25, Proposition 2.4.36 (Products of upper triangular matrices), Example 2.4.18 (𝐴𝐵≠𝐵𝐴), Proposition 1.1.17 (No zero divisors)

Techniques. Finding counterexamples and minimal examples (Technique 1.4.18)

Hint 1. (a), (b), and (c) are false; look among 2×2 matrices with entries 0 and 1. For (a), think of a reflection.
Hint 2. (d) Compute the diagonal entries of 𝐴𝖳𝐴. (e) Use Proposition 2.4.36.
Sketch. (a) False: (0110)2=𝐼2. (b) False: (1000)(0110)=(0100). (c) False: with 𝐴=𝐞1𝐞2𝖳, 𝐵=𝐞2𝐞1𝖳, (𝐴𝐵)2=𝐞1𝐞1𝖳 but 𝐴2=0. (d) True over ℝ: (𝐴𝖳𝐴)𝑗𝑗=∑𝑖𝑎𝑖𝑗2. False over ℂ and 𝔽2: 𝐴=(10𝑖0), resp. (1010). (e) True: (𝐴2)𝑖𝑖=𝑎𝑖𝑖2.

We give the counterexamples for 𝑛=2. For 𝑛>2, those in (b), (c), and (d) can be placed in the top left corner of an 𝑛×𝑛 zero matrix (Theorem 2.4.34), and the one in (a) in the top left corner of 𝐼𝑛.

(a) False. 𝐴=(0110) swaps 𝐞1 and 𝐞2, so 𝐴2=𝐼2, but 𝐴≠±𝐼2 (in 𝔽2, where −𝐼2=𝐼2, still 𝐴≠𝐼2). Geometrically, 𝐴 is the reflection across the line 𝑦=𝑥. For 𝑛>2, the matrix that swaps 𝐞1 and 𝐞2 and fixes the other 𝐞𝑗 works.

(b) False. 𝐴=(1000) and 𝐵=(0110) are symmetric, but 𝐴𝐵=(0100) is not. By Exercise 2.4.25, 𝐴𝐵 is symmetric exactly when 𝐴𝐵=𝐵𝐴.

(c) False. With 𝐴=(0100) and 𝐵=(0010) (Example 2.4.18), 𝐴𝐵=(1000), so (𝐴𝐵)2=𝐴𝐵≠0, while 𝐴2=0 gives 𝐴2𝐵2=0. In general (𝐴𝐵)2=𝐴𝐵𝐴𝐵, and this equals 𝐴𝐴𝐵𝐵 when 𝐴𝐵=𝐵𝐴.

(d) True over ℝ. By Proposition 2.4.8(a) and Definition 2.4.21, the (𝑗,𝑗) entry of 𝐴𝖳𝐴 is ∑𝑖(𝐴𝖳)𝑗𝑖𝑎𝑖𝑗=∑𝑖𝑎𝑖𝑗2. If 𝐴𝖳𝐴=0, then for each 𝑗 this sum of squares of real numbers is 0, so every 𝑎𝑖𝑗=0.

Over ℂ it is false: for 𝐴=(10𝑖0), 𝐴𝖳𝐴=(1𝑖00)(10𝑖0)=(1+𝑖2000)=0. Over 𝔽2, 𝐴=(1010) gives 𝐴𝖳𝐴=(1+1000)=0. The real proof used that a sum of squares vanishes only if each term does, which fails in both fields. Over ℂ the cure is to conjugate, using 𝐴∗𝐴 (Section 6.1).

(e) True. By Proposition 2.4.36, 𝐴2 is upper triangular with diagonal entries 𝑎𝑖𝑖2. If 𝐴2=0, then 𝑎𝑖𝑖2=0, so 𝑎𝑖𝑖=0 by Proposition 1.1.17.

Exercise 2.4.45.standard
  1. (a)Show that 𝐴=(𝑎𝑏𝑐𝑑)∈𝐹2×2 satisfies 𝐴2=0 if and only if 𝑎+𝑑=0 and 𝑎2+𝑏𝑐=0.
  2. (b)Let 𝑝 be prime. How many 𝐴∈𝔽𝑝2×2 satisfy 𝐴2=0?

Solution.

Uses. Proposition 2.4.8 (Four views of the product), Proposition 1.1.17 (No zero divisors)

Hint 1. Compute 𝐴2. Its off-diagonal entries are 𝑏(𝑎+𝑑) and 𝑐(𝑎+𝑑).
Hint 2. If 𝑎+𝑑≠0, then 𝑏=𝑐=0; what do the diagonal entries then force? For (b), count the pairs (𝑏,𝑐) with 𝑏𝑐=−𝑎2, separately for 𝑎=0 and 𝑎≠0.
Sketch. 𝐴2=(𝑎2+𝑏𝑐𝑏(𝑎+𝑑)𝑐(𝑎+𝑑)𝑑2+𝑏𝑐). If 𝑎+𝑑≠0 then 𝑏=𝑐=0 and 𝑎2=𝑑2=0, so 𝑎=𝑑=0, a contradiction; so 𝑑=−𝑎, and then all four conditions reduce to 𝑎2+𝑏𝑐=0. (b) For 𝑎=0: 𝑏𝑐=0 has 2𝑝−1 solutions. For each of the 𝑝−1 nonzero 𝑎: 𝑏𝑐=−𝑎2≠0 has 𝑝−1 solutions. Total 2𝑝−1+(𝑝−1)2=𝑝2.

(a) By the entry formula,

𝐴2=(𝑎2+𝑏𝑐𝑏(𝑎+𝑑)𝑐(𝑎+𝑑)𝑑2+𝑏𝑐).

Suppose 𝐴2=0. If 𝑎+𝑑≠0, the off-diagonal entries give 𝑏=𝑐=0 (Proposition 1.1.17), and then the diagonal entries give 𝑎2=𝑑2=0, so 𝑎=𝑑=0, contradicting 𝑎+𝑑≠0. Hence 𝑎+𝑑=0, and then 𝑎2+𝑏𝑐=0 is the (1,1) entry. Conversely, if 𝑑=−𝑎 and 𝑎2+𝑏𝑐=0, then the off-diagonal entries are 0, the (1,1) entry is 0, and the (2,2) entry is 𝑑2+𝑏𝑐=𝑎2+𝑏𝑐=0.

(b) By (a), such 𝐴 correspond to triples (𝑎,𝑏,𝑐)∈𝔽𝑝3 with 𝑏𝑐=−𝑎2, with 𝑑=−𝑎. If 𝑎=0, we need 𝑏𝑐=0, that is, 𝑏=0 or 𝑐=0: there are 𝑝+𝑝−1=2𝑝−1 such pairs. If 𝑎≠0, then −𝑎2≠0, so 𝑏≠0 and 𝑐=−𝑎2𝑏−1 is determined by 𝑏: there are 𝑝−1 pairs. With 𝑝−1 nonzero values of 𝑎, the total is

(2𝑝−1)+(𝑝−1)2=𝑝2.

For 𝑝=2 the four matrices are 0, (0100), (0010), and (1111).

Exercise 2.4.46.standard
  1. (a)For 𝜆∈𝐹, let 𝐽=(𝜆10𝜆). Show that 𝐽𝑘=(𝜆𝑘𝑘𝜆𝑘−10𝜆𝑘) for every 𝑘≥1, where 𝑘𝜆𝑘−1 means (𝑘∗1)𝜆𝑘−1.
  2. (b)Deduce that (1101)𝑝=𝐼2 over 𝔽𝑝.
  3. (c)Find 𝐴∈𝔽22×2 and 𝐴′∈ℝ2×2 with 𝐴3=𝐼2 and 𝐴′3=𝐼2, neither equal to 𝐼2.

Solution.

Uses. Notation 2.4.16 (Powers of a matrix), Proposition 2.4.8 (Four views of the product), Theorem 2.4.2 (The matrix of a composite), Example 2.4.5 (Composites through their matrices)

Hint 1. (a) Induct on 𝑘, computing 𝐽𝑘+1=𝐽𝑘𝐽 with the entry formula.
Hint 2. (b) Take 𝜆=1 and 𝑘=𝑝. (c) Over ℝ, think of a rotation. Over 𝔽2, try 𝐴=(0111).
Sketch. (a) 𝐽𝑘𝐽=(𝜆𝑘+1𝜆𝑘+𝑘𝜆𝑘0𝜆𝑘+1). (b) 𝑝∗1=0 in 𝔽𝑝. (c) Over 𝔽2, (0111)2=(1110) and (0111)3=𝐼2. Over ℝ, the rotation by 2𝜋/3, [𝑅2𝜋/3]=12(−1−33−1).

(a) For 𝑘=1 the formula reads 𝐽=𝐽, since 1∗1=1 and 𝜆0=1. If it holds for 𝑘, then

𝐽𝑘+1=𝐽𝑘𝐽=(𝜆𝑘𝑘𝜆𝑘−10𝜆𝑘)(𝜆10𝜆).

By the entry formula, this product has diagonal entries 𝜆𝑘+1, lower left entry 0, and upper right entry 𝜆𝑘⋅1+𝑘𝜆𝑘−1⋅𝜆=(𝑘+1)𝜆𝑘, which is the formula for 𝑘+1.

(b) With 𝜆=1 and 𝑘=𝑝, (a) gives (1101)𝑝=(1𝑝∗101)=𝐼2, since 𝑝∗1=0 in 𝔽𝑝. The map (𝑥,𝑦)↦(𝑥+𝑦,𝑦) of 𝔽𝑝2 adds 𝑦 to the first coordinate, and doing so 𝑝 times adds 𝑝∗𝑦=0.

(c) Over 𝔽2, let 𝐴=(0111). Then, using 1+1=0,

𝐴2=(0111)(0111)=(1110),𝐴3=(1110)(0111)=(1001).

Over ℝ, let 𝐴′=[𝑅2𝜋/3]ℰ︀ℰ︀=12(−1−33−1). By Theorem 2.4.2 and Example 2.4.5(b), 𝐴′3=[𝑅2𝜋/33]=[𝑅2𝜋]=𝐼2, and 𝐴′≠𝐼2.

Exercise 2.4.47.standard Let 𝑓0=0, 𝑓1=1, and 𝑓𝑘+1=𝑓𝑘+𝑓𝑘−1 for 𝑘≥1 (the Fibonacci numbers), and let 𝑄=(1110)∈ℚ2×2.

  1. (a)Show that 𝑄𝑘=(𝑓𝑘+1𝑓𝑘𝑓𝑘𝑓𝑘−1) for every 𝑘≥1.
  2. (b)Deduce that 𝑓𝑚+𝑛=𝑓𝑚+1𝑓𝑛+𝑓𝑚𝑓𝑛−1 for all 𝑚,𝑛≥1, and in particular 𝑓2𝑛=𝑓𝑛(𝑓𝑛+1+𝑓𝑛−1).

Solution.

Uses. Notation 2.4.16 (Powers of a matrix), Proposition 2.4.8 (Four views of the product), Proposition 2.4.14 (Algebra of matrices)

Hint 1. (a) Induct on 𝑘, with 𝑄𝑘+1=𝑄𝑘𝑄.
Hint 2. (b) Compare the (1,2) entries of 𝑄𝑚+𝑛 and 𝑄𝑚𝑄𝑛.
Sketch. (a) 𝑄𝑘𝑄=(𝑓𝑘+1+𝑓𝑘𝑓𝑘+1𝑓𝑘+𝑓𝑘−1𝑓𝑘). (b) (𝑄𝑚+𝑛)12=𝑓𝑚+𝑛 and (𝑄𝑚𝑄𝑛)12=𝑓𝑚+1𝑓𝑛+𝑓𝑚𝑓𝑛−1. Put 𝑚=𝑛.

(a) For 𝑘=1, (𝑓2𝑓1𝑓1𝑓0)=(1110)=𝑄. If the formula holds for 𝑘, then

𝑄𝑘+1=𝑄𝑘𝑄=(𝑓𝑘+1𝑓𝑘𝑓𝑘𝑓𝑘−1)(1110)=(𝑓𝑘+1+𝑓𝑘𝑓𝑘+1𝑓𝑘+𝑓𝑘−1𝑓𝑘)=(𝑓𝑘+2𝑓𝑘+1𝑓𝑘+1𝑓𝑘).

(b) By Notation 2.4.16, 𝑄𝑚+𝑛=𝑄𝑚𝑄𝑛. The (1,2) entry of the left side is 𝑓𝑚+𝑛 by (a), and by the entry formula the (1,2) entry of the right side is

(𝑄𝑚)11(𝑄𝑛)12+(𝑄𝑚)12(𝑄𝑛)22=𝑓𝑚+1𝑓𝑛+𝑓𝑚𝑓𝑛−1.

With 𝑚=𝑛 this is 𝑓2𝑛=𝑓𝑛+1𝑓𝑛+𝑓𝑛𝑓𝑛−1=𝑓𝑛(𝑓𝑛+1+𝑓𝑛−1). For example, 𝑓10=𝑓5(𝑓6+𝑓4)=5(8+3)=55. Linear recurrences in general are treated with matrix powers in Section 15.2.

Exercise 2.4.48.routine Find the error in the following computation, which claims that (𝐴𝐵)𝖳=𝐴𝖳𝐵𝖳 for 𝐴,𝐵∈𝐹𝑛×𝑛:

((𝐴𝐵)𝖳)𝑖𝑗=(𝐴𝐵)𝑗𝑖=∑𝑘𝑎𝑗𝑘𝑏𝑘𝑖=∑𝑘(𝐴𝖳)𝑘𝑗(𝐵𝖳)𝑖𝑘=(𝐴𝖳𝐵𝖳)𝑖𝑗.

Solution.

Uses. Proposition 2.4.8 (Four views of the product), Proposition 2.4.23 (Transpose of a product)

Hint 1. The first three equalities are correct. In the entry formula (𝑋𝑌)𝑖𝑗=∑𝑘𝑥𝑖𝑘𝑦𝑘𝑗, which index of each factor is the summation index?
Hint 2. In (𝐴𝖳)𝑘𝑗(𝐵𝖳)𝑖𝑘, the summation index 𝑘 is the first index of the 𝐴𝖳 factor. Reorder the two factors.
Sketch. The last step misreads the index pattern. After reordering the factors, the sum is ∑𝑘(𝐵𝖳)𝑖𝑘(𝐴𝖳)𝑘𝑗, which is the (𝑖,𝑗) entry of 𝐵𝖳𝐴𝖳, not of 𝐴𝖳𝐵𝖳. The correct conclusion is (𝐴𝐵)𝖳=𝐵𝖳𝐴𝖳.

Everything up to the last equality is correct. In a product (𝑋𝑌)𝑖𝑗=∑𝑘𝑥𝑖𝑘𝑦𝑘𝑗, the row index 𝑖 belongs to the left factor, the column index 𝑗 to the right factor, and the summation index is the column index of the left factor and the row index of the right one. In ∑𝑘(𝐴𝖳)𝑘𝑗(𝐵𝖳)𝑖𝑘, the factor carrying 𝑖 is 𝐵𝖳 and the factor carrying 𝑗 is 𝐴𝖳. Since scalars commute,

∑𝑘(𝐴𝖳)𝑘𝑗(𝐵𝖳)𝑖𝑘=∑𝑘(𝐵𝖳)𝑖𝑘(𝐴𝖳)𝑘𝑗=(𝐵𝖳𝐴𝖳)𝑖𝑗.

So the computation actually proves Proposition 2.4.23. The claimed identity is false: with 𝐴=(0100) and 𝐵=(1000) as in Example 2.4.19, we have (𝐴𝐵)𝖳=0𝖳=0, while 𝐴𝖳𝐵𝖳=(0010)(1000)=(0010).

Exercise 2.4.49.standard Let 𝐴∈𝐹𝑚×𝑛.

  1. (a)Show that tr(𝐴𝐞𝑗𝐞𝑖𝖳)=𝑎𝑖𝑗 for 1≤𝑖≤𝑚 and 1≤𝑗≤𝑛.
  2. (b)Show that if tr(𝐴𝑋)=0 for every 𝑋∈𝐹𝑛×𝑚, then 𝐴=0.
  3. (c)Show that every linear map 𝜑:𝐹𝑛×𝑚→𝐹 has the form 𝜑(𝑋)=tr(𝐵𝑋) for exactly one 𝐵∈𝐹𝑚×𝑛.

Solution.

Uses. Lemma 2.4.24 (Matrix units), Proposition 2.4.28 (Cyclicity of the trace), Proposition 2.4.27 (The trace is linear), Corollary 2.2.6 (Agreeing on a spanning list), Proposition 2.4.14 (Algebra of matrices)

Techniques. Check it on a basis (Technique 2.2.7)

Hint 1. (a) Rotate inside the trace: tr(𝐴𝐞𝑗𝐞𝑖𝖳)=tr(𝐞𝑖𝖳𝐴𝐞𝑗), a 1×1 matrix.
Hint 2. (c) Choose 𝐵 so that tr(𝐵𝑋) and 𝜑(𝑋) agree on the matrix units 𝑋=𝐞𝑗𝐞𝑖𝖳. Uniqueness is (b) applied to a difference.
Sketch. (a) By cyclicity, tr(𝐴𝐞𝑗𝐞𝑖𝖳)=tr(𝐞𝑖𝖳𝐴𝐞𝑗)=𝑎𝑖𝑗. (b) Take 𝑋=𝐞𝑗𝐞𝑖𝖳. (c) Let 𝑏𝑖𝑗=𝜑(𝐞𝑗𝐞𝑖𝖳); then 𝑋↦tr(𝐵𝑋) is linear and agrees with 𝜑 on the matrix units, which span. If tr(𝐵𝑋)=tr(𝐵′𝑋) for all 𝑋, then tr((𝐵−𝐵′)𝑋)=0 for all 𝑋, so 𝐵=𝐵′ by (b).

(a) By Proposition 2.4.28 with the factors 𝐴𝐞𝑗∈𝐹𝑚×1 and 𝐞𝑖𝖳∈𝐹1×𝑚, and by Lemma 2.4.24(b),

tr((𝐴𝐞𝑗)𝐞𝑖𝖳)=tr(𝐞𝑖𝖳(𝐴𝐞𝑗))=𝐞𝑖𝖳𝐴𝐞𝑗=𝑎𝑖𝑗.

(b) Taking 𝑋=𝐞𝑗𝐞𝑖𝖳∈𝐹𝑛×𝑚 in the hypothesis and using (a) gives 𝑎𝑖𝑗=0 for all 𝑖,𝑗.

(c) Define 𝐵∈𝐹𝑚×𝑛 by 𝑏𝑖𝑗=𝜑(𝐞𝑗𝐞𝑖𝖳). The map 𝜓(𝑋)=tr(𝐵𝑋) is linear, by Proposition 2.4.14 and Proposition 2.4.27, and by (a) applied to 𝐵, 𝜓(𝐞𝑗𝐞𝑖𝖳)=𝑏𝑖𝑗=𝜑(𝐞𝑗𝐞𝑖𝖳). The matrix units span 𝐹𝑛×𝑚 (Lemma 2.4.24(a)), so 𝜓=𝜑 by Corollary 2.2.6. If also 𝜑(𝑋)=tr(𝐵′𝑋) for all 𝑋, then tr((𝐵−𝐵′)𝑋)=0 for all 𝑋, and 𝐵=𝐵′ by (b). So the linear maps 𝐹𝑛×𝑚→𝐹 correspond exactly to the matrices of 𝐹𝑚×𝑛; this is a first example of duality (Section 13.1).

Exercise 2.4.50.hard Let 𝜑:𝐹𝑛×𝑛→𝐹 be linear with 𝜑(𝐴𝐵)=𝜑(𝐵𝐴) for all 𝐴,𝐵∈𝐹𝑛×𝑛. Show that 𝜑=𝑐tr for some 𝑐∈𝐹. (So the trace is, up to a scalar, the only linear functional with the property of Proposition 2.4.28.)

Solution.

Uses. Lemma 2.4.24 (Matrix units), Corollary 2.2.6 (Agreeing on a spanning list), Proposition 2.4.27 (The trace is linear)

Techniques. Check it on a basis (Technique 2.2.7), Cyclicity of trace (Technique 2.4.29)

Hint 1. It is enough to compute 𝜑 on the matrix units 𝐞𝑖𝐞𝑗𝖳. Write each one as a product 𝑋𝑌 for which 𝑌𝑋 is simpler.
Hint 2. For 𝑖≠𝑗, 𝐞𝑖𝐞𝑗𝖳=(𝐞𝑖𝐞𝑖𝖳)(𝐞𝑖𝐞𝑗𝖳), and the product in the other order is 0. For the diagonal units, compare (𝐞𝑖𝐞1𝖳)(𝐞1𝐞𝑖𝖳) with the product in the other order.
Sketch. For 𝑖≠𝑗, write 𝐞𝑖𝐞𝑗𝖳=𝑋𝑌 with 𝑋=𝐞𝑖𝐞𝑖𝖳 and 𝑌=𝐞𝑖𝐞𝑗𝖳; then 𝑌𝑋=0, so 𝜑(𝐞𝑖𝐞𝑗𝖳)=𝜑(𝑌𝑋)=0. Writing 𝐞𝑖𝐞𝑖𝖳 and 𝐞1𝐞1𝖳 as the two products of 𝐞𝑖𝐞1𝖳 and 𝐞1𝐞𝑖𝖳 shows that 𝜑 takes the same value 𝑐 on all diagonal units. So 𝜑 and 𝑐tr agree on the matrix units.

We compute 𝜑 on the matrix units, using Lemma 2.4.24(c) throughout. For 𝑖≠𝑗,

𝐞𝑖𝐞𝑗𝖳=(𝐞𝑖𝐞𝑖𝖳)(𝐞𝑖𝐞𝑗𝖳),(𝐞𝑖𝐞𝑗𝖳)(𝐞𝑖𝐞𝑖𝖳)=𝛿𝑗𝑖𝐞𝑖𝐞𝑖𝖳=0,

so the hypothesis gives 𝜑(𝐞𝑖𝐞𝑗𝖳)=𝜑(0)=0. For the diagonal units,

𝐞𝑖𝐞𝑖𝖳=(𝐞𝑖𝐞1𝖳)(𝐞1𝐞𝑖𝖳),𝐞1𝐞1𝖳=(𝐞1𝐞𝑖𝖳)(𝐞𝑖𝐞1𝖳),

so 𝜑(𝐞𝑖𝐞𝑖𝖳)=𝜑(𝐞1𝐞1𝖳) for every 𝑖; call this value 𝑐. On the other hand tr(𝐞𝑖𝐞𝑗𝖳)=𝛿𝑖𝑗. So the linear maps 𝜑 and 𝑐tr (Proposition 2.4.27) agree on every matrix unit. The matrix units span 𝐹𝑛×𝑛 (Lemma 2.4.24(a)), so 𝜑=𝑐tr by Corollary 2.2.6.

Exercise 2.4.51.standard Let 𝐷,𝑀∈L(𝐹[𝑥]) be differentiation and multiplication by 𝑥 (Example 2.1.9).

  1. (a)Show that 𝐷𝑀−𝑀𝐷=id𝐹[𝑥].
  2. (b)Explain why (a) does not contradict Proposition 2.4.30, even over ℚ.
  3. (c)Show that if 𝑈 is a subspace of 𝐹[𝑥] spanned by finitely many polynomials and 𝑀(𝑈)⊆𝑈, then 𝑈={𝟎}.

Solution.

Uses. Example 2.1.9 (Maps of polynomials), Proposition 2.1.23 (L(𝑉,𝑊) is a vector space), Proposition 2.1.17 (Compositions of linear maps are linear), Corollary 2.2.6 (Agreeing on a spanning list), Proposition 2.4.30 (𝐴𝐵−𝐵𝐴≠𝐼), Definition 1.2.16 (Degree)

Hint 1. (a) Both sides are linear, so check on the monomials 𝑥𝑘, which span 𝐹[𝑥].
Hint 2. (b) Proposition 2.4.30 is about 𝑛×𝑛 matrices. (c) If 𝑈≠{𝟎}, take a nonzero 𝑝∈𝑈 of the largest degree among a finite spanning list, and apply 𝑀.
Sketch. (a) (𝐷𝑀−𝑀𝐷)(𝑥𝑘)=(𝑘+1)𝑥𝑘−𝑘𝑥𝑘=𝑥𝑘. (b) 𝐹[𝑥] has no finite basis, so 𝐷 and 𝑀 are not given by square matrices; the trace argument needs a finite size. (c) Every element of 𝑈 has degree at most the largest degree 𝑑 in a finite spanning list; if 𝑈≠{𝟎} it contains an element of degree exactly 𝑑, and 𝑀 of it has degree 𝑑+1.

(a) Both 𝐷𝑀−𝑀𝐷 and id are linear (Proposition 2.1.23, Proposition 2.1.17). For 𝑘≥0,

(𝐷𝑀−𝑀𝐷)(𝑥𝑘)=𝐷(𝑥𝑘+1)−𝑥𝐷(𝑥𝑘)=(𝑘+1)𝑥𝑘−𝑘𝑥𝑘=𝑥𝑘,

where for 𝑘=0 the second term is 𝑥𝐷(1)=𝟎. The monomials span 𝐹[𝑥], so 𝐷𝑀−𝑀𝐷=id by Corollary 2.2.6. (This is the product rule (𝑥𝑝)′=𝑝+𝑥𝑝′.)

(b) Proposition 2.4.30 is a statement about 𝑛×𝑛 matrices, that is, about operators on 𝐹𝑛, and its proof takes the trace, a finite sum of diagonal entries. The maps 𝐷 and 𝑀 act on 𝐹[𝑥], which is spanned by no finite list (every finite list of polynomials has a largest degree). So they have no 𝑛×𝑛 matrices, and there is no trace to take. Part (c) shows that we also cannot cut 𝐹[𝑥] down to a finite-dimensional piece on which 𝑀 acts.

(c) Suppose 𝑈=span(𝑝1,…,𝑝𝑟) with 𝑀(𝑈)⊆𝑈 and 𝑈≠{𝟎}. We may drop the 𝑝𝑖 that are 𝟎, so all are nonzero, and 𝑟≥1. Let 𝑑 be the largest of deg𝑝1,…,deg𝑝𝑟. Every element of 𝑈 is a combination of the 𝑝𝑖, so every nonzero element of 𝑈 has degree at most 𝑑, and 𝑝𝑖 has degree 𝑑 for some 𝑖. But 𝑀(𝑝𝑖)=𝑥𝑝𝑖∈𝑈 has degree 𝑑+1, a contradiction. So 𝑈={𝟎}. (The same argument shows that 𝐹[𝑥] itself is not spanned by finitely many polynomials.)

Exercise 2.4.52.hard Let 𝑝 be prime.

  1. (a)Let 𝐴,𝐵∈𝔽𝑝𝑝×𝑝 be the matrices with 𝐴𝐞1=𝟎, 𝐴𝐞𝑘+1=𝑘𝐞𝑘 for 1≤𝑘≤𝑝−1, and 𝐵𝐞𝑘=𝐞𝑘+1 for 𝑘≤𝑝−1, 𝐵𝐞𝑝=𝟎. Show that 𝐴𝐵−𝐵𝐴=𝐼𝑝.
  2. (b)Show that there are 𝑋,𝑌∈𝔽𝑝𝑛×𝑛 with 𝑋𝑌−𝑌𝑋=𝐼𝑛 if and only if 𝑝 divides 𝑛.

Solution.

Uses. Proposition 2.4.30 (𝐴𝐵−𝐵𝐴≠𝐼), Theorem 2.4.34 (Block multiplication), Corollary 2.2.6 (Agreeing on a spanning list), Proposition 2.3.13 (Linearity of the product)

Techniques. Block decomposition (Technique 2.4.35), Cyclicity of trace (Technique 2.4.29)

Hint 1. (a) 𝐴 and 𝐵 are the matrices of differentiation and of multiplication by 𝑥 on polynomials of degree less than 𝑝, in the basis 1,𝑥,…,𝑥𝑝−1, with 𝑥𝑝 replaced by 0. Compute (𝐴𝐵−𝐵𝐴)𝐞𝑘, treating 𝑘=𝑝 separately.
Hint 2. (b) One direction is Proposition 2.4.30: over 𝔽𝑝, 𝑛∗1=0 exactly when 𝑝∣𝑛. For the other, put 𝑛/𝑝 copies of the matrices from (a) on the diagonal of a block diagonal matrix.
Sketch. (a) For 𝑘<𝑝, 𝐴𝐵𝐞𝑘=𝐴𝐞𝑘+1=𝑘𝐞𝑘 and 𝐵𝐴𝐞𝑘=(𝑘−1)𝐞𝑘, so the difference is 𝐞𝑘. For 𝑘=𝑝, 𝐴𝐵𝐞𝑝=𝟎 and 𝐵𝐴𝐞𝑝=(𝑝−1)𝐞𝑝, so the difference is (1−𝑝)𝐞𝑝=𝐞𝑝. (b) If 𝑝∤𝑛 then 𝑛∗1≠0 in 𝔽𝑝. If 𝑛=𝑝𝑞, let 𝑋=diag(𝐴,…,𝐴) and 𝑌=diag(𝐵,…,𝐵) (𝑞 blocks); block multiplication gives 𝑋𝑌−𝑌𝑋=diag(𝐼𝑝,…,𝐼𝑝)=𝐼𝑛.

(a) We compare (𝐴𝐵−𝐵𝐴)𝐞𝑘 with 𝐞𝑘 for each 𝑘; by Proposition 2.3.13(c) these are the columns of the two matrices. Note that 𝐵𝐴𝐞𝑘=𝐵((𝑘−1)𝐞𝑘−1)=(𝑘−1)𝐞𝑘 for 2≤𝑘≤𝑝, and 𝐵𝐴𝐞1=𝐵𝟎=𝟎=(1−1)𝐞1, so 𝐵𝐴𝐞𝑘=(𝑘−1)𝐞𝑘 for all 𝑘. For 1≤𝑘≤𝑝−1, 𝐴𝐵𝐞𝑘=𝐴𝐞𝑘+1=𝑘𝐞𝑘, so

(𝐴𝐵−𝐵𝐴)𝐞𝑘=𝑘𝐞𝑘−(𝑘−1)𝐞𝑘=𝐞𝑘.

For 𝑘=𝑝, 𝐴𝐵𝐞𝑝=𝐴𝟎=𝟎, so (𝐴𝐵−𝐵𝐴)𝐞𝑝=−(𝑝−1)𝐞𝑝, which is 𝐞𝑝 because −(𝑝−1)=1−𝑝=1 in 𝔽𝑝. So 𝐴𝐵−𝐵𝐴=𝐼𝑝. For 𝑝=2 these are the matrices 𝐴=(0100) and 𝐵=(0010) of Remark 2.4.31.

(b) If 𝑝∤𝑛, then 𝑛∗1=𝑛mod𝑝≠0 in 𝔽𝑝, and Proposition 2.4.30 says that no such 𝑋,𝑌 exist. Conversely, suppose 𝑛=𝑝𝑞. Let 𝑋 and 𝑌 be the block diagonal matrices with 𝑞 diagonal blocks, all equal to 𝐴, respectively all equal to 𝐵, partitioned with sizes 𝑝,…,𝑝. By Theorem 2.4.34, 𝑋𝑌 and 𝑌𝑋 are block diagonal with diagonal blocks 𝐴𝐵, respectively 𝐵𝐴, so 𝑋𝑌−𝑌𝑋 is block diagonal with diagonal blocks 𝐴𝐵−𝐵𝐴=𝐼𝑝. That is the matrix 𝐼𝑛.

Exercise 2.4.53.hard Let 𝐴,𝐵∈𝐹𝑛×𝑛, and suppose that 𝐶=𝐴𝐵−𝐵𝐴 commutes with 𝐴. Show that tr(𝐶𝑘)=0 for every 𝑘≥1.

Solution.

Uses. Proposition 2.4.28 (Cyclicity of the trace), Proposition 2.4.27 (The trace is linear), Proposition 2.4.14 (Algebra of matrices)

Techniques. Cyclicity of trace (Technique 2.4.29)

Hint 1. It suffices to write 𝐶𝑘 as a commutator 𝐴𝑋−𝑋𝐴 for some 𝑋, since commutators have trace 0.
Hint 2. 𝐶𝑘=𝐶𝑘−1(𝐴𝐵−𝐵𝐴)=𝐶𝑘−1𝐴𝐵−𝐶𝑘−1𝐵𝐴. Move 𝐴 past 𝐶𝑘−1 in the first term.
Sketch. Since 𝐶 commutes with 𝐴, so does 𝐶𝑘−1. Expanding 𝐶𝑘=𝐶𝑘−1(𝐴𝐵−𝐵𝐴) and moving 𝐴 to the front of the first term gives 𝐶𝑘=𝐴𝑋−𝑋𝐴 with 𝑋=𝐶𝑘−1𝐵, so tr(𝐶𝑘)=0 by cyclicity.

Since 𝐴𝐶=𝐶𝐴, induction gives 𝐴𝐶𝑘−1=𝐶𝑘−1𝐴 for every 𝑘≥1 (for 𝑘=1, 𝐶0=𝐼𝑛). By distributivity and associativity (Proposition 2.4.14),

𝐶𝑘=𝐶𝑘−1(𝐴𝐵−𝐵𝐴)=(𝐶𝑘−1𝐴)𝐵−𝐶𝑘−1𝐵𝐴=𝐴(𝐶𝑘−1𝐵)−(𝐶𝑘−1𝐵)𝐴.

So with 𝑋=𝐶𝑘−1𝐵, Proposition 2.4.27 and Proposition 2.4.28 give tr(𝐶𝑘)=tr(𝐴𝑋)−tr(𝑋𝐴)=0. Over ℂ, the vanishing of every tr(𝐶𝑘) forces 𝐶 to be nilpotent, a result known as Jacobson’s lemma; that last step needs eigenvalues (Section 7.3).

Exercise 2.4.54.challenge Let 𝐴,𝐵∈ℝ𝑛×𝑛 be symmetric. Show that tr(𝐴𝐵𝐴𝐵)≤tr(𝐴2𝐵2), with equality if and only if 𝐴𝐵=𝐵𝐴.

Solution.

Uses. Proposition 2.4.28 (Cyclicity of the trace), Proposition 2.4.27 (The trace is linear), Proposition 2.4.23 (Transpose of a product), Proposition 2.4.8 (Four views of the product), Exercise 2.4.25

Techniques. Cyclicity of trace (Technique 2.4.29)

Hint 1. The equality case suggests looking at 𝐶=𝐴𝐵−𝐵𝐴. What is 𝐶𝖳?
Hint 2. Expand tr(𝐶2) and use cyclicity to bring each of the four terms to tr(𝐴𝐵𝐴𝐵) or tr(𝐴2𝐵2).
Hint 3. For a real skew-symmetric 𝐶, tr(𝐶2)=−tr(𝐶𝖳𝐶), and tr(𝐶𝖳𝐶) is a sum of squares of entries.
Sketch. 𝐶=𝐴𝐵−𝐵𝐴 is skew-symmetric. Cyclicity gives tr(𝐶2)=2tr(𝐴𝐵𝐴𝐵)−2tr(𝐴2𝐵2). Also tr(𝐶2)=−tr(𝐶𝖳𝐶)=−∑𝑖,𝑗𝑐𝑖𝑗2≤0, with equality iff 𝐶=0.

Let 𝐶=𝐴𝐵−𝐵𝐴. By Exercise 2.4.25, 𝐶 is skew-symmetric: 𝐶𝖳=−𝐶. Expanding,

𝐶2=𝐴𝐵𝐴𝐵−𝐴𝐵𝐵𝐴−𝐵𝐴𝐴𝐵+𝐵𝐴𝐵𝐴.

By Proposition 2.4.28, rotating the factors gives tr(𝐴𝐵𝐵𝐴)=tr(𝐴𝐴𝐵𝐵), tr(𝐵𝐴𝐴𝐵)=tr(𝐴𝐴𝐵𝐵), and tr(𝐵𝐴𝐵𝐴)=tr(𝐴𝐵𝐴𝐵). So by Proposition 2.4.27,

tr(𝐶2)=2tr(𝐴𝐵𝐴𝐵)−2tr(𝐴2𝐵2).

On the other hand 𝐶2=−𝐶𝖳𝐶, and by the entry formula the (𝑗,𝑗) entry of 𝐶𝖳𝐶 is ∑𝑖𝑐𝑖𝑗2. Hence

tr(𝐶2)=−tr(𝐶𝖳𝐶)=−∑𝑖,𝑗𝑐𝑖𝑗2≤0,

with equality if and only if every 𝑐𝑖𝑗=0, that is, 𝐴𝐵=𝐵𝐴. Combining the two expressions for tr(𝐶2) gives tr(𝐴𝐵𝐴𝐵)≤tr(𝐴2𝐵2), with equality exactly when 𝐴𝐵=𝐵𝐴.

Exercise 2.4.55.standard Let 𝐴∈𝐹𝑝×𝑝, 𝑋∈𝐹𝑝×𝑞, and 𝐷∈𝐹𝑞×𝑞, and let 𝑁=(𝐴𝑋0𝐷).

  1. (a)Show that 𝑁𝑘=(𝐴𝑘𝑋𝑘0𝐷𝑘) for every 𝑘≥1, where 𝑋𝑘=∑𝑖=0𝑘−1𝐴𝑖𝑋𝐷𝑘−1−𝑖.
  2. (b)Deduce that if 𝐴𝑘=0 and 𝐷𝑘=0, then 𝑁2𝑘=0.

Solution.

Uses. Theorem 2.4.34 (Block multiplication), Proposition 2.4.14 (Algebra of matrices), Notation 2.4.16 (Powers of a matrix)

Techniques. Block decomposition (Technique 2.4.35)

Hint 1. (a) Induct on 𝑘. Compute 𝑁𝑘+1=𝑁𝑘𝑁 by blocks; the top right block is 𝐴𝑘𝑋+𝑋𝑘𝐷.
Hint 2. (b) 𝑁2𝑘=𝑁𝑘𝑁𝑘, and 𝑁𝑘 has zero diagonal blocks.
Sketch. (a) By blocks, 𝑁𝑘𝑁 has diagonal blocks 𝐴𝑘+1, 𝐷𝑘+1 and top right block 𝐴𝑘𝑋+𝑋𝑘𝐷, and 𝑋𝑘𝐷=∑𝑖=0𝑘−1𝐴𝑖𝑋𝐷𝑘−𝑖, so the top right block is 𝑋𝑘+1. (b) 𝑁𝑘=(0𝑋𝑘00), and (0𝑌00)2=0.

(a) For 𝑘=1, 𝑋1=𝐴0𝑋𝐷0=𝑋. Suppose the formula holds for 𝑘. By Theorem 2.4.34,

𝑁𝑘+1=𝑁𝑘𝑁=(𝐴𝑘𝑋𝑘0𝐷𝑘)(𝐴𝑋0𝐷)=(𝐴𝑘+1𝐴𝑘𝑋+𝑋𝑘𝐷0𝐷𝑘+1),

and by distributivity

𝐴𝑘𝑋+𝑋𝑘𝐷=𝐴𝑘𝑋𝐷0+∑𝑖=0𝑘−1𝐴𝑖𝑋𝐷𝑘−𝑖=∑𝑖=0𝑘𝐴𝑖𝑋𝐷𝑘−𝑖=𝑋𝑘+1.

(b) If 𝐴𝑘=0 and 𝐷𝑘=0, then 𝑁𝑘=(0𝑋𝑘00), and by block multiplication

𝑁2𝑘=𝑁𝑘𝑁𝑘=(0𝑋𝑘00)(0𝑋𝑘00)=0,

since each block of the product is a sum of terms with a zero factor. So a block upper triangular matrix whose diagonal blocks are nilpotent is nilpotent. The bound 2𝑘 cannot be improved to 𝑘 in general: for 𝑝=𝑞=1, 𝐴=𝐷=0, and 𝑋=1, 𝑁=(0100) has 𝐴1=𝐷1=0 but 𝑁1≠0.

Exercise 2.4.56.routineBeyond 21-242 Let 𝐺 be the directed graph on 1,2,3 with edges (1,2), (2,3), (3,1), and (1,1).

  1. (a)Write down its adjacency matrix 𝐴 and compute 𝐴2 and 𝐴3.
  2. (b)How many walks of length 3 go from 1 to 1? List them. How many closed walks of length 3 are there in all?

Solution.

Uses. Definition 2.4.38 (Adjacency matrix), Proposition 2.4.39 (Powers count walks)

Hint 1. 𝐴 has a 1 in positions (1,2), (2,3), (3,1), and (1,1).
Hint 2. By Proposition 2.4.39, the answers are (𝐴3)11 and tr(𝐴3). Check them by listing walks.
Sketch. 𝐴=(110001100) and 𝐴3=(211110111). The two walks of length 3 from 1 to 1 are 1,1,1,1 and 1,2,3,1, and tr(𝐴3)=4.

(a)

𝐴=(110001100),𝐴2=(111100110),𝐴3=𝐴2𝐴=(211110111).

(b) By Proposition 2.4.39 there are (𝐴3)11=2 walks of length 3 from 1 to 1: they are 1,1,1,1 (the loop three times) and 1,2,3,1 (around the triangle). In all there are tr(𝐴3)=2+1+1=4 closed walks of length 3: the two above, and 2,3,1,2 and 3,1,2,3.

Exercise 2.4.57.hardBeyond 21-242 Let 𝑛≥2, let 𝐽∈ℚ𝑛×𝑛 be the matrix all of whose entries are 1, and let 𝐴=𝐽−𝐼𝑛, the adjacency matrix of the complete graph on 𝑛 vertices (every two distinct vertices are joined).

  1. (a)Show that 𝐽2=𝑛𝐽.
  2. (b)Show that 𝐴𝑘=𝑎𝑘𝐽+(−1)𝑘𝐼𝑛 for 𝑘≥1, where 𝑎𝑘=((𝑛−1)𝑘−(−1)𝑘)/𝑛.
  3. (c)How many walks of length 𝑘 are there between two distinct vertices, and how many closed walks of length 𝑘 are there in all?

Solution.

Uses. Proposition 2.4.39 (Powers count walks), Proposition 2.4.8 (Four views of the product), Proposition 2.4.14 (Algebra of matrices), Definition 2.4.26 (Trace)

Hint 1. (a) Every entry of 𝐽2 is a sum of 𝑛 products 1⋅1.
Hint 2. (b) Induct on 𝑘. Expand (𝑎𝑘𝐽+(−1)𝑘𝐼)(𝐽−𝐼) with (a), and check that the coefficient of 𝐽 satisfies 𝑎𝑘+1=(𝑛−1)𝑎𝑘+(−1)𝑘.
Sketch. (a) Each entry of 𝐽2 is a sum of 𝑛 ones. (b) Multiplying 𝑎𝑘𝐽+(−1)𝑘𝐼 by 𝐽−𝐼 and using 𝐽2=𝑛𝐽 gives coefficient (𝑛−1)𝑎𝑘+(−1)𝑘 on 𝐽 and (−1)𝑘+1 on 𝐼; the formula for 𝑎𝑘 satisfies this recursion. (c) Off the diagonal, (𝐴𝑘)𝑖𝑗=𝑎𝑘; the trace is 𝑛𝑎𝑘+𝑛(−1)𝑘, which simplifies to (𝑛−1)𝑘+(𝑛−1)(−1)𝑘.

(a) By the entry formula, (𝐽2)𝑖𝑗=∑𝑘=1𝑛1⋅1=𝑛, so 𝐽2=𝑛𝐽.

(b) For 𝑘=1, 𝑎1=(𝑛−1+1)/𝑛=1, and 𝐴=𝐽−𝐼𝑛=𝑎1𝐽+(−1)1𝐼𝑛. If 𝐴𝑘=𝑎𝑘𝐽+(−1)𝑘𝐼𝑛, then by Proposition 2.4.14 and (a),

𝐴𝑘+1=(𝑎𝑘𝐽+(−1)𝑘𝐼𝑛)(𝐽−𝐼𝑛)=𝑎𝑘𝑛𝐽−𝑎𝑘𝐽+(−1)𝑘𝐽−(−1)𝑘𝐼𝑛=((𝑛−1)𝑎𝑘+(−1)𝑘)𝐽+(−1)𝑘+1𝐼𝑛.

It remains to show that the coefficient of 𝐽 is 𝑎𝑘+1. Write 𝑏𝑘=𝑛𝑎𝑘=(𝑛−1)𝑘−(−1)𝑘. Then 𝑛((𝑛−1)𝑎𝑘+(−1)𝑘)=(𝑛−1)𝑏𝑘+𝑛(−1)𝑘, and

(𝑛−1)𝑏𝑘+𝑛(−1)𝑘=(𝑛−1)𝑘+1−(𝑛−1)(−1)𝑘+𝑛(−1)𝑘=(𝑛−1)𝑘+1+(−1)𝑘=𝑏𝑘+1.

Dividing by 𝑛 gives (𝑛−1)𝑎𝑘+(−1)𝑘=𝑎𝑘+1.

(c) By Proposition 2.4.39 and (b), for 𝑖≠𝑗 there are (𝐴𝑘)𝑖𝑗=𝑎𝑘=((𝑛−1)𝑘−(−1)𝑘)/𝑛 walks of length 𝑘 from 𝑖 to 𝑗, and the number of closed walks of length 𝑘 is

tr(𝐴𝑘)=𝑛𝑎𝑘+𝑛(−1)𝑘=(𝑛−1)𝑘−(−1)𝑘+𝑛(−1)𝑘=(𝑛−1)𝑘+(𝑛−1)(−1)𝑘.

For instance, the triangle (𝑛=3) has 23−2=6 closed walks of length 3, the two directions around it from each of the three vertices. As a check, 𝑎𝑘 is an integer, since 𝑛−1 and −1 leave the same remainder modulo 𝑛, so 𝑛 divides (𝑛−1)𝑘−(−1)𝑘.

More practice

The practice bank has 112 exercises on this section’s topics.