4 Linear algebra

4.18 Matrix of a linear map

Linear maps are abstractly defined things. We’d like to make them concrete. We do this by making the following observation: once you know what a linear transformation does on a basis, you know what it does everywhere.

Here’s what that means exactly. Let T:VW be linear. Let 𝐛1,,𝐛n be a basis of V. Then we can write any 𝐯 as i=1nλi𝐛i for some scalars λi, and so by linearity T(𝐯)=T(i=1nλi𝐛i)=i=1nλiT(𝐛i).

This means that if we want to describe a linear map, we can just say what it does on a basis 𝐛1,,𝐛n. You can then work out T(𝐯) for any 𝐯V just by knowing the T(𝐛i).

We can record what T does to each 𝐛i by giving the coefficients needed to write the T(𝐛i) in terms of some fixed basis of W. Putting all this together, to completely describe a linear map T:VW we only need to give a basis 𝐛1,,𝐛n of V, a basis 𝐜1,,𝐜m of W, and the coefficients needed to express T(𝐛j) in terms of the 𝐜i. These coefficients naturally fit into an m×n matrix which will be called the matrix of T with respect to initial basis 𝐛1,,𝐛n and final basis 𝐜1,,𝐜m.

4.18.1 Definition of the matrix of a linear map

Definition 4.18.1.

Let T:VW be linear, and let

  • =𝐛1,,𝐛n be a basis of V

  • 𝒞=𝐜1,,𝐜m be a basis of W.

Define scalars aij by T(𝐛j)=i=1maij𝐜i. Then the matrix of T with respect to initial basis and final basis 𝒞, written [T]𝒞, is the m×n matrix (aij).

Another way to think of this definition is that the jth column of [T]𝒞 records the image of the jth basis element from under T, in the sense that the entries are the coefficients used in expressing T(𝐛j) as a linear combination of 𝒞.

When we have a linear map from a vector space to itself, we sometimes use a slightly different terminology. If T:VV and is a basis of V, the matrix of T with respect to means [T].

Notice that the order of the basis matters in this definition. If you order the basis elements differently, you change the order of the columns or rows in the matrix. That’s why our bases are sequences, not sets.

4.18.2 Examples of the matrix of a linear map

Example 4.18.1.

Let T:23 be defined by T(ab)=(a+bab2a+b). This is linear. Let’s find the matrix of T with respect to

  • initial basis =𝐞1,𝐞2, the standard basis for 2, and

  • final basis =𝐞1,𝐞2,𝐞3, the standard basis for 3.

We have

T(𝐞1) =(112)=1𝐞1+1𝐞2+2𝐞3
T(𝐞2) =(111)=1𝐞11𝐞2+1𝐞3

so the matrix [T] is (111121).

Example 4.18.2.

Let

  • V be the vector space of all polynomials with real coefficients of degree 3 in one variable x

  • D:VV be the differentiation map

  • be the basis 1,x,x2,x3 of V.

D is a linear map, so let’s find the matrix [D] of D with respect to . We have

D(1) =0=0×1+0×x+0×x2+0×x3
D(x) =1=1×1+0×x+0×x2+0×x3
D(x2) =2x=0×1+2×x+0×x2+0×x3
D(x3) =3x2=0×1+0×x+3×x2+0×x3

and so

[D]=(0100002000030000)
Example 4.18.3.

Let id:VV be the identity map id(𝐯)=𝐯. Let =𝐛1,,𝐛n be any basis for V. We’re going to work out [id]. For any j,

id(𝐛j)=𝐛j=0×𝐛1++1×𝐛j++0×𝐛n.

This means the jth column of [id] is all 0s, except a 1 in position j. In other words, [id]=In, the n×n identity matrix.

This shows that the matrix of the identity map is the identity matrix, so long as the initial basis and the final basis are the same.

On the other hand, if 𝒞=𝐜1,,𝐜n is a different basis of V then [id]𝒞 will not be the identity matrix. To figure out what goes in the jth column of this matrix we have to work out id(𝐛j), which is just 𝐛j of course, as a linear combination of the 𝐜is. The coefficients we have to use, whatever they are, make up this column of the matrix.

Example 4.18.4.

Consider two bases for 2

: 𝐞1=(10),𝐞2=(01)
𝒞: 𝐜1=(11),𝐜2=(11)

Both [id] and [id]𝒞𝒞 will be the identity matrix I2. Let’s work out [id]𝒞. To do that, we have to express id(cj) as a linear combination of the 𝐞i for j=1,2:

id(𝐜1) =𝐜1=𝐞1+𝐞2
id(𝐜2) =𝐜2=𝐞1𝐞2

and so [id]𝒞=(1111).

Example 4.18.5.

Let A be an m by n matrix, and TA:nm be the linear map TA(𝐱)=A𝐱. Then the matrix of TA with respect to the standard bases of n and m is A.