Serlo: EN: Basis change via matrices

Aus testwiki
Zur Navigation springen Zur Suche springen

{{#invoke:Mathe für Nicht-Freaks/Seite|oben}}

In this article, you will learn about basis change via matrices. Basis change matrices can be used to convert coordinates with respect to a given basis into coordinates with respect to another basis. This is particularly useful for matrices of linear maps, which are always taken with respect to two specific bases.

Derivation

We have seen in the article on bases that every finite-dimensional vector space has a basis. This means if V is an n-dimensional K-vector space, then there is a basis B={b1,,bn} of V. Every vector vV can therefore be written uniquely as a linear combination of the basis vectors b1,,bn, i.e. v=i=1nλibi with unique λ1,,λnK.

We also know that vector spaces usually have more than one basis. Let C={c1,,cn} be a second basis of V. Then we can also write v uniquely as a linear combination of ci, i.e. v=i=1nμici with unique coefficients μ1,,μnK.

We therefore have two representations of the vector v. Using the basis B we get the representation v=i=1nλibi and using the basis C we get v=i=1nμici.


How can we convert the basis representation with respect to B of the vector v into the representation with respect to C?

This question is particularly interesting in the context of matrices of linear maps, as we will see below in the section Application of basis change via matrices. Mapping matrices allow us to calculate with coordinates instead of vectors of V. However, the coordinates of a vector always depend on the chosen basis in V. We want a simple way to convert the coordinates of any vector in V with respect to a basis B into coordinates with respect to another basis C.

The situation in Kn

To answer this question, we start with a simpler special case. We consider Kn as a vector space and set B=(e1,,en) as the (ordered) standard basis. Let further C=(c1,,cn) be any ordered basis of Kn. Since matrices of linear maps depend on the order of the basis vectors, we have to use ordered bases B and C.

Let v=(x1,,xn)T=i=1nxiei be a vector for whom we know the coordinates with respect to the standard basis B. The vector vKn can be written in the basis C as v=λ1c1++λncn for unique λ1,,λnK. How can we calculate the coordinates λ1,,λnK of v with respect to C simply from the coordinates x1,,xn of v with respect to the standard basis B?

To do this, we need to describe the mapping KnKn, which maps each vector v=(x1,...,xn)TKn to its coordinate vector (λ1,,λn)TKn with respect to C. This is done by the coordinate mapping kC:KnKn, which is a linear map that we know from the article on isomorphims.

In order to describe kC, we calculate its matrix MStdStd(kC) with respect to the standard basis B=(e1,,en). By using matrix-vector multiplication in Kn, we then obtain the coordinate vector (λ1,,λn)T by multiplying v=(x1,,xn)T from the left by MStdStd(kC).

To calculate the matrix MStdStd(kC), we need to determine kC(e1),,kC(en). These will then be the columns of MStdStd(kC). We are therefore looking for the coordinates of e1,,en with respect to C, so we have to write these as a linear combination of vectors in C. This gives us n equations Vorlage:Einrücken where aij are the coordinates we are looking for. The coefficients aij can be determined by solving a linear system of equations. Mathe für Nicht-Freaks: Vorlage:Beispiel

Then kC(ej)=(a1j,a2j,,anj)T for j=1,,n. This gives us the matrix Vorlage:Einrücken We obtain MStdStd(kC)y=kC(y) for all yKn. The required coefficients λ1,,λn are therefore obtained by Vorlage:Einrücken

Mathe für Nicht-Freaks: Vorlage:Beispiel

Generalization to arbitrary finite-dimensional vector spaces

In a general finite-dimensional vector space V, unlike in Kn, there is no standard basis. In this situation, we have two ordered bases B=(b1,,bn) and C=(c1,,cn). Usually, we are then given an arbitrary vector vV as a linear combination v=x1b1++xnbn with respect to the basis B with x1,,xnK. The coefficients x1,,xn are also called the coordinates of v with respect to B. Correspondingly, the coordinates with respect to C are the scalars λ1,,λnK with v=λ1c1++λncn.

We are looking for a method to convert the coordinates x1,,xn with respect to B of any vector vV into the coordinates λ1,,λn with respect to C. For this, we need a mapping KnKn, which sends (x1,,xn)T to (λ1,,λn)T.

We already know the coordinate mappings kB:VKn with kB(v)=(x1,,xn)TKn and kC:VKn with kC(v)=(λ1,,λn)T. From (x1,,xn)TKn we want to obtain the vector (λ1,,λn)TKn. The coordinate mappings are isomorphisms. So kB1:KnV maps the vector (x1,,xn)T to v and kC:VKn maps v to (λ1,,λn)T. If we first execute kB1 and then kC, we obtain a mapping that sends (x1,,xn)T to (λ1,,λn)T.

Vorlage:Anker Our desired transformation is therefore realized by the linear map kCkB1:KnKn. As above for the situation in Kn, we can then determine the matrix of this linear map in Kn with respect to the standard basis. This matrix is given by MStdStd(kCkB1). If we remember the article on matrices of linear maps, however, this matrix is just MCB(idV), because kCkB1=kCidVkB1.

It also makes intuitive sense that the matrix executing the basis change from B to C is given exactly by MCB(idV) representing the identity from basis B to C. This is because, if we multiply the coordinate vector kB(v) of vV with respect to B from the left with MCB(idV), then we obtain exactly the coordinate vector of idV(v)=v with respect to C, just by definition of the representing matrix. That is, Vorlage:Einrücken for all vV. The matrix MCB(idV) therefore converts coordinates with respect to B into coordinates with respect to C. This is exactly what a basis change matrix does.

Definition

Mathe für Nicht-Freaks: Vorlage:Definition The basis change matrix has many other names. It is also referred to in the literature as a transition matrix, basis transition matrix, transformation matrix or coordinate change matrix. Mathe für Nicht-Freaks: Vorlage:Warnung

Application of basis change via matrices

The problem with matrices of linear maps

We can find a matrix MCB(f) for every linear map f:VW between two finite-dimensional vector spaces, with respect to bases B and C. However, this matrix depends on B and C, and their order. If we choose other bases B or C, we will very likely get a different matrix. We can see this in the following example: Mathe für Nicht-Freaks: Vorlage:Beispiel

Solution of this problem

Consider a linear map f:VW and two ordered bases B and B of V as well as C and C of W. We are asking now: How can we convert the matrix MCB(f) into MCB(f)?

Mathe für Nicht-Freaks: Vorlage:Satz

In the following, we will consider why the formula in this theorem is correct and how we arrived at it.

From the definition of the matrix of a linear map we know that for all vectors xKn, we have MCB(f)x=kCfkB1(x) and MCB(f)x=kCfkB1(x). We can visualize this equation in a diagram:

Representation of the same linear map with respect to different bases as two diagrams
Representation of the same linear map with respect to different bases as two diagrams

In these two diagrams, it doesn't matter which way you go. For example, it does not matter whether we use f to go directly from V to W or take the detour via Kn and Km. If the same map is constructed along each path, this is referred to as a commutative diagram.

We can join the two diagrams together:

Representation of the same linear map with respect to different bases as a diagram
Representation of the same linear map with respect to different bases as a diagram

This diagram is also commutative. That means, if you have a fixed start and end point, it still doesn't matter which path you take in the diagram. If we start at the top left at Kn, it doesn't matter which path we use to get to Km at the bottom left. We can get from Kn to Km via xMCB(f)x, or using first kBkB1:KnKn, then xMCB(f)x and finally kCkC1:KmKm.

The various compositions are hown in blue and red
The various compositions are hown in blue and red

Consequently, the map KnKm, xMCB(f)x is equal to the combination of the maps kBkB1, xMCB(f)x, and kCkC1. We have now seen that the xMCB(f)x can be transformed into the map xMCB(f)x. Originally, however, we wanted to transform the matrix MCB(f) into the matrix MCB(f). How do we get from the map KnKm, xMCB(f)x back to the matrix MCB(f)Km×n?

The matrix MCB(f) looks complicated. We therefore consider how we can answer this question for a general matrix AKm×n. We consider the linear map LA:KnKm, xAx associated with A. The matrix of LA with respect to the standard bases of Kn and Km is again A. Let us now plug in the matrix MCB(f) for A. The matrix of the linear map xMCB(f)x with respect to the standard bases is exactly MCB(f).

As we have already seen, the map xMCB(f)x is equal to the combination of the three maps kBkB1, xMCB(f)x, and kCkC1. Therefore, the matrix of the combination of kBkB1, xMCB(f)x, and kCkC1 corresponds to MCB(f) with regard to the standard bases.

However, we can also determine the matrix of the concatenation in another way. In the article on matrix multiplication, we saw that concatenation between linear maps correspond exactly to the multiplication of the respective matrices. Therefore, we write down the matrices of the concatenated linear maps individually and then multiply them.

  • As we have already seen for MCB(f), the matrix of xMCB(f)x with respect to the standard bases of Kn and Km is again MCB(f).
  • We have already derived the matrix of kCkC1 above; it is MCC(id). This is exactly the basis change matrix TCC.
  • Similarly, the matrix of kBkB1 is given by the basis change matrix TBB=MBB(id).

If we multiply these three matrices, we obtain MCB(f): Vorlage:Einrücken So MCB(f) can be calculated from MCB(f) by left multiplication with TCC and right multiplication with TBB.

Example for a basis change

We now know, how we can convert matrices of a linear map with respect to different bases into each other. Let's look at the example above again. We consider the linear map Vorlage:Einrücken as well as the ordered bases B=(e1,e2), C=((1,1)T,(1,0)T), and C=((1,2)T,(1,0)T). We have already calculated the matrix MCB(f): Vorlage:Einrücken We want to determine MCB(f) by matrix multiplication, i.e., by MCB(f)=TCCMCB(f)TBB. We have to determine TBB and TCC. Now, TBB=I2, since the basis B does not change. Now let us turn to computing the basis change matrix TCC: We know that TCC=MCC(id). In order to determine this matrix, we need to express the basis vectors of C in the basis C:

Vorlage:Einrücken Hence, Vorlage:Einrücken Therefore Vorlage:Einrücken You may convince yourself that this result agrees with the result above.

Examples

Basis change for a matrix of a linear map

Consider the bases Vorlage:Einrücken of 2, as well as the bases Vorlage:Einrücken of 3. Let f:23 be a map with the following matrix with respect to B and C: Vorlage:Einrücken

We want to determine the matrix of f with respect to the bases B and C. This can be done by matrix multiplication MCB(f)=TCCMCB(f)TBB. To do so, we must first calculate the basis change matrices TBB and TCC. Mathe für Nicht-Freaks: Vorlage:Beispiel Mathe für Nicht-Freaks: Vorlage:Beispiel

Mathe für Nicht-Freaks: Vorlage:Beispiel

Exercises

Mathe für Nicht-Freaks: Vorlage:Gruppenaufgabe