4.2  Change of Basis and Similarity

The matrix [T]BC of a linear map depends on two choices of basis, and different choices can give very different matrices for the same map. This section answers two questions left open by that fact. How are two matrices of the same map related? And which properties of a matrix belong to the map itself, so that no choice of basis can change them? The answers are the change-of-basis formula, drawn as a commutative square, and the relation of similarity.

4.2.1. Change-of-coordinates matrices

Recall the definition of the matrix of a map (Definition 4.1.1). If B=(v1,…,vn) is a basis of V and C is a basis of W, then [T]BC is the matrix whose j-th column is [Tvj]C, and it turns coordinates into coordinates: [Tv]C=[T]BC[v]B (Theorem 4.1.1).

Recall the reflection from the previous section (Example (A Reflection in Two Bases)), which motivates this one. Let R:R2→R2 be the reflection across the line y=x, so R(x,y)=(y,x). In the standard basis E=(e1,e2), we have Re1=e2 and Re2=e1, so [R]EE=(0110). Now use the basis B=((1,1),(1,−1)), one vector on the mirror line and one perpendicular to it. Then R(1,1)=(1,1) and R(1,−1)=(−1,1)=−(1,−1), so [R]BB=(100−1). The second matrix shows at a glance what R does: it keeps one direction and flips the other. The two matrices describe the same map, so there must be a rule converting one into the other. The first step is to convert the coordinates of a single vector.

Take v=(3,1). Its standard coordinates are [v]E=(3,1). In the basis B, we solve a(1,1)+b(1,−1)=(3,1), which gives a=2, b=1, so [v]B=(2,1). The same vector has two different coordinate columns, and we want a matrix that translates between them. Since the identity map idV sends every vector to itself, the matrix of idV, with one basis on the input side and the other on the output side, should do exactly this job.

A change-of-coordinates matrix is the matrix of “do nothing”, read with one basis on the way in and another on the way out.

Definition 4.2.1 (Change-of-coordinates matrix)

Let V be a finite-dimensional vector space over F, and let B=(v1,…,vn) and C be ordered bases of V. The change-of-coordinates matrix from B to C is the n×n matrix [id]BC:=[idV]BC, the matrix of the identity map idV:V→V with respect to the input basis B and the output basis C. Its j-th column is [vj]C.

In words: to build [id]BC, take the vectors of the old basis B one at a time, write each in the new basis C, and put the coordinate columns side by side. The column description is Definition 4.1.1 with T=idV, since idV(vj)=vj. Both bases must be bases of the same space V, and both are ordered: reordering either one permutes the columns or the rows.

Examples.

  • Into the standard basis of Fn. If B=(b1,…,bn) is a basis of Fn and E is the standard basis, then [bj]E=bj. So [id]BE is the matrix whose columns are the vectors of B themselves. For B=((1,1),(1,−1)) in R2, [id]BE=(111−1), and indeed (111−1)(21)=(31) turns [v]B into [v]E for v=(3,1).
  • Out of the standard basis. In the other direction, [id]EB has columns [e1]B and [e2]B. Solving a(1,1)+b(1,−1)=(1,0) gives a=b=12, and solving for (0,1) gives a=12, b=−12. So [id]EB=12(111−1). This is the inverse of the previous matrix, which the next theorem explains.
  • Polynomials. In F[x]≤2, let B=(1,x,x2) and C=(1,x−1,(x−1)2). Expanding (x−1)2=1−2x+x2, the vectors of C have B-coordinates (1,0,0), (−1,1,0), and (1,−2,1), so [id]CB=(1−1101−2001).
  • Degenerate case. If C=B, then [vj]B=ej, so [id]BB=In. Changing nothing is recorded by the identity matrix, as it should be.

Nonexample by minimal change. Replace the basis ((1,1),(1,−1)) by the list L=((1,1),(2,2)). We can still write the matrix with these vectors as columns, but L is not a basis, so “coordinates with respect to L” are not defined: (2,2)=2(1,1)+0(2,2)=0(1,1)+1(2,2) has two coordinate columns, and (1,0) has none. The clause that fails is “B is a basis”, which Definition 1.5.2 needs for coordinates to exist and be unique.

Warning. Watch the direction. The columns of [id]BC are the B-vectors written in C, and the matrix turns B-coordinates into C-coordinates. Using it the other way gives nonsense. With B=((1,1),(1,−1)), the matrix (111−1)=[id]BE applied to [v]E=(3,1) gives (4,2), which is not [v]B=(2,1). A reliable test: the first column must be the first input basis vector written in the output basis. Here (1,1)=1⋅e1+1⋅e2, so the column (1,1) belongs to [id]BE, which accepts B-coordinates.

The examples suggest three facts: the matrix converts coordinates, converting twice multiplies the matrices, and converting back inverts the matrix. All three follow from results about matrices of maps, applied to the identity.

Theorem 4.2.1 (Change of Coordinates)

Let V be a vector space of dimension n, and let B, C, D be bases of V.

  • (a) For every v∈V, [v]C=[id]BC[v]B. Moreover, [id]BC is the only matrix M∈Mn(F) with [v]C=M[v]B for every v∈V.
  • (b) [id]BD=[id]CD[id]BC.
  • (c) [id]BC is invertible, and ([id]BC)−1=[id]CB.

Proof.

  • (a) Apply Theorem 4.1.1, including its uniqueness clause, to idV with input basis B and output basis C: since idV(v)=v, it says [v]C=[id]BC[v]B for every v, and that no other matrix has this property.

  • (b) Since idV=idV∘idV, Theorem 4.1.2, with B on the input, C in the middle, and D on the output, gives [id]BD=[id]CD[id]BC.

  • (c) Taking D=B in (b) gives [id]CB[id]BC=[id]BB=In, where the last equality holds because, writing B=(v1,…,vn), the j-th column of [id]BB is [vj]B=ej. Swapping the roles of B and C gives [id]BC[id]CB=In. By Definition 0.9.13, [id]BC is invertible with inverse [id]CB.

So every change-of-coordinates matrix is invertible. The converse is also true, and it will matter when we compare matrices: every invertible matrix is a change-of-coordinates matrix, for a suitable new basis.

Proposition 4.2.2 (Invertible matrices are changes of basis)

Let B=(v1,…,vn) be a basis of V, and let P=(pij)∈Mn(F) be invertible. Put vj′:=p1jv1+p2jv2+⋯+pnjvn(j=1,…,n). Then B′=(v1′,…,vn′) is a basis of V, and [id]B′B=P.

Proof. By Definition 1.5.2, [vj′]B is the j-th column pj of P. Let c1,…,cn∈F satisfy c1v1′+⋯+cnvn′=0. Taking B-coordinates and using Theorem 1.5.2, c1p1+⋯+cnpn=[0]B=0, that is, Pc=0 with c=(c1,…,cn), by Theorem 0.9.3. Since P is invertible, Theorem 3.4.4 ((a) ⇒ (b)) gives c=0. So B′ is linearly independent. It has length n=dim⁡V, hence it is a basis by Theorem 1.6.4 (a). Finally, the j-th column of [id]B′B is [vj′]B=pj, so [id]B′B=P.

Example (Coordinates around the point 1)

In R[x]≤2, let B=(1,x,x2) and C=(1,x−1,(x−1)2). Find [id]BC, and use it to write p=2+3x+x2 in powers of x−1.

Solution. From the examples above, [id]CB=(1−1101−2001). By Theorem 4.2.1 (c), [id]BC is its inverse. We can also read it off directly: 1=1, x=1+(x−1), and x2=(1+(x−1))2=1+2(x−1)+(x−1)2. So [id]BC=(111012001), and multiplying the two matrices gives I3, as the theorem predicts. By Theorem 4.2.1 (a), [p]C=(111012001)(231)=(651). Hence 2+3x+x2=6+5(x−1)+(x−1)2. Check at x=1: both sides equal 6. The C-coordinates are p(1), p′(1), and p″(1)/2, the Taylor coefficients at 1.

4.2.2. Change of basis for linear maps

Now return to a linear map T:V→W between finite-dimensional spaces. Suppose we know its matrix [T]BC and want the matrix [T]B′C′ for new bases B′ of V and C′ of W. The trick is to write T in a slightly more elaborate way that does nothing: T=idW∘T∘idV. Each factor can now carry its own pair of bases, and the matrix of the composite is the product of the matrices. The picture keeps track of which basis sits where.

Diagram. Labels: T\\[1pt] mtx TsB sC, T\\[1pt] mtx TsB 'sC ' (wanted), id_V\\[1pt] mtx id sB 'sB, id_W\\[1pt] mtx id sC sC ', V with sB, W with sC, V with sB ', W with sC '

Going along the bottom edge applies T. Going up, across the top, and down applies idW∘T∘idV, which is the same map. So the two routes must have the same matrix. Reading the long route, the step done first (up the left side) is written on the right.

Theorem 4.2.3 (Change of Basis for Linear Maps)

Let V and W be finite-dimensional vector spaces over F, let B,B′ be bases of V and C,C′ bases of W, and let T:V→W be linear. Then [T]B′C′=[id]CC′[T]BC[id]B′B. In particular, for an operator T∈L(V) and bases B,B′ of V, with P=[id]B′B, [T]B′B′=P−1[T]BBP.

Idea. Nothing is computed: the formula is the change-of-basis square read along its long route. ① Write T=idW∘T∘idV. ② Give the middle factor the bases whose matrix we know. ③ Apply the composition rule twice. Do not memorize the formula; redraw the square and read it off, right to left.

Proof. Since T=idW∘(T∘idV), Theorem 4.1.2 with bases B′, C, C′ gives [T]B′C′=[id]CC′[T∘idV]B′C. Applying Theorem 4.1.2 again, with bases B′, B, C, gives [T∘idV]B′C=[T]BC[id]B′B. Combining the two equations proves the first formula.

For an operator, take W=V, C=B, and C′=B′. The first formula becomes [T]B′B′=[id]BB′[T]BBP, and [id]BB′=P−1 by Theorem 4.2.1 (c). This proves the theorem.

We will call this move the change-of-basis square: whenever a question involves the same map in two bases, draw the square, label the arrows with bases, and read the formula off the long route. It also explains the word “coordinates”: a matrix is a map seen through a choice of coordinates, and the side arrows re-express those coordinates.

Example (The reflection in a mirror-adapted basis)

Let R(x,y)=(y,x) on R2, and B=((1,1),(1,−1)). Compute [R]BB from [R]EE using Theorem 4.2.3, and compare with the direct computation at the start of the section.

Solution. Here P=[id]BE=(111−1), with inverse P−1=[id]EB=12(111−1), found in the examples after Definition 4.2.1. Then P−1[R]EEP=12(111−1)(0110)(111−1)=12(111−1)(1−111)=12(200−2)=(100−1), which agrees with the direct computation. The direct route was shorter here, because we chose B so that R acts simply on it. The formula earns its keep when the new matrix is not visible by inspection, or when we want to go back from the simple matrix to the standard one: [R]EE=P[R]BBP−1.

The next example changes basis in a polynomial space, where “standard” does not mean “best”.

Example (Differentiation with a rescaled basis)

Let D:R[x]≤2→R[x]≤2 be differentiation, B=(1,x,x2), and B′=(1,x,12x2). Find [D]B′B′.

Solution. In B, D(1)=0, D(x)=1, and D(x2)=2x, so A=[D]BB=(010002000). The vectors of B′ have B-coordinates e1, e2, 12e3, so P=[id]B′B=diag(1,1,12) and P−1=diag(1,1,2). Multiplying a matrix on the left by a diagonal matrix scales its rows, and on the right scales its columns, so P−1AP=(01⋅1⋅10001⋅2⋅12000)=(010001000). Directly: D(1)=0, D(x)=1, D(12x2)=x, so D shifts each vector of B′ to the previous one, and the matrix has 1’s just above the diagonal. The factor 2 has disappeared into the basis.

Quick check. Let T:V→W, and suppose we change only the basis of W, from C to C′, keeping B. Which of the two side matrices in Theorem 4.2.3 becomes the identity, and what is the formula?

Solution. With B′=B, the left side of the square is [id]BB=In. The formula becomes [T]BC′=[id]CC′[T]BC: only a multiplication on the left. Changing the output basis acts on the rows; changing the input basis acts on the columns.

4.2.3. Similar matrices

For an operator, the two bases on the two sides of the square are the same, and the formula takes the special shape P−1AP. Recall from Example (Similarity) that we already gave this shape a name in Chapter 0 and checked that it defines an equivalence relation. We now record it as a definition, because it is exactly the relation “same operator, different basis”.

Two square matrices are similar when one is obtained from the other by a change of basis applied on both sides at once.

Definition 4.2.2 (Similar matrices)

Let A,B∈Mn(F). We say A is similar to B, written A∼B, if there exists an invertible matrix P∈Mn(F) such that B=P−1AP.

In words: the same P appears on both sides, once inverted. By Example (Similarity), ∼ is an equivalence relation, so we may say “A and B are similar” without worrying about the order. The matrix P is not unique: for instance A=P−1AP holds for every invertible P that commutes with A, such as any nonzero multiple of In. Writing B=QAQ−1 defines the same relation, with Q=P−1.

Examples.

  • The reflection. (0110)∼(100−1), by Example (The reflection in a mirror-adapted basis).
  • A triangular matrix. (1203)∼diag(1,3), as computed in Example (Similarity) with P=(1101).
  • Reordering a basis. diag(1,2)∼diag(2,1): with P=(0110)=P−1, we get P−1diag(1,2)P=diag(2,1). This is the operator with matrix diag(1,2) in (v1,v2), read in the reordered basis (v2,v1).
  • Degenerate case: scalar matrices. For c∈F, P−1(cIn)P=cP−1P=cIn for every invertible P. So cIn is similar only to itself. In particular In and the zero matrix are alone in their classes: the identity operator looks like In in every basis.

Nonexample by minimal change. Allow two different invertible matrices, B=QAP. With A=I2, Q=(0110), and P=I2, we get B=(0110)≠I2. So B=QAP holds, but B is not similar to I2, which is similar only to itself. The clause that failed is “the same P on both sides, once inverted”. The relaxed relation is also useful; it is the subject of the next section.

The definition was designed to capture one idea, and the next theorem says it captures exactly that idea.

Theorem 4.2.4 (Similar Matrices Represent the Same Operator)

Let A,B∈Mn(F).

  • (a) If V is a vector space of dimension n, T∈L(V), and B,C are bases of V, then [T]BB∼[T]CC.
  • (b) Conversely, suppose A∼B. Let V be any vector space of dimension n with a basis B, and let T∈L(V) be an operator with [T]BB=A. Then there is a basis C of V with [T]CC=B.
  • (c) Such an operator T in (b) always exists. In particular, A∼B if and only if A and B are the matrices of the operator x↦Ax on Fn in the standard basis and in some basis of Fn, respectively.

Proof.

  • (a) By Theorem 4.2.3, [T]CC=P−1[T]BBP with P=[id]CB, which is invertible by Theorem 4.2.1 (c).

  • (b) Suppose B=P−1AP with P invertible. By Proposition 4.2.2, there is a basis C of V with [id]CB=P. By Theorem 4.2.3, [T]CC=P−1[T]BBP=P−1AP=B.

  • (c) Write B=(v1,…,vn). By Theorem 2.1.5, there is a linear map T:V→V with Tvj=a1jv1+⋯+anjvn for each j. The j-th column of [T]BB is [Tvj]B, which is the j-th column of A; so [T]BB=A. For V=Fn with the standard basis E, the operator x↦Ax works, since Aej is the j-th column of A (Theorem 0.9.3). The last statement now follows from (a) and (b).

This is the promise of Chapter 0 kept: similar matrices describe the same operator in two coordinate systems. So a question of the form “are A and B similar?” is really the question “is there a basis in which the operator x↦Ax has matrix B?”. Deciding it is one of the central problems of the book, and it will take until Chapter 10 to answer it in general.

4.2.4. Similarity invariants

If a quantity computed from a matrix does not change under A↦P−1AP, then it is really a property of the operator, and we call it a similarity invariant. Invariants are the cheap way to prove that two matrices are not similar: find one invariant on which they differ. The trace is the first example, and it is the reason the trace will make sense for operators in this chapter’s last section.

Theorem 4.2.5 (Trace Is a Similarity Invariant)

If A,B∈Mn(F) are similar, then trA=trB.

Proof. Let B=P−1AP with P invertible. By Theorem 0.9.6 (3), applied to the matrices P−1 and AP, trB=tr(P−1(AP))=tr((AP)P−1)=tr(A(PP−1))=trA, where the third equality is associativity of matrix multiplication. This proves the theorem.

The proof never used that B is “similar” in any geometric sense, only that the trace ignores the order of two factors. Several other quantities survive a change of basis, for simpler reasons.

Proposition 4.2.6 (More similarity invariants)

Let A,B∈Mn(F) with B=P−1AP for an invertible P.

  • (a) rankA=rankB.
  • (b) A is invertible if and only if B is invertible.
  • (c) For every polynomial p∈F[x], p(B)=P−1p(A)P. In particular, p(A)=O if and only if p(B)=O; for example, A2=O if and only if B2=O.

Proof.

  • (a) By Theorem 3.5.9, multiplying by invertible matrices on either side does not change the rank, so rank(P−1AP)=rank(AP)=rankA.

  • (b) If A is invertible, then B=P−1AP is a product of invertible matrices, hence invertible by Theorem 0.9.7 (part 3). Since A=PBP−1=(P−1)−1BP−1, the same argument with the roles swapped gives the converse.

  • (c) First, Bk=P−1AkP for every k≥0, by induction on k: for k=0 both sides are In, and if it holds for k, then Bk+1=BkB=(P−1AkP)(P−1AP)=P−1Ak(PP−1)AP=P−1Ak+1P. Now let p=c0+c1x+⋯+cdxd. By Definition 0.9.14 and the distributive and scalar laws of Theorem 0.9.4, p(B)=∑k=0dckBk=∑k=0dckP−1AkP=P−1(∑k=0dckAk)P=P−1p(A)P. If p(A)=O, then p(B)=P−1OP=O. Conversely, A=PBP−1 is of the same form with P−1 in place of P, so p(B)=O implies p(A)=O.

For example, (1203) and (1002) are not similar, because their traces are 4 and 3. And (0100) is not similar to the zero matrix, because their ranks are 1 and 0 (or because the zero matrix is similar only to itself).

It is tempting to turn this around and decide similarity by comparing a list of invariants. That fails.

Warning. Shared invariants do not imply similarity. Let J=(1101). Then I2 and J have the same trace 2, the same rank 2, both are invertible, and both satisfy (X−I2)2=O. But they are not similar: for every invertible P, P−1I2P=I2≠J. A sharper invariant does separate them: combining (a) and (c) of Proposition 4.2.6, similar matrices A and B have rankp(A)=rankp(B) for every polynomial p, and rank(I2−I2)=0 while rank(J−I2)=1. Which invariants suffice in general is the question Chapter 10 answers.

Quick check. Are diag(2,5) and diag(5,2) similar? Are (2002) and (2102) similar?

Solution. The first pair is similar: with P=(0110), its own inverse, P−1diag(2,5)P=diag(5,2). The second pair is not: 2I2 is a scalar matrix, so it is similar only to itself, although both matrices have trace 4 and rank 2.

4.2.5. A basis adapted to the operator

The reflection became diagonal once we chose one basis vector the map keeps and one it flips. The same idea works whenever a map is simple on two complementary pieces of the space. For a map of rank 1 on R2, the natural pieces are the image and the kernel, provided they are two different lines. (They need not be: for x↦Nx with N=(0100), both are span(e1), and Exercise (C3: Every nonzero 2×2 matrix with square zero) shows what to do instead.)

Example (Making a matrix diagonal with a well-chosen basis)

Let T:R2→R2, T(x,y)=(2x−y, 2x−y). Find a basis B of R2 such that [T]BB is diagonal, and check the answer with Theorem 4.2.3.

Solution. In the standard basis A=[T]EE=(2−12−1).

Both entries of T(x,y) are equal, so imT⊆span((1,1)), and T(1,1)=(1,1) shows imT=span((1,1)). The kernel is {(x,y):y=2x}=span((1,2)). So T fixes (1,1) and kills (1,2). These two vectors are not multiples of each other, so B=((1,1),(1,2)) is independent, and it is a basis of R2 by Theorem 1.6.4. Since T(1,1)=1⋅(1,1)+0⋅(1,2) and T(1,2)=0, [T]BB=(1000). Check: P=[id]BE=(1112) has ad−bc=1, so P−1=(2−1−11) by Theorem 0.9.8. Then P−1AP=(2−1−11)(2−12−1)(1112)=(2−100)(1112)=(1000). As Theorem 4.2.5 and Proposition 4.2.6 require, trA=1 and rankA=1 match the diagonal matrix. Its form also explains a property of A that is not obvious from its entries: diag(1,0)2=diag(1,0), so A2=A by Proposition 4.2.6 (c) applied to p=x2−x.

The basis in this example consisted of vectors that T sends to multiples of themselves. Chapter 9 turns this into a method: such vectors are called eigenvectors, and an operator has a diagonal matrix exactly when there is a basis of them. Operators with T2=T, like this one, are the projections of the last section of this chapter.

4.2.6. Exercises

A. Check your understanding

Exercise (A1)
  • (a) Define the change-of-coordinates matrix [id]BC, and say what its columns are.
  • (b) State the change-of-basis formula for an operator T∈L(V) and bases B,B′, saying exactly which matrix P is.
  • (c) True or false: [id]BC=[id]CB for all bases B,C of V. Justify your answer.
  • (d) True or false: if A∼B, then trA=trB and rankA=rankB. Justify your answer.
  • (e) True or false: if trA=trB and rankA=rankB, then A∼B. Justify your answer.
  • (f) Describe the method for recovering the change-of-basis formula without memorizing it.

Solution.

  • (a) For bases B=(v1,…,vn) and C of V, [id]BC is the matrix of idV with input basis B and output basis C (Definition 4.2.1). Its j-th column is [vj]C.

  • (b) [T]B′B′=P−1[T]BBP with P=[id]B′B, whose columns are the B-coordinates of the vectors of B′ (Theorem 4.2.3).

  • (c) False. By Theorem 4.2.1 (c) the two matrices are inverse to each other, and an invertible matrix usually differs from its inverse: for B=((1,1),(1,−1)) and the standard basis E of R2, [id]BE=(111−1) but [id]EB=12(111−1).

  • (d) True, by Theorem 4.2.5 and Proposition 4.2.6 (a).

  • (e) False. I2 and (1101) both have trace 2 and rank 2, but I2 is similar only to itself.

  • (f) Draw the change-of-basis square: T along the top and bottom with the old and new bases, identity maps up the left side and down the right side. Since T=idW∘T∘idV, the matrix of the bottom arrow is the product of the matrices along the long route, with the first step on the right.

B. Practice

Exercise (B1: Change-of-coordinates matrices)
  • (a) In R2, let B=((1,2),(3,5)) and C=((1,1),(1,2)). Find [id]BC. If [v]B=(1,−1), find [v]C, and check your answer by computing v both ways.
  • (b) In R[x]≤2, let B=(1,x,x2) and C=(1,1+x,1+x+x2). Find [id]CB and [id]BC. Hence find the C-coordinates of 3−x+2x2.

Solution.

  • (a) The columns are the C-coordinates of (1,2) and (3,5). Solving a(1,1)+b(1,2)=(1,2) gives a+b=1, a+2b=2, so b=1, a=0. Solving a(1,1)+b(1,2)=(3,5) gives b=2, a=1. Hence [id]BC=(0112),[v]C=(0112)(1−1)=(−1−1) by Theorem 4.2.1 (a). Check: from B, v=(1,2)−(3,5)=(−2,−3); from C, v=−(1,1)−(1,2)=(−2,−3).

  • (b) The vectors of C have B-coordinates (1,0,0), (1,1,0), (1,1,1), so [id]CB=(111011001). For the other direction, write the vectors of B in C: 1=1, x=(1+x)−1, x2=(1+x+x2)−(1+x). So [id]BC=(1−1001−1001), and multiplying the two matrices gives I3, as Theorem 4.2.1 (c) requires. Hence [3−x+2x2]C=(1−1001−1001)(3−12)=(4−32). Check: 4−3(1+x)+2(1+x+x2)=3−x+2x2.

Exercise (B2: A matrix in a new basis, two ways)

Let T:R2→R2, T(x,y)=(4x−2y, x+y), and B=((1,1),(2,1)).

Solution.

  • (a) T(1,1)=(2,2)=2(1,1)+0(2,1) and T(2,1)=(6,3)=0(1,1)+3(2,1). Hence [T]BB=diag(2,3).

  • (b) A=[T]EE=(4−211) and P=[id]BE=(1211). Here ad−bc=−1, so by Theorem 0.9.8 P−1=(−121−1). Then P−1AP=(−121−1)(4−211)(1211)=(−243−3)(1211)=(2003), in agreement with (a).

Exercise (B3: Similar or not?)

Determine which of the following pairs of real matrices are similar. Justify your answer, either with an invariant or with an explicit invertible P.

  • (a) (1203) and (1002).
  • (b) (0100) and (0000).
  • (c) (1102) and (1002).
  • (d) (2002) and (2102).
  • (e) (1111) and (2000).

Solution.

  • (a) Not similar: the traces are 4 and 3, contradicting Theorem 4.2.5.

  • (b) Not similar: the ranks are 1 and 0, contradicting Proposition 4.2.6 (a).

  • (c) Similar. Let A be the first matrix. We look for a basis in which x↦Ax is diagonal: Ae1=e1, and A(1,1)=(2,2)=2(1,1). With P=(1101), P−1=(1−101) and P−1AP=(1−101)(1102)(1101)=(1−102)(1101)=(1002).

  • (d) Not similar: 2I2 is a scalar matrix, so P−1(2I2)P=2I2 for every invertible P, and the second matrix is not 2I2. The traces and ranks agree, so invariants alone would not have decided this.

  • (e) Similar. Let A be the first matrix. A(1,1)=(2,2) and A(1,−1)=(0,0). With P=(111−1) and P−1=12(111−1), P−1AP=12(111−1)(2020)=12(4000)=(2000), where AP=(2020) has columns A(1,1) and A(1,−1).

C. Going deeper

Exercise (C1: Matrices similar only to themselves)

Let n≥1 and A∈Mn(F).

  • (a) Prove that A is similar only to itself if and only if A=cIn for some c∈F.
  • (b) Show that N=(0100) and N⊤=(0010) are similar, and explain the answer in terms of the operator x↦Nx and a reordered basis.

Hint: for (a), use the invertible matrices In+Eij with i≠j.

Solution.

  • (a) (⇐) If A=cIn, then P−1AP=cP−1P=cIn=A for every invertible P, so the only matrix similar to A is A.

    (⇒) Suppose P−1AP=A for every invertible P, that is, AP=PA. If n=1, A=(a11)=a11I1. Let n≥2, and fix i≠j. The matrix In+Eij is invertible, with inverse In−Eij, since EijEij=O for i≠j. So A(In+Eij)=(In+Eij)A, which gives AEij=EijA. Compare the entries in position (k,l): by Definition 0.9.9, (AEij)kl={akil=j0l≠j,(EijA)kl={ajlk=i0k≠i. Taking l=j and k≠i gives aki=0. Taking k=i and l=j gives aii=ajj. Since i≠j were arbitrary (and every index i has some j≠i because n≥2), all off-diagonal entries of A vanish and all diagonal entries are equal to c=a11. Hence A=cIn.

  • (b) Let P=(0110), so P−1=P. Then NP=(1000) and P−1NP=(0010)=N⊤. In terms of operators: Tx=Nx has Te1=0 and Te2=e1. In the reordered basis B=(e2,e1), the first basis vector goes to the second and the second goes to 0, so [T]BB=N⊤. The same operator has both matrices, as Theorem 4.2.4 predicts.
Exercise (C2: AB and BA)

Let A,B∈Mn(F).

  • (a) Prove that if A is invertible, then AB∼BA.
  • (b) Show that (a) fails without the invertibility hypothesis, even though tr(AB)=tr(BA) always holds.

Solution.

  • (a) Since A is invertible, A−1(AB)A=(A−1A)(BA)=BA by associativity. With P=A this is BA=P−1(AB)P, so AB∼BA.

  • (b) Take A=(1000) and B=(0100). Then AB=(0100), of rank 1, and BA=O, of rank 0. By Proposition 4.2.6 (a), AB≁BA. Both traces are 0, in agreement with Theorem 0.9.6; the trace simply cannot detect the difference.

Exercise (C3: Every nonzero 2×2 matrix with square zero)

Let N∈M2(F) with N≠O and N2=O, and let T:F2→F2, Tx=Nx.

  • (a) Explain why there is v∈F2 with Nv≠0, and show that B=(Nv,v) is a basis of F2.
  • (b) Compute [T]BB, and deduce that N∼(0100).
  • (c) Hence show that (2−41−2)∼(0100) in M2(R), with an explicit P.

Solution.

  • (a) Since N≠O, some column Nej is nonzero (Theorem 0.9.3); take v=ej. Let aNv+bv=0. Multiplying by N and using N2=O gives bNv=0, so b=0 because Nv≠0 (Theorem 1.1.9). Then aNv=0 forces a=0 for the same reason. So B is linearly independent of length 2=dim⁡F2, hence a basis by Theorem 1.6.4.

  • (b) T(Nv)=N2v=0 and Tv=Nv=1⋅Nv+0⋅v. The columns of [T]BB are therefore (0,0) and (1,0), so [T]BB=(0100). Also [T]EE=N. By Theorem 4.2.4 (a), N∼(0100).

  • (c) Let N=(2−41−2). Then N2=(4−4−8+82−2−4+4)=O and N≠O. Take v=e1, so Nv=(2,1), and B=((2,1),(1,0)). By Theorem 4.2.3, P=[id]BE=(2110) satisfies P−1NP=(0100). Check: P−1=(011−2) by Theorem 0.9.8 (here ad−bc=−1), NP=(0201), and P−1NP=(0100).

Found a typo or a mistake? Report it, or read this page’s source

The text of this book is licensed under CC BY-NC-SA 4.0.