6.6: The matrix of a linear map
( \newcommand{\kernel}{\mathrm{null}\,}\)
Now we will see that every linear map T∈L(V,W), with V and W finite-dimensional vector spaces, can be encoded by a matrix, and, vice versa, every matrix defines such a linear map.
Let V and W be finite-dimensional vector spaces, and let T:V→W be a linear map. Suppose that (v1,…,vn) is a basis of V and that (w1,…,wm) is a basis for W. We have seen in Theorem 6.1.3 that T is uniquely determined by specifying the vectors Tv1,…,Tvn∈W. Since (w1,…,wm) is a basis of W, there exist unique scalars aij∈F such that
Tvj=a1jw1+⋯+amjwmfor 1≤j≤n.
We can arrange these scalars in an m×n matrix as follows:
M(T)=[a11…a1n⋮⋮am1…amn].
Often, this is also written as A=(aij)1≤i≤m,1≤j≤n. As in Section A.1.1, the set of all m×n matrices with entries in F is denoted by Fm×n.
Remark 6.6.1. It is important to remember that M(T) not only depends on the linear map T but also on the choice of the basis (v1,…,vn) for V and the choice of basis (w1,…,wm) for W. The jth column of M(T) contains the coefficients of the jth basis vector vj when expanded in terms of the basis (w1,…,wm), as in Equation 6.6.1.
Example 6.6.2. Let T:R2→R2 be the linear map given by T(x,y)=(ax+by,cx+dy) for some a,b,c,d∈R. Then, with respect to the canonical basis of R2 given by ((1,0),(0,1)), the corresponding matrix is
M(T)=[abcd]
since T(1,0)=(a,c) gives the first column and T(0,1)=(b,d) gives the second column.
More generally, suppose that V=Fn and W=Fm, and denote the standard basis for V by (e1,…,en) and the standard basis for W by (f1,…,fm). Here, ei (resp. fi) is the n-tuple (resp. m-tuple) with a one in position i and zeroes everywhere else. Then the matrix M(T)=(aij) is given by
aij=(Tej)i,
where (Tej)i denotes the ith component of the vector Tej.
Example 6.6.3. Let T:R2→R3 be the linear map defined by T(x,y)=(y,x+2y,x+y). Then, with respect to the standard basis, we have T(1,0)=(0,1,1) and T(0,1)=(1,2,1) so that
M(T)=[011211].
However, if alternatively we take the bases ((1,2),(0,1)) for R2 and
((1,0,0),(0,1,0),(0,0,1)) for R3, then T(1,2)=(2,5,3) and T(0,1)=(1,2,1) so that
M(T)=[215231].
Example 6.6.4. Let S:R2→R2 be the linear map S(x,y)=(y,x). With respect to the basis ((1,2),(0,1)) for R2, we have
S(1,2)=(2,1)=2(1,2)−3(0,1)andS(0,1)=(1,0)=1(1,2)−2(0,1),
and so
M(S)=[21−3−2].
Given vector spaces V and W of dimensions n and m, respectively, and given a fixed choice of bases, note that there is a one-to-one correspondence between linear maps in L(V,W) and matrices in Fm×n. If we start with the linear map T, then the matrix M(T)=A=(aij) is defined via Equation 6.6.1. Conversely, given the matrix A=(aij)∈Fm×n, we can define a linear map T:V→W by setting
Tvj=m∑i=1aijwi.
Recall that the set of linear maps L(V,W) is a vector space. Since we have a one-to-one correspondence between linear maps and matrices, we can also make the set of matrices Fm×n into a vector space. Given two matrices A=(aij) and B=(bij) in Fm×n and given a scalar α∈F, we define the matrix addition and scalar multiplication component-wise:
A+B=(aij+bij),αA=(αaij).
Next, we show that the composition of linear maps imposes a product on matrices, also called matrix multiplication. Suppose U,V,W are vector spaces over F with bases (u1,…,up), (v1,…,vn) and (w1,…,wm), respectively. Let S:U→V and T:V→W be linear maps. Then the product is a linear map T∘S:U→W.
Each linear map has its corresponding matrix M(T)=A,M(S)=B and M(TS)=C. The question is whether C is determined by A and B. We have, for each j∈{1,2,…p}, that
(T∘S)uj=T(b1jv1+⋯+bnjvn)=b1jTv1+⋯+bnjTvn=n∑k=1bkjTvk=n∑k=1bkj(m∑i=1aikwi)=m∑i=1(n∑k=1aikbkj)wi.
Hence, the matrix C=(cij) is given by
cij=n∑k=1aikbkj.
Equation 6.6.2 can be used to define the m×p matrix C as the product of a m×n matrix A and a n×p matrix B, i.e.,
C=AB.
Our derivation implies that the correspondence between linear maps and matrices respects the product structure.
Proposition 6.6.5. Let S:U→V and T:V→W be linear maps. Then
M(TS)=M(T)M(S).
Example 6.6.6. With notation as in Examples 6.6.3 and 6.6.4, you should be able to verify that
M(TS)=M(T)M(S)=[215231][21−3−2]=[104131].
Given a vector v∈V, we can also associate a matrix M(v) to v as follows. Let (v1,…,vn) be a basis of V. Then there are unique scalars b1,…,bn such that
v=b1v1+⋯bnvn.
The matrix of v is then defined to be the n×1 matrix
M(v)=[b1⋮bn].
Example 6.6.7 The matrix of a vector x=(x1,…,xn)∈Fn in the standard basis (e1,…,en) is the column vector or n×1 matrix
M(x)=[x1⋮xn]
since x=(x1,…,xn)=x1e1+⋯+xnen.
The next result shows how the notion of a matrix of a linear map T:V→W and the matrix of a vector v∈V fit together.
Proposition 6.6.8. Let T:V→W be a linear map. Then, for every v∈V,
M(Tv)=M(T)M(v).
Proof.
Let (v1,…,vn) be a basis of V and (w1,…,wm) be a basis for W. Suppose that, with respect to these bases, the matrix of T is M(T)=(aij)1≤i≤m,1≤j≤n. This means that, for all j∈{1,2,…,n},
Tvj=m∑k=1akjwk.
The vector v∈V can be written uniquely as a linear combination of the basis vectors as
v=b1v1+⋯+bnvn.
Hence,
Tv=b1Tv1+⋯+bnTvn=b1m∑k=1ak1wk+⋯+bnm∑k=1aknwk=m∑k=1(ak1b1+⋯+aknbn)wk.
This shows that M(Tv) is the m×1 matrix
M(Tv)=[a11b1+⋯+a1nbn⋮am1b1+⋯+amnbn].
It is not hard to check, using the formula for matrix multiplication, that M(T)M(v) gives the same result.
Example 6.6.9. Take the linear map S from Example 6.6.4 with basis ((1,2),(0,1)) of R2. To determine the action on the vector v=(1,4)∈R2, note that v=(1,4)=1(1,2)+2(0,1). Hence,
M(Sv)=M(S)M(v)=[21−3−2][12]=[4−7].
This means that
Sv=4(1,2)−7(0,1)=(4,1),
which is indeed true.
Contributors
- Isaiah Lankham, Mathematics Department at UC Davis
- Bruno Nachtergaele, Mathematics Department at UC Davis
- Anne Schilling, Mathematics Department at UC Davis
Both hardbound and softbound versions of this textbook are available online at WorldScientific.com.