The correspondence between linear maps and matrices reduces questions about linear maps to computations with arrays of numbers.
5.2.1 Matrices and Matrix Multiplication
Definition 5.2.1 (Matrices). An matrix over is an array of elements of with rows and columns; is the entry in row and column . The set of matrices is denoted , and . We identify with the column vectors, and write for the -th column of . The transpose of is the matrix with entries .
With entrywise addition and scalar multiplication, is a vector space; it is the space of functions on . Let be the matrix with in position and elsewhere. Every matrix can be written uniquely as , so the matrices form a basis and
Definition 5.2.2 (Matrix product). The product of and is the matrix with entries In particular, for a column vector , the product has entries . The identity matrix is , where if and otherwise.
Some immediate consequences of the definition:
is the linear combination of the columns of with coefficients ; in particular .
The -th column of is , the matrix applied to the -th column of .
for .
, since .
The map ,, is linear: and .
5.2.2 The Matrix of a Linear Map
Let and be finite-dimensional, and fix bases of and of . Given a linear map , we can express each image in the basis :
Definition 5.2.3 (Matrix of a linear map). The matrix of with respect to the bases and is the matrix whose -th column is the coordinate vector of in the basis . For an operator we use the same basis on both sides and write . When the bases are understood we simply write .
Note. The key point: the columns of the matrix are the images of the basis vectors, written in coordinates. The -th column tells you where the -th basis vector goes.
5.2.3 Applying a Linear Map in Coordinates
Applying corresponds to multiplying by its matrix. Represent by its coordinate vector: if , let Similarly, let have coordinates , so that .
Proposition 5.2.4 (Linear maps act by matrix multiplication). With the notation above, and , we have , i.e.,
Proof. Compute: Reading off the coefficient of gives , the -th entry of .∎
In other words, if and are the coordinate isomorphisms of the two bases, the square
commutes: .
Note. As a memory aid, the coordinate isomorphism can be written symbolically as a row of vectors times a column of scalars: (The are vectors, so this is only notation.) Then acts as which makes the formula easy to remember.
Example 5.2.5. Let be differentiation, and use the basis . Since ,, and , the columns of the matrix are the coordinate vectors of these images: For instance, has coordinates , and is the coordinate vector of .
Example 5.2.6. For , the matrix of in the standard bases is itself, since .
5.2.4 The Isomorphism
Theorem 5.2.7 (Linear maps correspond to matrices). Let and , and fix bases of and of . The map sending a linear map to its matrix is an isomorphism of vector spaces.
Proof. Write for . We check that is linear, injective and surjective.
Linearity: Let and . The -th column of is the coordinate vector of , which is the sum of the -th columns of and . Hence , and similarly .
Injectivity: If , then for every basis vector , so by Proposition 5.1.2.
Surjectivity: Given , Proposition 5.1.2 gives a linear map with for each , and then .∎
Corollary 5.2.8 (Dimension of ). If and , then
Proof. Isomorphic spaces have the same dimension (Corollary 4.7.9), and the matrices form a basis of .∎
Note. Once we choose coordinates, linear maps are matrices, and the abstract theory of linear maps becomes concrete matrix computation. But the matrix depends on the bases: changing the bases changes the matrix, as we see in Section 5.3. One of our goals is to understand which properties of a linear map are intrinsic, that is, independent of the choice of basis.
5.2.5 Composition and Matrix Multiplication
Matrix multiplication is defined the way it is precisely so that it corresponds to composition of linear maps.
Proposition 5.2.9 (Matrix of a composite). Let ,, be finite-dimensional with bases ,,, and let and be linear. Then
Proof. Let ,,, and . Then So the -th column of is the -th column of .∎
Corollary 5.2.10 (Algebra of matrices). Matrix multiplication is associative, , and distributes over addition, whenever the products are defined. In particular is a ring with identity , and for any basis of an -dimensional space , the map ,, is a ring isomorphism.
Proof. By Example 5.2.6, in the standard bases, so the proposition gives , that is, . Since composition of maps is associative, , and taking matrices gives . Distributivity follows in the same way from Proposition 5.1.5. The map is bijective and additive by Theorem 5.2.7, multiplicative by the proposition, and sends to .∎
Example 5.2.11. Matrix multiplication is not commutative: Correspondingly, is not commutative when : take the operators with these matrices on the span of two basis vectors, and zero on the remaining basis vectors.
Definition 5.2.12 (Invertible matrices). A matrix is invertible if there is with . Such a is unique; it is the inverse. The invertible matrices are the units of the ring , and they form the general linear group.
Proposition 5.2.13 (Isomorphisms and invertible matrices). Let be linear, where , and let be bases of . Then is an isomorphism if and only if is invertible, and in that case .
Proof. If is an isomorphism, is linear (Proposition 4.5.13), and by Proposition 5.2.9 and similarly in the other order. Conversely, suppose is invertible, and let be the linear map with (Theorem 5.2.7). Then , so by injectivity in Theorem 5.2.7. Similarly . Hence is bijective. ∎
Proposition 5.2.14 (Invertibility and columns). A matrix is invertible if and only if its columns form a basis of .
Proof. By Proposition 5.2.13 with the standard bases, is invertible if and only if is an isomorphism. If is an isomorphism, it carries the standard basis to a basis (see the proof of Corollary 4.7.9), and . Conversely, if the columns form a basis, then is the coordinate isomorphism of this basis, so is an isomorphism. ∎