Chapter 2: Linear maps and matrices
2.3Matrices of linear maps
By Theorem 2.2.1, a linear map is determined by its values
Throughout this section, and are vector spaces over with bases of and of , where , unless other bases are named. (We leave out the zero space, because matrices with no rows or no columns are not defined in Definition 1.2.7.)
2.3.1The matrix of a linear map
Definition 2.3.1 (Matrix of a linear map). 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 scalars with
For an operator , the matrix of with respect to is .
The matrix is well defined, since each has exactly one coordinate vector with respect to the basis (Definition 1.6.14).
The matrix has one column for each vector of and one row for each vector of , so its size is (length of ) (length of ). Column records where sends the -th basis vector of the domain, written in the coordinates of the target, and the entry is the coefficient of in . To keep the indices straight, imagine written above the columns and written to the left of the rows. The target basis comes first in so that the two copies of sit next to each other in the formula
In particular, for a linear map , the matrix with respect to the standard bases of and has the columns
(a)Let ,
, the map of Example 2.1.7. Then , , and , so This is the matrix of Example 2.1.7: the coefficient of the -th variable in the -th coordinate of is the entry in row and column . Proposition 2.3.17 shows that this always happens.
(b)The rotation of by the angle (Example 2.1.11) sends to and to , so
Example 2.3.4 (Differentiation). Let . Every element of is for exactly one triple (Definition 1.2.13, Definition 1.2.16), so is a basis of and
whose coordinate vectors are , , and ,
Over the entry is . The domain and the target can also be different spaces. Regarded as a map , with the bases and , differentiation has the matrix
Strictly speaking these are two different linear maps, since their domains differ.
Example 2.3.6 (The zero map and the identity map). The zero map sends each to , whose coordinate vector is . So is the zero matrix, for all bases. The identity map sends to
Here the same basis is used on both sides. Section 2.3.5 shows that looks quite different when .
Uses. Definition 2.3.1 (Matrix of a linear map), Notation 2.3.2 (The standard basis ), Example 2.1.9 (Maps of polynomials)
The coordinates of are and , which are linear in (Example 2.1.9), so
The list is a basis:
The same map has two different matrices. In the second basis the coordinates of are exactly its values at and .
2.3.2The matrix–vector product
Suppose we know and the coordinates
Intuition (Computing ). Since
The right side is the linear combination of the columns of whose coefficients are the entries of . Realize that it no longer mentions , the spaces and , or the bases: it is computed from the matrix and the column alone. So it is an operation on a matrix and a column, and we give it a name.
Definition 2.3.8 (Matrix–vector product). Let have columns , and let
It is defined only when the number of columns of equals the number of entries of , and then has as many entries as has rows.
In words, is the linear combination of the columns of with coefficients . With this definition, the computation above becomes a theorem.
Theorem 2.3.9 (The matrix of a map computes the map). For every and every ,
Uses. Definition 2.3.1 (Matrix of a linear map), Definition 2.3.8 (Matrix–vector product), Definition 1.6.14 (Coordinates), Proposition 1.6.19 (Coordinates respect linear combinations), Definition 2.1.1 (Linear map)
Let
since the -th column of is (Definition 2.3.1). □
So to evaluate in coordinates, take the -coordinates of , multiply by the matrix, and read the result as -coordinates. Another way to say this: there are two routes from a vector to a column in . One applies and then takes -coordinates; the other takes -coordinates and then multiplies by . Theorem 2.3.9 says that the two routes always arrive at the same column (Figure 2.3.1). In terms of maps,
You have probably met the product before, defined by a formula for its entries. The point here is that its definition is not a convention. Once we record vectors by their coordinates and linear maps by the columns , only one product makes Theorem 2.3.9 true. In fact, the special case of the standard bases already forces it.
Proposition 2.3.10 (The product is forced). Suppose that for all we are given a rule that assigns to each and a vector , such that
Then for all and .
Since and , the hypothesis is exactly Theorem 2.3.9 for and with their standard bases, with in place of the product.
Uses. Corollary 2.2.17 (Linear maps out of ), Definition 2.3.1 (Matrix of a linear map), Notation 2.3.2 (The standard basis ), Definition 2.3.8 (Matrix–vector product)
Techniques. Uniqueness via two candidates (Technique 1.1.8)
Let have columns , and let
□
Matrix multiplication arises the same way in Section 2.4: it is the only product of matrices for which the matrix of a composite is the product of the matrices (Theorem 2.4.2).
The definition describes one column at a time. The familiar formula for its entries is a consequence.
Proposition 2.3.11 (Entries of ). Let
Uses. Definition 2.3.8 (Matrix–vector product), Definition 1.2.4 (The space )
This is the row-times-column rule: the -th entry of pairs row of with , multiplying entries in matching positions and adding. So there are two ways to read . By columns, it is a linear combination of the columns of , and this is the view to remember for proofs. By rows, it is a list of numbers, each computed from one row of . This is usually quicker by hand, and it is how Section 3.1 reads a system of equations.
Example 2.3.12 (A product computed two ways). Let and . By columns,
By rows, the first entry is
- (a)
. - (b)
. - (c) for , and .
Uses. Definition 2.3.8 (Matrix–vector product), Definition 1.2.7 (Matrices), Definition 2.3.5 (Identity matrix), Definition 1.2.4 (The space )
(a) The vector has entries (Definition 1.2.4), so by Definition 2.3.8 and the vector space axioms of ,
(b) Let be the -th column of . Matrices are added and scaled entrywise (Definition 1.2.7), so the -th column of is . Hence
(c) The entries of are except for a in position , so
Part (c) says that multiplying by picks out the -th column. It is the quickest way to get information about out of the products .
Exercise 2.3.14. Compute each product by columns and by rows.
- (a) over .
- (b) over .
Uses. Definition 2.3.8 (Matrix–vector product), Proposition 2.3.11 (Entries of )
(a) By columns, in ,
By rows, the first entry is and the second is .
(b) By columns,
using . By rows, the entries are and
2.3.3Matrices as linear maps
Fixing the matrix and letting the vector vary turns the product into a function.
Definition 2.3.15 (The linear map of a matrix). For , the map is
The map is linear by Proposition 2.3.13(a). By Proposition 2.3.11, the -th coordinate of is
Uses. Definition 2.3.1 (Matrix of a linear map), Definition 2.3.15 (The linear map of a matrix), Proposition 2.3.13 (Linearity of the product), Notation 2.3.2 (The standard basis )
Uses. Theorem 2.3.9 (The matrix of a map computes the map), Notation 2.3.2 (The standard basis ), Proposition 2.3.13 (Linearity of the product)
Techniques. Uniqueness via two candidates (Technique 1.1.8)
Existence. Let . Its columns are
So .
Uniqueness. Suppose for some . By Proposition 2.3.13(c), for each the -th columns of and are
So and have the same columns, and . □
Together with Proposition 2.3.16, this says that and are inverse bijections between and . Two consequences are worth spelling out. First, the linear maps are exactly the maps given by linear formulas, which makes precise the rule of thumb at the end of Section 2.1.3. Second, finding the matrix of a linear map requires no formula at all: compute
Exercise 2.3.18. For each linear map , find the matrix with .
- (a),
. - (b), the projection
onto the -plane. - (c),
. - (d), the linear map with and . What is ?
Uses. Proposition 2.3.17 (Every linear map is some ), Definition 2.3.8 (Matrix–vector product)
By Proposition 2.3.17, is the matrix with columns
(a) , , and , so .
(b) , , and , so .
(c)
(d) . By Definition 2.3.8,
Example 2.3.19 (Projection and reflection). Let be the line in . It passes through at the angle with and , so , , , , and . By the formulas of Example 2.1.11, the projection onto and the reflection across satisfy
These are the columns of their matrices:
The plane transformer below shows the reflection. Its panel displays the matrix , and its two handles are the columns and , that is, the images of and . Dragging a handle changes one column of and leaves the other alone, and the whole grid follows, because
For general and the same holds once the bases are fixed: a linear map is determined by its matrix, and every matrix of the right size is the matrix of some linear map.
- (a)If and
, then . - (b)For every there is a with .
Proof (via lists).
Uses. Theorem 2.2.1 (Linear maps are determined by a basis), Definition 1.6.14 (Coordinates), Definition 2.3.1 (Matrix of a linear map)
(a) Suppose
(b) Let be the columns of , and let
Proof (via coordinates).
Uses. Theorem 2.3.9 (The matrix of a map computes the map), Example 2.1.8 (Coordinates), Proposition 1.6.19 (Coordinates respect linear combinations), Definition 2.3.15 (The linear map of a matrix), Proposition 2.1.17 (Compositions of linear maps are linear)
Techniques. Assemble linear maps from linear pieces (Technique 2.1.26)
Let be the linear map
(a) Let
and applying gives .
(b) Define , that is,
so the -th column of is the -th column of . □
The second proof shows what an arbitrary linear map looks like through coordinates. By (a), every is the map built in (b) from its own matrix: with . Read from right to left, this says: take coordinates, multiply by the matrix, and turn the resulting coordinates back into a vector. In Section 2.4 we will see that the bijection also respects addition and scalar multiplication and turns composition into matrix multiplication. So and are isomorphic vector spaces (Section 4.5).
Exercise 2.3.21. Let and , both bases of , and let be the operator with
Find , and find .
Uses. Definition 2.3.1 (Matrix of a linear map), Theorem 2.3.20 (Linear maps correspond to matrices), Theorem 2.2.1 (Linear maps are determined by a basis)
is a basis, since
(By Theorem 2.3.20, this is the only operator with the given matrix.) In the basis , has coordinates and has coordinates , so
2.3.4Different bases, different matrices
The matrix depends on three things: the map , the basis , and the basis . Changing either basis, even by reordering it, can change the matrix, and one map can have matrices that look nothing alike.
Example 2.3.22 (Differentiation in four bases). Let , and let be differentiation, as in Example 2.3.4.
(a)For , we found
(b)Reverse the order: . Now , , and have the -coordinates , , and , so
The vectors are the same as in (a), but a basis is a list, and its order matters.
(c)Suppose that in , and let . This is a basis, since
, with only these coefficients possible. Now , so Each basis vector goes to the one before it, and the first goes to .
(d)Keep the assumption , and use different bases on the two sides: in the domain and in the target. Then , , and have the -coordinates , , and , so
Intuition (One basis or two). The matrix in (d) is the matrix of the projection
For an operator , comparing with only makes sense in a single coordinate system, so we use the same basis on both sides, and then more survives. Let be any of the three matrices in (a)–(c), with its basis . Applying Theorem 2.3.9 three times,
for every , and since every is for some , multiplying by three times kills every vector. You can check this directly for each . The matrix in (d) does not have this property: it fixes . Properties of an operator that are visible in its matrix in every basis are studied in Section 4.5, under the name of similarity.
Example 2.3.23 (Maps of the plane in adapted bases). Let be the line , as in Example 2.3.19, and let with on and perpendicular to (since ). This is a basis of : the equations and have exactly one solution, and .
The projection fixes and sends to , and the reflection fixes and sends to . (With the matrices of Example 2.3.19: and
compared with and in the standard basis. In the adapted basis, the matrices show what the maps do.
The rotation has . In the reversed standard basis , the vector has coordinates and has coordinates , so the matrix becomes . That is the standard matrix of the clockwise rotation : reordering the basis reverses the orientation of the coordinate system. In the basis , on the other hand,
Two lessons. First, a matrix alone does not determine a map; only the matrix together with the bases does (Theorem 2.3.20). For instance is , and it is also the standard matrix of the reflection across the -axis. Second, choosing a basis adapted to the map is how one understands it. If some basis consists of vectors that sends to multiples of themselves, the matrix of in that basis is diagonal. This is how Example 2.2.3 built and in the first place (Technique 2.2.4), and finding such bases is the subject of Section 7.4.
2.3.5The identity map in two bases
By Example 2.3.6, for every basis . With two different bases, the matrix of the identity map is a different matrix, and it can look like almost anything. What it does is given by Theorem 2.3.9: for any two bases and of ,
That is, the matrix of the identity converts -coordinates into -coordinates.
Example 2.3.24 (The identity in two bases). Let be a field with , and let , a basis of (Example 2.2.3). The columns of are the standard coordinates of and , which are these vectors themselves. The columns of are the -coordinates of
For
The example generalizes in one direction. For any basis of , is the matrix whose columns are , because . The other direction, , requires solving for coordinates.
Uses. Definition 2.3.1 (Matrix of a linear map), Definition 2.3.5 (Identity matrix), Definition 1.6.14 (Coordinates)
By Definition 2.3.1, the -th column of is , and the -th column of is . Since a vector is determined by its coordinates (Definition 1.6.14), holds if and only if
So if and only if for every .
2.3.6Translating between maps and matrices
The results of this section give a dictionary between linear maps of spaces with chosen bases and matrices.
- A vector corresponds to its coordinate vector , and a map to its matrix .
- The value corresponds to the product (Theorem 2.3.9), and the value on a basis vector to the -th column.
- Two maps are equal if and only if their matrices are (Theorem 2.3.20).
- For and with the standard bases, corresponds to the unique with (Proposition 2.3.17), and corresponds to .
Technique 2.3.27 (Translate between maps and matrices). A linear map between spaces with chosen bases and its matrix carry the same information, so a question about one can be translated into a question about the other, using the dictionary above.
In one direction, to compute with a linear map, replace vectors by their coordinate vectors and the map by its matrix. Evaluating becomes a matrix–vector product, and an equation becomes the linear system
Reach for the first direction when you need numbers, and for the second when a matrix identity would otherwise need a computation with indices. A rule of thumb: compute with matrices, prove with maps. Before translating, fix the bases and keep track of which basis each coordinate vector refers to; most errors come from mixing them up. The canonical example is Example 2.3.28. Later instances: matrix multiplication is defined by translating composition (Section 2.4), the rank of a matrix is the rank of its map (Section 4.2), and the determinant and the eigenvalues of an operator are read off from its matrix in any basis (Section 5.4, Section 7.3).
Used in 36 places and 4 practice exercises
Exercise 2.3.32, Exercise 2.3.35, Exercise 2.3.42, Theorem 2.4.2, Proposition 2.4.14, Proposition 2.5.20, Exercise 2.5.22, Proposition 2.6.20, Corollary 2.7.16, Exercise 2.8.8, Exercise 2.8.13, Problem 2.2, Problem 2.13, Problem 3.12, Theorem 4.1.1, Proposition 4.1.31, Theorem 4.2.11, Proposition 4.2.15, Proposition 4.5.12, Proposition 4.5.16, Theorem 4.5.17, Theorem 4.5.25, Proposition 4.5.27, Proposition 5.4.20, Theorem 6.6.15, Proposition 6.6.18, Exercise 6.6.46, Corollary 7.3.13, Theorem 7.4.2, Proposition 7.5.25, Proposition 8.1.7, Corollary 8.1.11, Theorem 8.4.4, Proposition B.1.18, Exercise B.1.41, Exercise B.1.42; 4 practice exercises.
(a)From maps to matrices. We find all with
. The map , , is linear, being the difference of the substitution map of Exercise 2.1.32 and the identity (Technique 2.1.26). With , so
By Theorem 2.3.9, satisfies if and only if
. By Proposition 2.3.11 this is the system , , , whose solutions are , , and arbitrary. So the solutions are This gives a formula for sums. For and every number ,
so the sum telescopes:
- (b)From matrices to maps. Let , and suppose that for every the vector is a scalar multiple of . We show that for some . The hypothesis says that for every . By Exercise 2.1.48, for some . Now
by Proposition 2.3.13, so . Hence , and by the uniqueness in Proposition 2.3.17. A direct proof with entries is possible, but it would repeat the argument of Exercise 2.1.48 in coordinates.
Exercises
Exercise 2.3.29. Let ,
- (a)Find .
- (b)Check Theorem 2.3.9 for by computing both sides.
Uses. Definition 2.3.1 (Matrix of a linear map), Theorem 2.3.9 (The matrix of a map computes the map), Definition 2.3.8 (Matrix–vector product)
Since
the -coordinates of are , , and :
(a) has -coordinates , and has -coordinates . So
(b) Since
On the other side, , whose -coordinates are
Exercise 2.3.30. Find the error in the following computation, and correct it.
Let , a basis of , and let . The matrix relates the two bases, so the -coordinates of are
Uses. Theorem 2.3.9 (The matrix of a map computes the map), Example 2.3.24 (The identity in two bases)
The answer is wrong:
To go from standard coordinates to -coordinates, use
Check:
Exercise 2.3.31. Find the error in the following argument.
Claim. Let be any field. If satisfies and , then .
Proof. The maps and agree on the vectors and , which form a basis of . Two linear maps that agree on a basis are equal, so , and by Proposition 2.3.17.
Uses. Example 2.2.3 (Building maps from a convenient basis), Corollary 2.2.6 (Agreeing on a spanning list), Proposition 2.3.17 (Every linear map is some )
The error is the claim that is a basis of for every field. It is a basis when (Example 2.2.3), but over we have , so the two vectors are equal and the list is linearly dependent. Then the hypothesis says only that , and the claim fails: over ,
so satisfies both hypotheses and . In general exactly when . When the argument is correct as written, by Corollary 2.2.6 and Proposition 2.3.17.
Exercise 2.3.32. Let
- (a)Find for and for .
- (b)Over , use the matrix to find all with .
- (c)Do the same over .
Uses. Definition 2.3.1 (Matrix of a linear map), Theorem 2.3.9 (The matrix of a map computes the map), Proposition 2.3.11 (Entries of ), Theorem 2.3.20 (Linear maps correspond to matrices)
Techniques. Translate between maps and matrices (Technique 2.3.27)
(a) , , , and
The entries are the binomial coefficients of Pascal’s triangle, reduced modulo in the second case.
(b) Let be the matrix over , and
so the condition is and , that is, and (in , means ). So the solutions are the four polynomials with . Check:
(c) Over the condition
so , then , then : only the constant polynomials satisfy . The difference between the two fields is the entry in row , column : over it forces , and over it vanishes, which lets through.
Exercise 2.3.33. Let ,
- (a)Find for .
- (b)Suppose in . Find a basis of with , and prove that it is a basis.
- (c)With as in (b), show that
for every . - (d)Show that over no basis with exists.
Uses. Definition 2.3.1 (Matrix of a linear map), Theorem 2.3.9 (The matrix of a map computes the map), Definition 1.6.1 (Basis), Definition 1.2.17 (Evaluation)
(a) , , and , so
(b) We need , that is, if and otherwise, for . Let
Evaluating the expanded forms: takes the values at (at : ), takes , and takes .
Spanning. Let and
Uniqueness. If
(c) By Theorem 2.3.9 and Proposition 2.3.13(c),
(This is also visible in the uniqueness argument.) In this basis, the coordinates of a polynomial are its values.
(d) Over , , so
Exercise 2.3.34. Let ,
- (a)Find bases and of with .
- (b)Show that there is no basis of with .
- (c)Find a basis of for which is diagonal.
Uses. Definition 2.3.1 (Matrix of a linear map), Definition 1.6.1 (Basis), Proposition 1.2.35 (Zero products)
Note that
(a) We need and . Take , a basis since
(b) Suppose is a basis with . The first column says . So is a value of , hence for some , and then
(c) Let . It is a basis:
With two bases the nonzero entry can be scaled to , as in (a); with one basis the factor by which stretches the line through cannot be changed. Such factors are the eigenvalues of Section 7.2.
Exercise 2.3.35. Regard as a vector space over with the basis .
- (a)For with , let , . Find .
- (b)Find the matrix of complex conjugation with respect to .
- (c)Show that a matrix is for some -linear if and only if for some .
Uses. Definition 2.3.1 (Matrix of a linear map), Exercise 2.1.5, Non-example 2.1.14 (Complex conjugation), Theorem 2.3.20 (Linear maps correspond to matrices)
Techniques. Translate between maps and matrices (Technique 2.3.27)
(a) is -linear (it is even -linear, Exercise 2.1.5), so it has a matrix with respect to . Since and
For this is the rotation matrix of Example 2.3.3: multiplying by a complex number of modulus rotates the plane.
(b) Conjugation is -linear (Non-example 2.1.14), with and , so its matrix is .
(c) Let be -linear. By Exercise 2.1.5, with , and is in particular -linear. Writing , part (a) gives
Exercise 2.3.36. Let and be vector spaces over with bases. Prove or disprove each statement.
- (a)If and
for some bases of and of , then . - (b)If and is the zero matrix for some basis , then .
- (c)If and for some bases of , then .
- (d)If and is diagonal for some basis , then is diagonal for every basis of .
- (e)There are bases of with .
Uses. Theorem 2.3.20 (Linear maps correspond to matrices), Example 2.3.6 (The zero map and the identity map), Example 2.3.23 (Maps of the plane in adapted bases), Definition 2.3.1 (Matrix of a linear map)
(a) False. Let be the line and as in Example 2.3.23. Then
(b) True. The zero map also has the zero matrix (Example 2.3.6), so , and by Theorem 2.3.20(a).
(c) False. Take with and , and . Then , so , but . In general, says exactly that for each , which describes the map sending one basis to the other.
(d) False. With as in (a),
(e) False. The columns of are and . If both are , then , so contains a vector twice and is linearly dependent, which is impossible for a basis.
Exercise 2.3.37. Let and . Describe how changes when the bases are modified as follows, and prove your answer. (Each modified list is again a basis; check this too.)
- (a)Two vectors and of are swapped.
- (b) is replaced by , where .
- (c)Two vectors and of are swapped.
- (d) is replaced by , where .
- (e) is replaced by , where and .
Uses. Definition 2.3.1 (Matrix of a linear map), Definition 1.6.14 (Coordinates), Definition 1.6.1 (Basis)
The modified lists are bases. Reordering a list does not change which combinations represent a vector, only the order of the terms, so (a) and (c) give bases. For (b),
so a vector has a representation in the new list exactly when it has one in the old, and the coefficients correspond one to one; the same goes for (d). For (e), write and for . Then
so the combination with coefficients in the new list equals the combination with coefficients in the old list, where for and . This correspondence between coefficient lists is a bijection (its inverse is for and ), so every vector has exactly one representation in the new list.
(a) The columns of the new matrix are in the new order, so columns and of are swapped.
(b) The new -th column is
(c) The coordinates of a vector with respect to the reordered basis are its old coordinates reordered in the same way. So in every column, the entries in positions and are swapped: rows and of are swapped.
(d) For each ,
so in the new basis the coordinates of are the old ones with the -th entry multiplied by . Row of is multiplied by , not by .
(e) For each , substituting ,
So row of is replaced by row minus times row , and the other rows are unchanged.
In the language of Section 3.2: changing the basis of the target performs row operations on the matrix, and changing the basis of the domain performs column operations. Note that in (d) and (e) the row operation undoes the operation on the basis, with the roles of the indices exchanged in (e): adding times to subtracts times row from row .
- (i) is upper triangular.
- (ii) for .
- (iii) for .
Uses. Definition 2.3.1 (Matrix of a linear map), Definition 1.6.14 (Coordinates), Proposition 2.1.16 (Linear maps preserve spans and linear relations), Proposition 1.4.14 (The span is the smallest subspace containing a list)
Techniques. Check it on a basis (Technique 2.2.7)
(i) (ii). Fix . The -th column of is
(ii) (iii). For ,
(iii) (ii). , so
For example, in Example 2.3.4 is upper triangular, because maps polynomials of degree at most to polynomials of degree at most . Upper-triangular matrices of operators return in Section 7.5.
Uses. Definition 2.3.1 (Matrix of a linear map), Example 2.1.9 (Maps of polynomials), Corollary 2.2.6 (Agreeing on a spanning list), Proposition 1.1.24 ( is a field if and only if is prime)
The -th column of is for and for . So for
In that case and
: no. For ,
: no. For ,
and : yes. In both fields and (in , ). Let
It is a basis of , since
and these coefficients are the only possible ones. Also , , , and , so . Over , and , so the basis is ; for instance .
So the answer depends on the field: the property , which every operator with matrix has, holds over and and fails over and .
Uses. Definition 2.3.1 (Matrix of a linear map), Example 2.3.6 (The zero map and the identity map), Theorem 2.3.20 (Linear maps correspond to matrices), Exercise 2.3.37
If . Then , whose coordinate vector is , so for every basis of length .
Conversely, suppose all the matrices with of length are equal. Fix a basis and let . If , then for some , so , and because both are linear and agree on the basis.
Let , and fix . Let be with replaced by ; it is a basis of length by Exercise 2.3.37(e) (with ). Since
So is with the -th entry replaced by .
Column . The -th vector of is , and
Column . The -th vector of is , and
So with . Since
Exercise 2.3.41. Lights out on a line. A row of lamps is controlled by buttons. Pressing button switches lamp and its neighbours (lamps and , when they exist) from on to off or from off to on. Record a configuration of the lamps as , with when lamp is on.
- (a)Let have when and otherwise. Show that pressing buttons in any order changes the configuration to , where is the number of times button was pressed, modulo .
- (b)Show that every configuration can be switched off completely if and only if is not of the form .
Uses. Definition 2.3.8 (Matrix–vector product), Proposition 2.3.11 (Entries of )
(a) Pressing button switches exactly the lamps with , that is, it adds to the vector with in these positions, which is the -th column of . A sequence of presses adds the corresponding columns, and since addition in is commutative, the order does not matter. Since in , pressing button a total of times adds if is odd and nothing if it is even. So the configuration becomes
(b) By (a), can be switched off exactly when for some , that is, when (in , ). By Proposition 2.3.11, with the convention , this system reads
Propagation. Given and a choice of , set and define by
Comparing the two choices. Let and be the sequences propagated from and , and let . Then , , and
If , then
If , then , so for each the system has either two solutions or none. Each of the vectors solves the system for exactly one , namely . So the solvable configurations number
For example, for the matrix is , both buttons switch both lamps, and the configuration cannot be switched off.
Uses. Example 2.3.28 (Translating in both directions), Theorem 2.3.9 (The matrix of a map computes the map), Proposition 2.3.11 (Entries of )
Techniques. Translate between maps and matrices (Technique 2.3.27)
With , we have , , , and , so
For
So , , , and is arbitrary:
(Indeed
For
Summing over , the right side telescopes:
For : .
Exercise 2.3.43. For let be the sum of its entries, and let .
- (a)Show that for every if and only if the entries of each column of add up to .
- (b)Show that
if and only if the entries of each row of add up to . - (c)Let , and suppose that all entries of are nonnegative and each column adds up to . Show that if the entries of are nonnegative and add up to , then the entries of are also nonnegative and add up to .
Uses. Definition 2.3.8 (Matrix–vector product), Proposition 2.3.11 (Entries of ), Proposition 2.3.13 (Linearity of the product)
The map is linear, since
(a) Let be the columns of . By Definition 2.3.8 and linearity of ,
If for every , this is . Conversely, if for all , take : by Proposition 2.3.13(c),
(b) By Proposition 2.3.11, the -th entry of is , the sum of the entries of row . So
(c) By Proposition 2.3.11, the -th entry of is , a sum of products of nonnegative numbers, hence nonnegative. By (a), the entries of add up to . Vectors with nonnegative entries adding up to are probability distributions, and matrices as in (c) describe how they evolve in a Markov chain (Section 11.1).
Exercise 2.3.44. The matrix of an operator on , which has no finite basis, can still be defined. For , let () be the coefficients with
- (a)Show that each column of the matrix has only finitely many nonzero entries, and that every array with this property is the matrix of exactly one .
- (b)Find the matrices of differentiation and of multiplication by .
- (c)Show that if has coefficients , then has coefficients , where each sum has only finitely many nonzero terms.
- (d)Give an operator whose matrix has a row with infinitely many nonzero entries.
Uses. Proposition 2.2.20 (Linear maps out of ), Definition 1.2.13 (Polynomials), Example 2.1.9 (Maps of polynomials)
(a) Column consists of the coefficients of the polynomial , and only finitely many coefficients of a polynomial are nonzero (Definition 1.2.13). Conversely, let be an array whose columns have finitely many nonzero entries. Then
(b) for and , so the matrix of has the entries for , just above the diagonal, and zeros elsewhere. Multiplication by sends to , so its matrix has just below the diagonal, and zeros elsewhere.
(c) Let
So the -th coefficient of is , in which the terms with are . This is the row-times-column rule of Proposition 2.3.11 for infinite matrices whose columns are finite.
(d) Let , regarded as a constant polynomial. It is linear (Example 2.1.9), and for every , so row of its matrix is . Rows can be infinite; only the columns must be finite.
Exercise 2.3.45. Let ,
- (a)Find .
- (b)Show that is a basis of , and find . What does it tell you about ?
Uses. Definition 2.3.1 (Matrix of a linear map), Definition 1.6.1 (Basis), Theorem 2.3.9 (The matrix of a map computes the map), Corollary 2.2.6 (Agreeing on a spanning list)
(a) and , so
(b) The equation
so
So kills and sends into . Hence for both basis vectors, and by Corollary 2.2.6. Directly,
The standard matrix hides this; the basis shows it.
Exercise 2.3.46. For , let and
- (a)Show that
, that is a basis of , and that the vector has -coordinates . - (b)Show that
. - (c)Show that
, and interpret this.
Uses. Example 2.1.11 (Rotations, projections, and reflections), Exercise 2.1.43, Definition 2.3.1 (Matrix of a linear map), Example 2.3.3 (Matrices with respect to standard bases)
(a) By the formula for in Example 2.1.11,
By Exercise 2.1.43,
(b) The vector has angle and
These are the columns of (Example 2.3.3).
(c) From the formula in Example 2.1.11 and the angle subtraction formulas,
So has angle and has angle . With , part (a) gives the coordinates
By the formula for , these are and , the columns of .
In words: in coordinates rotated by , a rotation looks the same, and the reflection across the line at angle looks like the reflection across the line at angle , the angle of the mirror measured from instead of from . Taking puts on the mirror, and then
Exercise 2.3.47. Let satisfy
Show that if , then .
Uses. Proposition 2.3.11 (Entries of ), the triangle inequality in , Section B.1
Suppose and . Choose with for all ; then . By Proposition 2.3.11, the -th entry of is , so
where the last step uses the hypothesis and . This is a contradiction, so .
The proof chose an extremal coordinate, the largest one in absolute value, so that a single row of could be played against all the others. In the language of Section 2.6 the conclusion says that is injective, and since is square it is then invertible (Corollary 3.5.25).
Exercise 2.3.48. Let and let
- (a)Over , let and
for . Show that is a basis of with . - (b)Let be a prime. Show that over there is a basis of with if and only if .
Uses. Definition 2.3.1 (Matrix of a linear map), Definition 1.6.1 (Basis), Definition 1.2.16 (Degree), Proposition 1.1.24 ( is a field if and only if is prime), Corollary 2.2.6 (Agreeing on a spanning list), binomial coefficients: is divisible by for
Throughout, index the basis vectors from , so that column of (for ) is for and for , where is the standard basis of . So for means
Polynomials of degrees . Let
(a) Over , is a product of factors of degree divided by , so , and is a basis by the paragraph above. For , write
So
(b) If . For , the integer is a product of integers between and , none divisible by the prime , so in and it is invertible (Proposition 1.1.24). So are defined in , and the computation in (a) uses only the field operations and division by . It goes through unchanged, and gives a basis with .
If . Suppose is a basis satisfying (2.3.1). Set for , so that
For both sides are . If it holds for , then by linearity
with the conventions and Pascal’s rule. Now take , which is allowed since . For , is divisible by , so it is in , and
On the other hand, substituting a total of times gives
For example, over with : , while a basis as above would give
More practice
The practice bank has 33 exercises on this section’s topics.