• Nem Talált Eredményt

Change of Basis

2.6 Linear Maps

2.6.5 Change of Basis

We have defined the matrix of a linear map with respect to some bases, but we have not told anything about the significance of the bases so far. One may think that the choice of the standard bases simplifies the calculations, but this is only an illusion caused by the simplicity of the notations. Roughly speaking, choosing a basis means the choice of a point of view, and one can have different reasons for changing the perspective. It can happen that the simplicity of the formulae is important, but maybe the viewpoint is fixed for some reason and we simply want to adjust the computations to it. In this section we show how the coordinate vectors and the matrices of a linear maps w.r.t. different bases are connected to each other.

First we take a closer look at the situation when a vector x of Rn is given with its coordinate vector with respect to the basis B1 = {v1, . . . , vn} and we have to change the basis, i.e. the coordinate vector with respect to another basis B2 = {v01, . . . , v0n} of Rn is needed. In this case we can simply apply Theorem 2.6.7 for the identity mapidRn ofRn and the bases B2 and B1. This way we obtain

[x]B1 = [idRn]B2,B1[x]B2.

The jth column of the matrix [idRn]B2,B1 come from the equation v0j =a1,jv1+· · ·+an,jvn.

Now letg :Rn →Rnbe the linear map that maps the basis elements ofB1to the elements of B2, that is, g(vj) = v0j holds for every 1 ≤ j ≤ n. Observe that the jth column of the matrix [idRn]B2,B1 is by definition the same as the jth column of [g]B1,B1, so these matrices are the same. At this point we introduce a notation:

Notation. If f : Rn → Rn is a linear map and B is a basis of Rn, then for simplicity we write[f]B instead of[f]B,B, and we say that [f]B is the matrix of f w.r.t. the basis B.

Using this notation we have [g]B1,B1 = [g]B1 and hence [x]B1 = [g]B1[x]B2.

As all the elements of the basisB2 are in Img, and so are the linear combinations of them, thus, in fact Img = Rn holds. This means that g is surjective and hence by Corollary 2.6.5 it is a bijection, so its inverse g−1 is defined and linear by Theorem 2.6.13, moreover, [g−1]B1 = [g]−1B

1 holds as well. Multiplying the identity above by this matrix from the left we obtain

Theorem 2.6.14. Assume that x∈Rn, and B1 ={v1, . . . , vn}, B2 ={v01, . . . , v0n} are bases of Rn. If g :Rn →Rn is the linear map for which g(vj) =v0j holds for every 1≤j ≤n, then

[x]B2 = [g]−1B

1[x]B1.

Now we turn to the change of the bases in the case of linear maps:

Theorem 2.6.15. Assume that f : Rn → Rk is a linear map, B1 = {v1, . . . , vn} and C1 ={v01, . . . , v0n} are bases ofRn, whileB2 ={w1, . . . , wk}and C2 ={w01, . . . , w0k} are bases of Rk. Let g :Rn →Rn be the uniquely determined linear map for which g(vj) = v0j holds for every 1≤j ≤n (that is, g maps the vectors of the basis B1 to the elements of the basis C1).

Also, let h :Rk →Rk be the uniquely determined linear map for which h(wi) =w0i holds for every 1≤i≤k (that is, h maps the vectors of the basis B2 to the elements of the basis C2).

Then

[f]C1,C2 = [h]−1B2[f]B1,B2[g]B1.

This formula above simplifies a lot whenf maps from Rn into itself and we use only one

"old" and one "new" basis for the description of the map by a matrix:

Corollary 2.6.16. Assume that f :Rn →Rn is a linear map and let B ={v1, . . . , vn} and C={v01, . . . , v0n} be bases of Rn. Let g :Rn →Rn be the uniquely determined linear map for which g(vj) = v0j holds for every 1≤j ≤n. Then

[f]C = [g]−1B [f]B[g]B.

Proof of Theorem 2.6.15. Assume that f(v0j) = a01,jw01 +· · ·+a0k,jw0k. This means that the jth column of [f]C1,C2 is the vector (a01,j, . . . , a0k,j)T. As g(vj) = v0j for every 1 ≤j ≤ n and h(wi) =w0i for every 1≤i≤k, we have

(f ◦g)(vj) = f(g(vj)) =f(v0j) =a01,jw01+· · ·+a0k,jw0k

=a01,jh(w1) +· · ·+a0k,jh(wk)

=h(a01,jw1+· · ·+a0k,jwk).

As the elementsw01, . . . , w0k of the basis C2 of Rk are in Imh, we have Imh=Rk, that is, h is surjective and hence by Corollary 2.6.5 it is a bijection, so its inverse h−1 is defined and linear. Thus,

(h−1◦f◦g)(vj) =a01,jw1+· · ·+a0k,jwk,

which means that thejth column of the matrix[h−1◦f◦g]B1,B2 is the same as thejth column of [f]C1,C2. This holds for every 1≤j ≤n, hence

[f]C1,C2 = [h−1◦f ◦g]B1,B2.

Now we apply Theorem 2.6.11 first forh−1,f◦g and the basesB1,B2 and B3 =B2 to obtain [h−1◦f◦g]B1,B2 = [h−1]B2[f◦g]B1,B2. Next we apply the same theorem to the maps f andg

and the (ordered) triple of basesB1,B1, B2, which yields [f◦g]B1,B2 = [f]B1,B2[g]B1. Finally, the application of Theorem 2.6.13 for[h−1]B2 gives the statement.

By Exercise 2.5.2 we have rank(AB) ≤ rank(A) for any matrices A, B for which the productAB is defined. Note that then

rank(AB) = rank((AB)T) = rank(BTAT)≤rank(BT) = rank(B)

follow as well. Assume that f : Rn → Rk is a linear map, B1 is a basis of Rn and B2 is a basis ofRk. If g :Rn→Rn is the linear map which maps the elements of the standard basis of Rn to the elements of B1 and h : Rk → Rk is the linear map that maps the elements of the standard basis ofRk to the elements of the basisB2, then

rank([f]B1,B2) = rank([h]−1[f][g])≤rank([h]−1[f])≤rank([f])

by Theorem 2.6.15 and by the remarks above. Similarly, as the equation[h][f]B1,B2[g]−1 = [f]

holds as well, rank([f])≤rank([f]B1,B2)also follows, hence these ranks are the same. Thus, by Corollary 2.6.8 we infer that

rank(f) = rank([f]) = rank([f]B1,B2)

for any bases B1 and B2, as we have already mentioned in Section 2.6.3.

Example 2.6.6. Finally, we show an application of these tools. Assume thatf :R2 →R2 is the reflection in the line that goes through the origin and is parallel to the vectoru= (1,2)T. We are looking for its matrix w.r.t. the standard basis.

The calculation of the image of the standard basis elements requires some work, but we choose another way instead and use some images that can be determined easily. For example, f fixes the vector u, that is,f(u) =u. Also, after the rotation u about the origin by 90 we get v = (−2,1)T, and obviously f(v) =−v holds. Therefore, it is easy to give the matrix of f w.r.t. the basis B ={u, v}. Indeed, we have

[f]B=

1 0 0 −1

.

If g : R2 → R2 is the linear map that maps the standard basis to B, then its matrix w.r.t.

the standard basis is [g] =

1 −2

2 1

, and [g]−1 = 1 5

1 2

−2 1

by the formula for the inverse in (10). By Corollary 2.6.16 we get that [f]B = [g]−1[f][g] ⇐⇒ [g][f]B[g]−1 = [f],

so the matrix off w.r.t. the standard basis is 1

5

1 −2

2 1

1 0

0 −1

1 2

−2 1

= 1 5

1 −2

2 1

1 2

2 −1

= −3/5 4/5 4/5 3/5

! .