Basis change via matrices – Serlo

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

Bearbeiten

We have seen in the article on bases that every finite-dimensional vector space has a basis. This means if   is an  -dimensional  -vector space, then there is a basis   of  . Every vector   can therefore be written uniquely as a linear combination of the basis vectors  , i.e.   with unique  .

We also know that vector spaces usually have more than one basis. Let   be a second basis of  . Then we can also write   uniquely as a linear combination of  , i.e.   with unique coefficients  .

We therefore have two representations of the vector  . Using the basis   we get the representation   and using the basis   we get  .


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

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  . However, the coordinates of a vector always depend on the chosen basis in  . We want a simple way to convert the coordinates of any vector in   with respect to a basis   into coordinates with respect to another basis  .

The situation in  

Bearbeiten

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

Let   be a vector for whom we know the coordinates with respect to the standard basis  . The vector   can be written in the basis   as   for unique  . How can we calculate the coordinates   of   with respect to   simply from the coordinates   of   with respect to the standard basis  ?

To do this, we need to describe the mapping  , which maps each vector   to its coordinate vector   with respect to  . This is done by the coordinate mapping  , which is a linear map that we know from the article on isomorphims.

In order to describe  , we calculate its matrix   with respect to the standard basis  . By using matrix-vector multiplication in  , we then obtain the coordinate vector   by multiplying   from the left by  .

To calculate the matrix  , we need to determine  . These will then be the columns of  . We are therefore looking for the coordinates of   with respect to  , so we have to write these as a linear combination of vectors in  . This gives us   equations

 

where   are the coordinates we are looking for. The coefficients   can be determined by solving a linear system of equations.

Example (Change to standard basis)

We will examine this procedure using a concrete example. To do so, we consider   as a vector space with the ordered standard basis

 

We also choose the ordered basis   as follows:

 

Each vector in   can be represented in the basis   and the basis   to obtain the above-mentioned coefficients   or  . For example, for the vector  , the coefficients are   and  , because

 

To make it easier to determine the coefficients  , we express the standard basis in the basis  . This means we want to find the coefficients   with

 

By solving the linear system, we can determine and obtain the coefficients:

 

Then   for  . This gives us the matrix

 

We obtain   for all  . The required coefficients   are therefore obtained by

 

Example (Change to standard basis 2)

For our example above, we can also specify the matrix  :

 

With this matrix, we can also easily calculate the coefficients   of the vector  :

 

This means  , as we have already calculated above.

Generalization to arbitrary finite-dimensional vector spaces

Bearbeiten

In a general finite-dimensional vector space  , unlike in  , there is no standard basis. In this situation, we have two ordered bases   and  . Usually, we are then given an arbitrary vector   as a linear combination   with respect to the basis   with  . The coefficients   are also called the coordinates of   with respect to  . Correspondingly, the coordinates with respect to   are the scalars   with  .

We are looking for a method to convert the coordinates   with respect to   of any vector   into the coordinates   with respect to  . For this, we need a mapping  , which sends   to  .

We already know the coordinate mappings   with   and   with  . From   we want to obtain the vector  . The coordinate mappings are isomorphisms. So   maps the vector   to   and   maps   to  . If we first execute   and then  , we obtain a mapping that sends   to  .

Our desired transformation is therefore realized by the linear map  . As above for the situation in  , we can then determine the matrix of this linear map in   with respect to the standard basis. This matrix is given by  . If we remember the article on matrices of linear maps, however, this matrix is just  , because  .

It also makes intuitive sense that the matrix executing the basis change from   to   is given exactly by   representing the identity from basis   to  . This is because, if we multiply the coordinate vector   of   with respect to   from the left with  , then we obtain exactly the coordinate vector of   with respect to  , just by definition of the representing matrix. That is,

 

for all  . The matrix   therefore converts coordinates with respect to   into coordinates with respect to  . This is exactly what a basis change matrix does.

Definition

Bearbeiten

Definition (Basis change matrix)

Let   be a finite-dimensional vector space, and let   and   be two ordered bases of  . Then the basis change matrix from   to   is the matrix of the identity map   with respect to the bases   and  , i.e.  . We call this matrix  .

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.

Warning

In the literature, the names transformation or transition matrix sometimes also refer to matrices that are not basis change matrices.

Application of basis change via matrices

Bearbeiten

The problem with matrices of linear maps

Bearbeiten

We can find a matrix   for every linear map   between two finite-dimensional vector spaces, with respect to bases   and  . However, this matrix depends on   and  , and their order. If we choose other bases   or  , we will very likely get a different matrix. We can see this in the following example:

Example (Different matrices of one linear map)

Let us consider the map

 

Let   be the standard basis of  . We also consider the ordered bases   and  . Then

 

Since

 

the matrix of   with respect to   and   looks as follows:

 

If we carry out the same calculation with the bases   and  , we get

 

This means that the matrix of   with respect to the bases   and   is

 

Therefore,  .

Solution of this problem

Bearbeiten

Consider a linear map   and two ordered bases   and   of   as well as   and   of  . We are asking now: How can we convert the matrix   into  ?

Theorem (Basis change of matrices for linear maps)

Let   be a linear map and consider the ordered bases   and   of   as well as   and   of  . Then

 

The matrix representing   with respect to   and   is therefore obtained from the matrix of   with respect to   and   by multiplying from the left and from the right with the corresponding basis change matrices.

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  , we have   and  . We can visualize this equation in a diagram:

 
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   to go directly from   to   or take the detour via   and  . 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

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  , it doesn't matter which path we use to get to   at the bottom left. We can get from   to   via  , or using first  , then   and finally  .

 
The various compositions are hown in blue and red

Consequently, the map   is equal to the combination of the maps  ,  , and  . We have now seen that the   can be transformed into the map  . Originally, however, we wanted to transform the matrix   into the matrix  . How do we get from the map   back to the matrix  ?

The matrix   looks complicated. We therefore consider how we can answer this question for a general matrix  . We consider the linear map   associated with  . The matrix of   with respect to the standard bases of   and   is again  . Let us now plug in the matrix   for  . The matrix of the linear map   with respect to the standard bases is exactly  .

As we have already seen, the map   is equal to the combination of the three maps  ,  , and  . Therefore, the matrix of the combination of  ,  , and   corresponds to   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  , the matrix of   with respect to the standard bases of   and   is again  .
  • We have already derived the matrix of   above; it is  . This is exactly the basis change matrix  .
  • Similarly, the matrix of   is given by the basis change matrix  .

If we multiply these three matrices, we obtain  :

 

So   can be calculated from   by left multiplication with   and right multiplication with  .

Example for a basis change

Bearbeiten

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

 

as well as the ordered bases  ,  , and  . We have already calculated the matrix  :

 

We want to determine   by matrix multiplication, i.e., by  . We have to determine   and  . Now,  , since the basis   does not change. Now let us turn to computing the basis change matrix  : We know that  . In order to determine this matrix, we need to express the basis vectors of   in the basis  :

 

Hence,

 

Therefore

 

You may convince yourself that this result agrees with the result above.

Examples

Bearbeiten

Basis change for a matrix of a linear map

Bearbeiten

Consider the bases

 

of  , as well as the bases

 

of  . Let   be a map with the following matrix with respect to   and  :

 

We want to determine the matrix of   with respect to the bases   and  . This can be done by matrix multiplication  . To do so, we must first calculate the basis change matrices   and  .

Example (Basis change in  )

Consider the two bases

 

in   . In order to determine the transition matrix   from   to  , we proceed as follows:

1. We represent the basis vectors of   as a linear combination of the vectors of  :

 

2. We write the determined coefficients of the linear combinations as column vectors in a matrix. This is exactly the transition matrix we are looking for:

 

Example (Basis change in  )

We consider the bases

 

in  . We want to calculate the basis change matrix   from   to  . To do this, we represent the basis vectors of   as a linear combination of the vectors of  :

 

As above, we obtain the transition matrix   by writing the coefficients of the linear combinations as columns in a matrix:

 

Example (Basis change for a matrix of a linear map)

Consider the bases   and   of   and the bases   and   of  . Let   be a linear map with the following matrix with respect to   and  :

 

We want to determine the matrix of   with respect to the bases   and  . We do this via matrix multiplication  . In the previous examples, we have already determined   and  . So we can simply calculate:

 

The matrix of   with respect to the bases   and   is therefore

 

Exercises

Bearbeiten

Exercise

We consider the following linear map

 

as well as the bases   and   of   and the bases   and   of  .

  1. Calculate the matrix of   with respect to   and  , as well as the matrix with respect to   and  .
  2. Calculate the basis change matrix from   to  , and vice versa from   to  .
  3. Calculate the basis change matrix from   to  , and vice versa from   to  .
  4. Verify that you can calculate the matrix   from the matrix   using the basis change matrices.

Solution

Solution sub-exercise 1:

We calculate the images of the basis vectors:

 

The corresponding matrix of   is therefore

 

As above, we calculate the images of the basis vectors:

 

In the second step, we express the images in the basis  . The desired matrix is therefore

 

Solution sub-exercise 2:

To determine the basis change matrix   from   to  , we first represent the basis vectors of   as a linear combination of the vectors of  :

 

The coefficients of the linear combinations are the column vectors of the matrix we are looking for:

 

Likewise, we can calculate the basis change matrix   from   to  . Alternatively, we can also calculate the inverse matrix of  :

 

Solution sub-exercise 3:

As in the previous part, we represent the basis vectors of   as a linear combination of the vectors of  :

 

Hence

 

For the inverse, we have

 

Thus

 

Solution sub-exercise 4:

According to the above formula, we should have  . Indeed, the left-hand side is

 

On the right-hand side, we get

 

And in fact, both matrices agree!