An isomorphism turns the vectors of an abstract space into
columns. This section does the same for
maps. Once a basis is fixed on each
side, every linear map between finite-dimensional spaces
becomes a matrix, applying the map becomes multiplying
by that matrix, and composing maps becomes multiplying
matrices. This last fact finally explains the strange
multiplication rule of Chapter 0, and it gives us the
working method of the rest of the book: to study an
abstract map, write down its matrix, compute there, and
translate back.
Writing a
map as a matrix
We have seen one family of linear maps that is
completely described by a table of numbers: the matrix
maps , . In fact
every linear map is
one of them. By Theorem 2.1.4 and Theorem 0.9.3, for
, The -th
column of is the
image of the -th
basis vector. We want the same description for maps
between arbitrary finite-dimensional spaces, such as
differentiation on polynomials.
Take . Then A polynomial is not a column, but its
coordinates are. In the bases and
, the
input has coordinates and the output has coordinates
,
and Look at the columns of this matrix: , , , . They are the
coordinates of , , , . The standard example generalizes: record
the images of the input basis, in coordinates of the
output basis, as columns.
The matrix of a linear map lists, column by
column, where the input basis vectors go, written in
coordinates of the output basis.
Definition
4.1.1 (Matrix of a Linear Map)
Let and be finite-dimensional
vector spaces over , with
ordered bases of and of , and let . The
matrix of
with respect to
and is
the
matrix whose -th column is the
coordinate vector of with respect
to .
Equivalently, its entries are the
unique scalars with When and , we call the
matrix of the operator with respect to ; the basis
is written in both slots even though it is the same one
on each side.
In words, clause by clause:
- The input basis is the subscript, the
output basis is
the superscript. The subscript sits next to
where the input goes, as in
below.
- Columns correspond to input basis
vectors, so there are of them;
rows correspond to output basis
vectors, so there are . The size is
“”, the same order as
for
.
- Column
answers one question: where does
go?
Well-definedness. Each lies in , and is a basis, so
exists and is unique by Theorem 1.5.1. So
the matrix is determined by , , and . It is
not determined by alone: change either
basis, or even the order of the vectors
in one of them, and the matrix changes. That is why the
bases are ordered.
Example
(Differentiation on Cubic Polynomials)
Let and . Find for
, and for
regarded as an
operator on .
Solution. The images of the input
basis are ,
, , . In their coordinates
are ,
, , ; in the same vectors
have a fourth coordinate . So The same rule gives a or a matrix,
depending on the codomain we declare. The superdiagonal
records
“”.
Example
(Matrix Maps and the Identity)
- (a) Let ,
and let ,
be the
standard bases of , . Show that .
- (b) Let be any basis of an
-dimensional space
. Find and
the matrix of the zero map for any bases.
Solution.
(a) The -th column of
is , since coordinates in the standard
basis of are
the entries themselves; and is the -th column of (Theorem 0.9.3). So the
matrix of a matrix map in the standard bases is the
matrix we started with.
(b) , so the -th column of is
, and
. The zero map sends every to , whose
coordinates are all , so its matrix is the
zero matrix of size , whatever the bases. These
degenerate cases fix the expectations “identity map,
identity matrix” and “zero map, zero matrix”. The first
needs the same basis on both sides, as
the warning below shows.
Example
(The Transpose Map)
Let , , and let . Find
.
Solution. is linear by Theorem 0.9.5. Its
values on the basis are ,
, , . In
, these have
coordinates . So A map on a space of matrices is
described by a matrix, because . Do not
confuse the matrix that acts on with the matrix
that describes .
Example
(A Reflection in Two Bases)
Let be the reflection across the line , . Find
for the standard basis , and for
with and
.
Solution. and ,
so .
The vectors are independent (neither is a
multiple of the other), hence a basis of by Theorem 1.6.4. The
first lies on the mirror line and the
second is perpendicular to it: and . So In the basis adapted to the geometry, the
reflection is visibly “keep one direction, flip the
other”. The same map has a diagonal matrix in one basis
and a nondiagonal one in another. How the two matrices
are related is the subject of the next section.
The matrix also works in reverse: from alone
we can recover .
Take . Its coordinates in solve , that is, and , so , that is, . By linearity, . The columns of say
and , so , which is indeed at . In coordinates,
we turned
into ; the next subsection proves that
this “coordinates in, multiply, combine out” recipe
always works.
Here is a nonexample by minimal change. In Example (Differentiation on Cubic Polynomials),
write the coordinate vectors as
rows instead of columns. The numbers
are the same, but the result is the matrix , and it cannot even be
multiplied by the coordinate vector of
an input polynomial. The clause that fails is “the -th
column is ”.
Why this definition. Why columns,
and why coordinates in ? Because these are
the choices under which “apply ” becomes “multiply by
the matrix”, as the computation above
suggested; we prove this next. With rows, we would get
the transpose, and the natural formula would fail. The
convention that the input basis is the subscript is
chosen to make that formula easy to read: the of the matrix sits
next to the of
the vector.
Warning. Three ways to get
a matrix of a map wrong. (1) Columns,
not rows. The -th
column is ,
as in the nonexample above. (2) Order
matters. In Example (A Reflection in Two Bases),
reordering the standard basis as
leaves the matrix unchanged, but reordering
as
gives . (3) Input subscript,
output superscript. and
are different objects, and for with
only one
of them makes sense. Also when : for and in , .
Quick check. What is the size of
for a linear map ? And
what is the first column of
for , , with and
the
standard basis of ?
Solution.
and , so the matrix is : rows for the
codomain, columns for the domain. For the second map,
the first column is the coordinate vector of the image
of the first basis vector : , so the
column is .
The
fundamental square
Here is the promise behind the definition: once
coordinates are taken on both sides, applying is
multiplying by its matrix.
Theorem
4.1.1 (Coordinates of an Image)
Let and be finite-dimensional
vector spaces over with ordered bases
and , and let
.
Then for every , Moreover, is the
only matrix
with for all .
The statement says that the following square
commutes: starting from in the top-left
corner, the two routes to the bottom-right corner give
the same column.
The top row is the abstract world, where acts on vectors of
. The bottom row
is the matrix world, where a matrix acts on columns. The
vertical arrows are the coordinate isomorphisms of Corollary 2.5.5, so
nothing is lost going down or coming back up.
Right then down (apply , then take coordinates)
equals down then right (take
coordinates, then multiply by the matrix).
Idea. Both sides are linear in
, so it is
enough to check the formula on the basis vectors , and there it
is the definition: , and multiplying a matrix by picks out its
-th column, which
was defined to be .
Written out for a general , this becomes a
one-line chain. Uniqueness uses the same observation
backwards: any
that works must have
as its -th
column.
Proof. Let and , so that . Since is linear, Theorem 2.1.4 gives
. Since taking
coordinates respects sums and scalar multiples (Theorem 1.5.2),
where the middle equality is Theorem 0.9.3 applied
to the columns
of .
For uniqueness, suppose
satisfies for all . Taking ,
whose coordinate vector is , the -th column of is (Theorem 0.9.3), which
is the -th column
of . Hence
. This proves the theorem.
This is the dictionary that lets us “write down a
matrix first”. A question about (its kernel, its image,
a preimage) becomes a question about a matrix, which
Chapter 3 taught us to answer by row reduction; the
coordinate isomorphisms carry the answer back.
Example
(Kernel and Image Through a Matrix)
Let , . Find and decide whether
is surjective, by
working with the matrix of in the bases and the
standard basis of .
Solution. Write down the
matrix. , , , so Solve in the matrix world.
Subtracting the first row from the second gives , so
means and
: . Both rows are pivot rows, so .
Translate back. By Theorem 4.1.1,
exactly when (the only vector with zero coordinates
is ). The
coordinate vector belongs to . So as a check confirms: vanishes at and . By Theorem 2.3.1, , so by Theorem 1.6.8, and
is surjective:
any two values , can be
prescribed.
Composition
is matrix multiplication
In Chapter 0, §9 we asked why matrices are multiplied
row-against-column. The answer given there was
substitution. If and
, with then substituting gives , and the
table of the combined substitution turned out to be
. At the time
we promised that this fact would become a statement
about linear maps. We can now say what it is. Each
substitution is a linear map, and , and
substituting one into the other is
composing them: . So the Chapter 0
computation says . Here is the general statement, for
arbitrary spaces and bases.
Theorem
4.1.2 (Matrix of a Composition)
Let be
finite-dimensional vector spaces over with ordered bases
, , respectively. Let
and
.
Then
Notice how the notation checks itself: the middle
basis appears
as the output of
and the input of ,
and it “cancels”, leaving below and above. The order of
the factors is the order of the maps: the map applied
first is on the right, in both and the product.
Idea. Glue two commutative squares
side by side. The left square is with its matrix, the
right square is
with its matrix, and they share the middle column . Going
along the top from to is ; going along the
bottom is multiplication by
followed by multiplication by , which
is multiplication by their product. The big rectangle
commutes because both small squares do, and the
uniqueness part of Theorem 4.1.1
identifies the product as the matrix of .
Proof. Let and , and let . Applying
Theorem 4.1.1
first to and the
vector ,
then to and , where the last equality is associativity of
matrix multiplication (Theorem 0.9.4). The
map is linear
(Theorem 2.4.2), and
the
matrix
satisfies
for every . By the uniqueness part of Theorem 4.1.1, it
equals . This
proves the theorem.
This is the payoff of the hook in Chapter 0, §9 (Definition 0.9.9). The
row-times-column rule was not an arbitrary convention:
it is the only rule under which the
matrix of a composition is the product of the matrices,
because composing linear maps is substituting one
coordinate formula into another. Everything Chapter 0
proved about matrix multiplication now has a meaning for
maps, and conversely:
Example
(Multiply by ,
Then Differentiate)
Let , , and , , with the
monomial bases and . Compute
and ,
both directly and as products.
Solution. Matrices of the
factors. , , , and was
found in Example (Differentiation on Cubic Polynomials):
Products. By Theorem 4.1.2,
Directly. for , giving the diagonal . And for , with , giving the diagonal . Both
computations agree. The two composites are not even the
same size: is an
operator on and
an operator on .
For operators, the theorem applies with , and
gives powers and polynomials.
Corollary
4.1.3 (Matrices of Powers and
Polynomials)
Let be a basis of a
finite-dimensional space , let , , and . Then , , , for , and
For example, with
from Example (Differentiation on Cubic Polynomials),
, recovering Example (Differentiation Is Nilpotent)
in matrix form.
Linear maps
are matrices
The sums in Corollary 4.1.3
work between different spaces too, and together with the
construction of maps from values on a basis they show
that, after choosing bases, there is no difference at
all between linear maps and matrices.
Theorem
4.1.4 ()
Let and be finite-dimensional
vector spaces over with ordered bases
and . Then the map
is an isomorphism. In particular, .
Idea. Three things to check.
Linear: columns of are
coordinates of , and coordinates respect sums.
Injective: a map whose matrix is zero kills
every basis vector, so it is the zero map.
Surjective: a matrix prescribes the value of
each ,
and a linear map with prescribed values on a basis
exists. The last two are the uniqueness and existence
halves of the same theorem about bases, which is why a
linear map is “nothing but” its values on a basis.
Proof. Linear. Let and
. By Definition 2.4.1 and
Theorem 1.5.2, the
-th column of
is , and that of is
. Hence and .
Injective. Suppose . Then , so
for every . The
zero map also sends every to , so by the uniqueness
part of Theorem 2.1.5. Hence
,
and is
injective by Theorem 2.2.3.
Surjective. Let . By the existence part of Theorem 2.1.5 there is
with for
each . By Definition 4.1.1,
.
So is a
bijective linear map, an isomorphism by Theorem 2.5.1. For the
dimension, we cannot quote Theorem 2.5.4
directly, since we do not yet know that is
finite-dimensional. Instead, has a
basis of matrix
units (Example (Dimensions of the Running Examples)),
and the inverse isomorphism carries it to a
basis of
of length (Theorem 2.5.2, applied
to , which
is an isomorphism by Theorem 2.5.3). Hence
. This proves the theorem.
With Theorem 4.1.2,
the isomorphism also turns
composition into multiplication. So, for and , the algebra
of the
previous sections and the algebra of Chapter 0 are
the same algebra, written in two languages. The
dictionary depends on the basis, as every isomorphism to
does.
Reading
rank and invertibility from a matrix
Chapter 3 developed tools for the rank and the
invertibility of matrices. The square of Theorem 4.1.1
transfers all of them to linear maps.
Theorem
4.1.5 (Rank and Invertibility from the
Matrix)
Let and be finite-dimensional
vector spaces over with ordered bases
and , let , and let
.
- (a) The coordinate
map restricts to an
isomorphism , and the coordinate map restricts to an
isomorphism . Hence
- (b) Suppose . Then
is invertible if
and only if is
invertible, and in that case .
Idea. For (a), the commutative
square says a vector is killed by exactly when its
coordinate column is killed by , and the outputs of
, in coordinates,
are exactly the outputs of . Isomorphic subspaces
have the same dimension. For (b),
translates, by the composition theorem, into a matrix
equation with
on the right; conversely an inverse matrix is the matrix
of some map, by the isomorphism ,
and that map is the inverse of .
Proof. Let and , and write
and for the coordinate
isomorphisms (Corollary 2.5.5).
- (a) Kernel.
For :
if and only if if and only if (since is injective) if
and only if (Theorem 4.1.1) if
and only if . So maps into , and every is
for
some
(surjectivity of ), which then lies
in . Thus the
restriction of is a linear map
, injective because is, and
surjective. By Theorem 2.5.1 it is an
isomorphism.
Image. By Theorem 4.1.1,
for every . As runs over , runs
over all of , so
(Definition 3.5.1).
So the restriction of is a linear map
,
surjective by this computation and injective because
is; hence
an isomorphism.
The subspaces involved are finite-dimensional (Theorem 1.6.7), so
Theorem 2.5.4 gives
and , which are the stated
equalities by Definition 2.3.1, Definition 2.3.2, Definition 3.5.5,
and Definition 3.5.4.
- (b) Suppose
is invertible. By
Theorem 4.1.2 and
Example (Matrix Maps and the Identity)
(b), So is
invertible with (Definition 0.9.13).
Suppose is
invertible. By Theorem 4.1.4
(for with
bases and ), there is with
. Then by Theorem 4.1.2,
. Since
is injective on (Theorem 4.1.4),
. By Theorem 2.5.6, is invertible with
. This
proves the theorem.
So we may add one more item to the Invertible
Operator Theorem (Theorem 2.5.7): for
and
any basis of , is invertible if and
only if is
invertible. Every item of the Invertible Matrix Theorem
(Theorem 3.4.4) now
becomes a test for operators.
The first thing the square buys is a way to compute a
kernel and an image for a map given by a matrix: the two
subspaces are the null space and the column space, and
elimination finds them.
Example
(A Matrix Map)
Let . Find bases of and for , and decide whether is injective or
surjective.
Solution. By definition, (Definition 3.5.3)
and (Definition 3.5.1).
So Chapter 3’s methods apply directly. Row reduce: This is the RREF, with pivot columns and and free columns and . By Theorem 3.5.4, a
basis of
is By Theorem 3.5.2, the
pivot columns of
form a basis of : .
Since , is not injective (Theorem 2.2.3); for
instance . Since , , so is not surjective
(Theorem 2.2.2).
Example
(Rank of )
Let , , and . Find
,
use it to find , a basis of , and a basis of , and decide whether
is invertible.
Then do the same for the transpose map of Example (The Transpose Map).
Solution. Matrix. ,
, . So
Matrix world. Subtracting row 2 from
row 3 turns row 3 into a zero row; moving it to the
bottom gives an echelon form with three nonzero rows and
pivots in columns 1, 2, 4. So and . The free
column is column 3, and
gives , , so . By Theorem 3.5.2, the
pivot columns , , form a basis of .
Translate back. By Theorem 4.1.5,
. The
column is the coordinate vector of , so
, the skew-symmetric
matrices. The basis of translates to
, , , a basis of
, which is
therefore the space of symmetric matrices. Since ,
is not
invertible (Theorem 3.4.4), and
neither is .
Transpose. The matrix from Example (The Transpose Map)
satisfies (swapping two coordinates twice does
nothing). So is
invertible with , and by Theorem 4.1.5 (b)
the transpose map is invertible and is its own inverse,
which is again.
We now have both halves of the working method: a
basis turns spaces into and maps into
matrices, and every computation can be done with Chapter
3’s tools. What we have not yet controlled is the
choice. Example (A Reflection in Two Bases)
shows that one map can have a complicated matrix in one
basis and a diagonal one in another; the next section
finds the formula relating the two.
Exercises
A. Check your
understanding
Exercise
(A1)
- (a) Define for
and
ordered bases
of , of .
- (b) State the
formula relating
and ,
and the formula for the matrix of a composition.
- (c) True or false:
the -th
row of is
.
Justify your answer.
- (d) True or false:
for any two bases , of an -dimensional space . Justify your
answer.
- (e) What is ?
Solution.
(a) If , then is the
matrix whose -th
column is
(Definition 4.1.1).
(b) (Theorem 4.1.1),
and (Theorem 4.1.2).
(c) False. It is
the -th
column. For in Example (Differentiation on Cubic Polynomials),
is the second column, while the second row
is .
(d) False. In
with and , , so the first column of is
. It is true when (Example (Matrix Maps and the Identity)
(b)).
(e) , by Theorem 4.1.4.
B. Practice
Exercise
(B1: Matrices in given bases)
Find the matrix of each operator in the given basis.
(Both maps are linear; you may take this as given.)
- (a) , , in .
- (b) , with , in .
Solution.
- (a) , ,
. Their coordinates are , , , so
- (b) Multiplying
by a matrix unit
on the
right keeps column of and moves it to column
: Reading entries in the order gives the columns , , , , so
Exercise
(B2: Recovering a map from its matrix)
Let , a basis of , and let
be the
standard basis of . A linear map has Find . Hence find a basis of .
Solution. First find the
coordinates of in : , so , unique by Theorem 1.5.1. By Theorem 4.1.1,
and since coordinates in are the entries,
Hence if and only if and , that is,
. So is a basis of . Check: , and .
Exercise
(B3: A composition computed two ways)
Let , , and , . Use the monomial bases and the
standard basis of . Compute the matrix
of directly, and
again as a product of the matrices of and .
Solution. Let , , and
the
standard basis of .
Factors. , , so . , , , so .
Product. By Theorem 4.1.2,
Directly. and
, so the columns are and , in agreement. In
words, .
C. Going deeper
Exercise
(C1: Upper triangular matrices and invariant
subspaces)
Let be
finite-dimensional and . A subspace of is -invariant if
for
every . Let be a basis of
, and for let . Prove that is
upper triangular if and only if every is -invariant.
Solution. Let , so with unique coefficients (Definition 4.1.1).
By Definition 0.9.5,
is upper triangular if and only if whenever , that is, if and
only if Indeed, if for , then ;
conversely, if , then by
uniqueness of coordinates for .
Assume , and
fix . For , . Let . Then
by Theorem 2.1.4, a
combination of vectors of the subspace , so by Theorem 1.3.1. Hence
is -invariant.
Assume every is
-invariant. For
each , , so
by invariance of . This is , so is
upper triangular.
Exercise
(C2: Integrating with a matrix)
Let , , , and let inside the real vector
space of all functions (Example (The Standard Vector Spaces)
(d)).
- (a) Prove that is
a basis of .
- (b) Show that
differentiation maps into , and find for
, .
- (c) Hence show that
is invertible on
, and use
to find a function with .
Hint: for (a), divide a vanishing combination by
and count
roots.
Solution.
(a) spans by definition. Suppose
, the zero function. Then
for every , and , so the polynomial vanishes at
every real number. It has infinitely many roots, so it
is the zero polynomial by Lemma 3.7.2, and
.
Hence is
independent, and a basis of .
(b) By the
product rule, Each lies in , and is linear, so maps every combination
of
into (Theorem 2.1.4).
Reading off coordinates as columns,
(c) The matrix is
upper triangular with nonzero diagonal entries, and one
checks directly that so is
invertible with this inverse (Theorem 3.4.5). By
Theorem 4.1.5
(b), is
invertible on and
. We want . Since
, Theorem 4.1.1
gives so . Check: . No integration by parts was
needed.