The matrix 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.
Change-of-coordinates matrices
Recall the definition of the matrix of a map (Definition 4.1.1).
If is a basis of and is a basis of , then is the
matrix whose -th
column is , and
it turns coordinates into coordinates: (Theorem 4.1.1).
Recall the reflection from the previous section (Example (A Reflection in Two Bases)),
which motivates this one. Let
be the reflection across the line , so . In the
standard basis , we have and , so Now use the basis ,
one vector on the mirror line and one perpendicular to
it. Then and , so The second matrix shows at a glance what 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 . Its standard coordinates are .
In the basis ,
we solve , which gives , , so .
The same vector has two different coordinate columns,
and we want a matrix that translates between them. Since
the identity map sends every vector
to itself, the matrix of , 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 be a
finite-dimensional vector space over , and let
and be
ordered bases of . The
change-of-coordinates matrix from to is the matrix the matrix of the identity map with
respect to the input basis and the output basis
. Its -th column is .
In words: to build , take
the vectors of the old basis one at a time, write
each in the new basis , and put the
coordinate columns side by side. The column description
is Definition 4.1.1
with ,
since . Both bases must be bases of the
same space , and both are ordered:
reordering either one permutes the columns or the
rows.
Examples.
- Into the standard basis of . If
is a basis of
and is the
standard basis, then .
So is
the matrix whose columns are the vectors of themselves. For
in , , and indeed turns into
for
.
- Out of the standard basis. In the
other direction, has
columns and
.
Solving gives , and solving for gives , . So . This is the inverse of the
previous matrix, which the next theorem explains.
- Polynomials. In , let and
. Expanding , the vectors of have -coordinates , and , so
- Degenerate case. If , then ,
so . Changing nothing is recorded by the
identity matrix, as it should be.
Non-example by minimal change.
Replace the basis by the list .
We can still write the matrix with these vectors as
columns, but is
not a basis, so “coordinates with respect to ” are not defined:
has two coordinate columns,
and has
none. The clause that fails is “ is a basis”, which Definition 1.5.2
needs for coordinates to exist and be unique.
Warning. Watch the
direction. The columns of are
the -vectors written in
, and
the matrix turns -coordinates into
-coordinates.
Using it the other way gives nonsense. With ,
the matrix applied to
gives , which
is not .
A reliable test: the first column must be the first
input basis vector written in the
output basis. Here , so the column belongs to ,
which accepts -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 be a
vector space of dimension , and let , , be bases of .
- (a) For every , . Moreover,
is the only matrix with for every .
- (b) .
- (c) is
invertible, and .
Proof.
(a) Apply Theorem 4.1.1,
including its uniqueness clause, to with input basis
and output
basis : since
, it
says for every
, and that no
other matrix has this property.
(b) Since , Theorem 4.1.2,
with on the
input, in the
middle and on
the output, gives .
(c) Taking in (b) gives
, where the last
equality holds because, writing , the -th column of is
. Swapping the roles of and gives . By Definition 0.9.13,
is invertible with inverse .
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 be a basis of , and let
be invertible. Put Then is a basis of
, and .
Proof. By Definition 1.5.2,
is
the -th column
of . Let
satisfy . Taking -coordinates and using
Theorem 1.5.2, that is, with , by Theorem 0.9.3. Since
is invertible,
Theorem 3.4.4 ((a)
(b))
gives . So
is
linearly independent. It has length , hence it is a
basis by Theorem 1.6.4 (a).
Finally, the -th
column of
is , so .
Example
(Coordinates around the point )
In , let and . Find , and
use it to write in powers of .
Solution. From the examples above,
. By Theorem 4.2.1
(c), is
its inverse. We can also read it off directly: , , and
. So and multiplying the two matrices gives , as the theorem
predicts. By Theorem 4.2.1
(a), Hence . Check at : both sides equal
. The -coordinates are , and , the
Taylor coefficients at .
Change of
basis for linear maps
Now return to a linear map between
finite-dimensional spaces. Suppose we know its matrix
and want the matrix
for new bases of and of . The trick is to write
in a slightly
more elaborate way that does nothing: 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.
Going along the bottom edge applies . Going up, across the
top and down applies , 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 and be finite-dimensional
vector spaces over , let be bases of
and bases of
, and let be
linear. Then In particular, for an operator and bases
of
, with ,
Idea. Nothing is computed: the
formula is the change-of-basis square read along its
long route. ① Write . ② 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 , Theorem 4.1.2
with bases , , gives . Applying Theorem 4.1.2
again, with bases , , , gives .
Combining the two equations proves the first
formula.
For an operator, take , and . The first formula becomes ,
and 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 on , and .
Compute from
using Theorem 4.2.3,
and compare with the direct computation at the start of
the section.
Solution. Here , with inverse , found in the examples after Definition 4.2.1.
Then which agrees with the direct computation. The
direct route was shorter here, because we chose so that 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: .
The next example changes basis in a polynomial space,
where “standard” does not mean “best”.
Example
(Differentiation with a rescaled basis)
Let be differentiation, and
. Find .
Solution. In , , and , so . The vectors
of have
-coordinates
, , , so and .
Multiplying a matrix on the left by a diagonal matrix
scales its rows, and on the right scales its columns, so
Directly: , , , so
shifts each vector of to the previous
one, and the matrix has ’s just above the
diagonal. The factor has disappeared into
the basis.
Quick check. Let , and
suppose we change only the basis of , from to , keeping . Which of the two
side matrices in Theorem 4.2.3
becomes the identity, and what is the formula?
Solution. With , the left
side of the square is . The formula becomes :
only a multiplication on the left. Changing the output
basis acts on the rows; changing the input basis acts on
the columns.
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 . 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 . We say is
similar to , written , if there
exists an invertible
matrix such that
In words: the same appears on both sides,
once inverted. By Example (Similarity),
is an
equivalence relation, so we may say “ and are similar” without
worrying about the order. The matrix is not unique: for
instance holds for every invertible that commutes with
, such as any
non-zero multiple of . Writing defines
the same relation, with .
Examples.
- The reflection. , by Example (The reflection in a mirror-adapted basis).
- A triangular matrix. , as
computed in Example (Similarity)
with .
- Reordering a basis. : with , we get . This is the operator with matrix in , read in the
reordered basis .
- Degenerate case: scalar matrices.
For , for every invertible . So is similar only to
itself. In particular and the zero matrix
are alone in their classes: the identity operator looks
like in
every basis.
Non-example by minimal change. Allow
two different invertible matrices, . With , and , we get . So holds, but
is not similar
to , which is
similar only to itself. The clause that failed is “the
same 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) If is a vector space of
dimension , , and are bases of
, then .
- (b) Conversely,
suppose .
Let be any vector
space of dimension with a basis , and let be an
operator with .
Then there is a basis of with .
- (c) Such an operator
in (b) always
exists. In particular, if and only if and are the matrices of
the operator on in the standard basis
and in some basis of , respectively.
Proof.
(a) By Theorem 4.2.3,
with ,
which is invertible by Theorem 4.2.1
(c).
(b) Suppose with
invertible. By
Proposition 4.2.2,
there is a basis of with .
By Theorem 4.2.3,
.
(c) Write . By Theorem 2.1.5, there
is a linear map with for each . The -th column of is
,
which is the -th
column of ; so
. For with the standard basis , the operator works,
since is the
-th column of
(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 and similar?” is really
the question “is there a basis in which the operator
has
matrix ?”.
Deciding it is one of the central problems of the book,
and it will take until Chapter 10 to answer it in
general.
Similarity
invariants
If a quantity computed from a matrix does not change
under , 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 are similar, then .
Proof. Let with
invertible. By
Theorem 0.9.6 (3),
applied to the matrices and , where the third equality is associativity of
matrix multiplication. This proves the theorem.
The proof never used that 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 with for an invertible .
- (a) .
- (b) is invertible if and
only if is
invertible.
- (c) For every
polynomial , . In particular, if and only if
; for
example,
if and only if .
Proof.
(a) By Theorem 3.5.9,
multiplying by invertible matrices on either side does
not change the rank, so .
(b) If is invertible, then
is
a product of invertible matrices, hence invertible by Theorem 0.9.7 (part
3). Since , the same argument
with the roles swapped gives the converse.
(c) First, for
every , by
induction on : for
both sides
are , and if it
holds for , then
.
Now let . By Definition 0.9.14 and
the distributive and scalar laws of Theorem 0.9.4, If , then . Conversely, is of
the same form with in place of , so implies .
For example, and are not
similar, because their traces are and . And is not similar to the
zero matrix, because their ranks are and (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 . Then and have the same trace
, the same rank
, both are
invertible, and both satisfy . But
they are not similar: for every
invertible ,
. A sharper invariant does separate them:
combining (a) and (c) of Proposition 4.2.6,
similar matrices
and have
for every polynomial , and
while . Which invariants suffice in general is the
question Chapter 10 answers.
Quick check. Are and similar? Are
and similar?
Solution. The first pair is
similar: with , which is its own inverse, . The second pair is not: is a scalar matrix,
so it is similar only to itself, although both matrices
have trace and
rank .
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 on , the natural pieces
are the image and the kernel, provided they are two
different lines. (They need not be: for with
, both are , and Exercise (C3: Every non-zero
matrix with square zero) shows what to do
instead.)
Example
(Making a matrix diagonal with a well-chosen
basis)
Let , . Find a basis of such that is
diagonal, and check the answer with Theorem 4.2.3.
Solution. In the standard basis
.
Both entries of are equal, so , and shows . The kernel is . So
fixes and
kills . These
two vectors are not multiples of each other, so is
independent, and it is a basis of by Theorem 1.6.4. Since
and , Check: has , so by Theorem 0.9.8. Then
As Theorem 4.2.5 and
Proposition 4.2.6
require,
and
match the diagonal matrix. Its form also explains a
property of that
is not obvious from its entries: , so by Proposition 4.2.6
(c) applied to .
The basis in this example consisted of vectors that
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 , like this one,
are the projections of the last section of this
chapter.
Exercises
A. Check your
understanding
Exercise
(A1)
- (a) Define the
change-of-coordinates matrix , and
say what its columns are.
- (b) State the
change-of-basis formula for an operator and bases
,
saying exactly which matrix is.
- (c) True or false:
for all bases of . Justify your
answer.
- (d) True or false:
if , then
and
. Justify your answer.
- (e) True or false:
if
and , then . Justify your answer.
- (f) Describe the
method for recovering the change-of-basis formula
without memorizing it.
Solution.
(a) For bases
and of , is
the matrix of
with input basis and output basis
(Definition 4.2.1).
Its -th column is
.
(b) with , whose columns are the
-coordinates of
the vectors of (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
and the standard basis of , but .
(d) True, by Theorem 4.2.5 and
Proposition 4.2.6
(a).
(e) False. and both have trace and rank , but is similar only to
itself.
(f) Draw the
change-of-basis square: along the top and
bottom with the old and new bases, identity maps up the
left side and down the right side. Since , 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 , let
and . Find . If
, find , and
check your answer by computing both ways.
- (b) In , let and
. Find and
.
Hence find the -coordinates of .
Solution.
(a) The columns
are the -coordinates of and . Solving gives , , so , .
Solving gives , .
Hence by Theorem 4.2.1
(a). Check: from , ; from , .
(b) The vectors
of have -coordinates , , , so . For the
other direction, write the vectors of in : , , . So and multiplying the two matrices gives , as Theorem 4.2.1 (c)
requires. Hence Check: .
Exercise
(B2: A matrix in a new basis, two ways)
Let , , and .
Solution.
(a) and . Hence .
(b) and . Here , so by Theorem 0.9.8 . Then 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 .
- (a) and .
- (b) and .
- (c) and .
- (d) and .
- (e) and .
Solution.
(a) Not similar:
the traces are
and ,
contradicting Theorem 4.2.5.
(b) Not similar:
the ranks are and
, contradicting Proposition 4.2.6
(a).
(c) Similar. Let
be the first
matrix. We look for a basis in which is
diagonal: , and . With , and
(d) Not similar:
is a scalar
matrix, so for every invertible , and the second matrix
is not . The
traces and ranks agree, so invariants alone would not
have decided this.
(e) Similar. Let
be the first
matrix. and . With and , where has columns and .
C. Going deeper
Exercise
(C1: Matrices similar only to themselves)
Let and
.
- (a) Prove that is similar only to
itself if and only if for some .
- (b) Show that and are similar, and
explain the answer in terms of the operator and a
reordered basis.
Hint: for (a), use the invertible matrices with .
Solution.
- (a) If , then for every invertible , so the only matrix
similar to is
.
Suppose for every invertible , that is, . If , . Let , and fix . The matrix is
invertible, with inverse , since
for . So
, which gives .
Compare the entries in position : by Definition 0.9.9,
Taking and gives . Taking and gives . Since were arbitrary (and every index has some because ), all
off-diagonal entries of vanish and all
diagonal entries are equal to . Hence .
- (b) Let , so . Then and . In
terms of operators: has and . In the reordered basis , the
first basis vector goes to the second and the second
goes to , so
. The same operator has both matrices, as
Theorem 4.2.4
predicts.
Exercise
(C2: and )
Let .
- (a) Prove that if
is invertible,
then .
- (b) Show that (a)
fails without the invertibility hypothesis, even though
always holds.
Solution.
(a) Since is invertible, by associativity. With
this is
, so .
(b) Take and . Then , of rank , and , of rank . By Proposition 4.2.6
(a), . Both traces are , in agreement with Theorem 0.9.6; the
trace simply cannot detect the difference.
Exercise
(C3: Every non-zero matrix with square zero)
Let with and , and let , .
- (a) Explain why
there is
with ,
and show that is a basis of .
- (b) Compute , and
deduce that .
- (c) Hence show that
in , with an
explicit .
Solution.
(a) Since , some column
is non-zero
(Theorem 0.9.3); take
. Let
.
Multiplying by
and using
gives ,
so because
(Theorem 1.1.9). Then
forces
for the same
reason. So is
linearly independent of length , hence a
basis by Theorem 1.6.4.
(b) and
. The columns of are
therefore
and , so
. Also .
By Theorem 4.2.4
(a), .
(c) Let . Then
and . Take
, so , and .
By Theorem 4.2.3,
satisfies . Check:
by Theorem 0.9.8 (here
),
, and .