Matrix of a linear map – Serlo

In this article, we will learn how to describe linear maps between arbitrary finite-dimensional vector spaces using matrices. The matrix representing such a linear mapping depends on the choice of bases in and in . Their columns are the coordinates of the images of the base vectors of .

Generalization to abstract vector spaces

Bearbeiten

In the article on introduction to matrices, we saw how we can describe a linear mapping   using a matrix. In this way, we can specify and classify linear mappings between   and   quite easily. Can we also find such a description for linear mappings between general vector spaces?

Formally speaking, we care asking: Given two finite-dimensional   vector spaces   and  , how can we completely describe a linear mapping  ?

To answer this question, we can try to trace it back to the case of   and  . In the article on isomorphisms we have seen that every finite-dimensional vector space is isomorphic to  . This means   and  , where we set   and  . This isomorphism works as follows: We choose an ordered basis   from  . By representing a vector in   with respect to  , we obtain the coordinate mapping  , which maps   to  . In the same way, we obtain the isomorphism   after choosing a basis   of  . It is important here that   and   are ordered bases, as we would get a different mapping for different arrangements of the basis vectors.

Using these isomorphisms, we can turn our mapping   into a mapping  : We set  

 
Shifting a linear map in coordinate space

We can assign a matrix   to this mapping   as described in the article Introduction to matrices.

Have we achieved our goal? If so, we can reconstruct the mapping   from  . From the article introduction to matrices, we already know that we can reconstruct the mapping   from   using the induced mapping. Now   and   are isomorphisms. This means that we can reconstruct   from   via  .

We can therefore call   the matrix assigned to  . However, we have to be careful with this name: the matrix depends on the choice of the two ordered bases   of   and   of  . This means we have actually found several ways to construct a matrix from  . Only after fixing the bases   and   have we found a unique way to get a matrix for  . Thus, the matrix   constructed above should actually be called “the matrix assigned to   with respect to the bases   and  ”. Appropriately, we can denote   by  . By construction, this matrix fills exactly the bottom row in the following diagram:

 
Diagram characterizing the transformation matrix

Definition

Bearbeiten

Definition (Matrix of a linear map)

Let   be a field,   and   two  -vector spaces of dimension   and   respectively. Let   be a basis of   with coordinate mapping   and   a basis of   with coordinate mapping  . Further, let   be a linear mapping. Define   by  . Now the matrix of   with respect to the bases   and   is given by the corresponding matrix of  , i.e., the  -th column of the   matrix contains the image   of the  -th standard basis vector under  . We write this as  .

Warning

Note that the matrix   depends on the selected (ordered) bases   and  ! If you choose other bases, you generally get a different matrix. This also applies if you only change the order of the base vectors. This is why we use ordered bases.

Hint

The matrix of a linear map is also called the representation matrix or assigned matrix.

Calculating with matrices of linear maps

Bearbeiten

Computing the matrix of a linear map

Bearbeiten
 
Relationship between the elements   and  .

How can we find the corresponding matrix for  ? That is, how can we specifically calculate the entries of the matrix  ?

The  -th column vector of the matrix   is given by  . We therefore want to determine this vector. Now,  . The defining property of the coordinate mapping   is that it maps the basis vector   to  . Therefore,  . Thus, the  -th column of   is the vector  . To find out how   represents the vector  , we need to represent this vector in the basis  . There are scalars  , so that  . Then,

 

This means that the  -th entry of   is given by the entry   from the basic representation  .

Definition (Matrix of a linear map, alternative definition)

Let   be a field and   and   two finite-dimensional  -vector spaces. Let   be a basis of   and   a basis of  . Let   be a linear mapping. Further, let   be such that   for all  . Then we define the matrix of   with respect to   and   as the matrix  .

Hint

The columns of   are therefore the coordinates with respect to   of the images of the basis vectors of  . We can also write this down like this:   Here, each entry in the row is a column vector.

Example (Computing the matrix of a linear map)

Let   be the vector space of polynomials of degree at most 2 with coefficients from   and   the vector space of polynomials of degree at most 1 with coefficients from  . We define the following linear mapping:

 

It is easy to check that   is actually a linear mapping. We have the bases   of   and   of  .

We are looking for the matrix  .

To find it, we calculate the images of the basis vectors from   and express the result in the basis  :

 

The coefficients in front of the basis vectors in   are the entries of the matrix we are looking for. Therefore

 

Using the matrix of a linear map

Bearbeiten

Now we know how to calculate the matrix of   with respect to the bases   and  . What can we use this matrix for?

This matrix can be used to calculate the image vector   of each  . To do so, we first represent   with respect to the basis   of  , i.e.,  . We denote the entries of the mapping matrix with  . Then we have

 

We therefore obtain a representation of the vector   as a linear combination of the basis vectors of  , with coordinates

 

Using the matrix multiplication with a vector (“row times column”) we can also express this as follows:

 

Using the matrix of  , we therefore obtain the coordinate vector   of   from the coordinate vector   of  : We multiply   from the left by the matrix  .

 

The equation states that, starting from a vector  , the red and blue paths in the diagram for the matrix to be displayed provide the same result.

 
The defining diagram for a matrix of a linear map

Instead of starting with a vector  , we can also start with any vector  . Then   is the coordinate vector of  . We can also understand the product   as a coordinate vector of  . From the diagram, we know that   is the coordinate vector of  . Therefore,

 

Here we have used the fact that the coordinate mappings are isomorphisms, so we can also reverse the arrows of   and   in the diagram. The equation states that the red and blue paths in the following diagram give the same result:

 
The defining diagram of a mapping matrix with inverted coordinate mapping

Example (Using the matrix of a linear map)

As above, we consider the linear map

 

and the bases   of   or   of  .

We have already calculated the matrix of   with respect to these bases:

 

We can now use this matrix to calculate   for a polynomial  . We have seen above that

 

To understand this, let's look at a concrete example: We consider the polynomial  . First, we need to calculate  , i.e., the coordinates with respect to the basis  . The coordinate vector is formed from the prefactors of the linear combination in the basis  . We have

 

This allows us to find the coordinate vector

 

We can multiply this vector with the matrix  :

 

This vector   is  , i.e., the coordinate vector of   in the basis  . In order to obtain   from this, we must write the coordinates in the vector   as prefactors in the linear combination of  . Thus

 

Matrix of a composition of linear maps

Bearbeiten

In the following theorem we show that the combination of linear mappings corresponds to the multiplication of their representing matrices.

Theorem (Matrix of a composition of linear maps)

Let   and   be linear mappings between finite-dimensional vector spaces. Furthermore, let   be a basis of  ,   a basis of   and   a basis of  . Then

 

Proof (Matrix of a composition of linear maps)

Let   and let  . Further, let   and   be the matrices of   and   respectively.

We now know that the   are the unique scalars, satisfying

 

for all  . In order to prove  , we need to verify

 

Indeed,

 

From the uniqueness of the coordinates in the linear combination of  , we conclude  .

Warning

For the reduction rule, it is important that the same ordered basis   of   is chosen in both cases for the matrices representing   and  . If   is formed for a different basis   of  , then the reduction rule no longer applies: The equation

 

is generally false. Because representing matrices depend on the order of the basis vectors, this also applies if   is only a rearrangement of  .

One-to-one correspondence between matrices and linear maps

Bearbeiten

We can uniquely assign a matrix   to a linear map   after a fixed choice of ordered bases   and  . This gives us a function that sends a mapping   to its associated matrix  :

 

In this formula,   is the set of all linear maps from   to   and   is the set of all   matrices.

How did we arrive at the assignment of the matrix   to the linear map  ? We first found a unique mapping   for   using the bases   and   and then determined the matrix assigned to  . The mapping   is defined by the coordinate mappings:  . So we have the assignment:

 

Because   and   are bijections, we can also get a unique   from an  , to which   is assigned. All we have to do is to set  .

So we have a bijection between   and  .

The assignment

 

is a bijection, as we already saw in the introduction article to matrices.

Therefore,   is also a bijection, because it is the combination of the two bijections   and  . But what does the inverse of the bijection   look like?

The inverse mapping   sends a matrix   to a linear map   such that  . Let   and   be ordered bases of   and   and  , i.e.,   is the  -th component of the matrix  . Because  , the following must hold:

 

Because of the principle of linear continuation,   is already completely defined. Here, we see that   is the weight of   in  . Intuitively, the  -th column of the mapping matrix again stores the image of the  -th basis vector, i.e.,  .

Example (One-to-one correspondence)

We want to better understand the one-to-one correspondence between matrices and linear mappings using an example. The bijection is given by

 

where   is an (ordered) basis of   and   is an (ordered) basis of  . We consider the two   vector spaces   and  , i.e., the vector spaces of the polynomials with coefficients from   and degree at most 2 or 1. For the one-to-one correspondence, we still need an ordered basis of   and of  . We choose the canonical bases   and  . What are the variables   and   in this example? The number   is the dimension of the vector space   and   is the dimension of  . So   and  .

We therefore have the bijection

 

This means every linear map   from   to   provides a   matrix

 

with coefficients  . For example, we have seen above that for the linear map

 

and the bases   and  , we get the corresponding matrix

 

However, the one-to-one correspondence says even more: For every  -matrix   with coefficients in   there is a unique linear mapping   from   to  , so that   is the mapping matrix of  , i.e.,  .

Hint

If we choose a suitable vector space structure on the set of matrices  , the bijection explained above is even an isomorphism. The vector space structure we have to fix for the matrices is componentwise addition and scalar multiplication. We look at this in more detail in the article “Vector space structure on matrices”.

Examples

Bearbeiten

We calculate the matrix representing a specific linear map   with respect to the standard basis.

Example (Concrete example)

We consider the linear map

 

The canonical standard basis is selected both in the original space   and in the target space  :

 

We have:

 

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

 

Now let's look at the same linear map, but a different basis in the target space.

Example (Concrete example with a different basis)

Again, we consider the linear map   of the above example, i.e.,

 

This time we use the ordered basis in the target space  

 

Now,

 
 
 

This gives the following matrix of   with respect to the bases   and  :

 

We can see that this matrix is not equal to   from the first example.

From the two previous examples, we see that the matrix representing a linear map depends on the chosen bases. It is important that we consider ordered bases: The representing matrix also depends on the order of the basis vectors.

Example (Concrete example with a re-arranged basis)

Again, we consider the linear map   of the above example, i.e.,

 

This time we use the reordered standard basis in the target space  

 

Now,

 
 
 

This gives the following matrix of   with respect to the bases   and  :

 

We can see that this matrix is neither equal to   from the first nor to the one from the second example. (In fact, it is the   from the first example with the rows being swapped.)

Conversely, different mappings can also have the same mapping matrix if they are evaluated for different bases:

Example (Concrete example with a different linear map but the same matrix)

Consider the linear map

 

We select the standard basis for both the original and target space:

 

and, as in the previous examples, we calculate the matrix representing   with respect to these bases as

 

This is the same matrix as the   from the previous example. But the linear maps   and   are not identical, because

 

Let us now look at a somewhat more abstract example:

Example (Polynomials of different degrees)

Let   and let   be the vector space of polynomials of degree at most 3 with coefficients from  . Further, let   the vector space of polynomials of degree at most 2 with coefficients from  . We define   as the derivative of a polynomial, i.e., for all   we set  . When considering the bases:   and  , then the following applies:

 
 
 
 

This gives the following matrix of   with respect to the bases   and  :