Search for probability and statistics terms on Statlect
StatLect

Matrix of a linear map

by , PhD

A linear map (or linear transformation) between two finite-dimensional vector spaces can always be represented by a matrix, called the matrix of the linear map. If we apply the map to an element of the first vector space, then we obtain a transformed element in the second space. Similarly, when we multiply the matrix of the map by the coordinate vector of the starting element, we obtain the coordinate vector of the transformed element.

Table of Contents

Introduction

In order to fully understand this lecture, we need to remember two things.

First, given two vector spaces $S$ and $T$, a function $f:S
ightarrow T$ is said to be a linear map if and only if[eq1]for any two vectors $s_{1},s_{2}in S$ and any two scalars $lpha _{1}$ and $lpha _{2}$.

Second, given a basis [eq2] for $S$ and a vector $sin S$, the coordinate vector of $s$ is the vector that contains the unique set of coefficients [eq3] that appear in the representation of $s$ as a linear combination of the basis:[eq4]

We are going to write the coordinate vector of $s$ as[eq5]

Note that the concept of a coordinate vector is well-defined only if the basis of $S$ has a finite number of elements, that is, if the dimension of $S $ is finite. We are always going to assume that this is the case.

Definition

We are now ready to define the matrix of a linear map.

Definition Let $S$ and $T$ be two vector spaces. Let [eq6] be a basis for $S$ and [eq7] a basis for $T$. For any $sin S$ and any $tin T$, denote by [eq8] and [eq9] their Kx1 and $L	imes 1$ coordinate vectors with respect to the two bases of $S$ and $T$ respectively. Let $f:S
ightarrow T$ be a linear map. An $L	imes K$ matrix [eq10] such that, for any $sin S$,[eq11]is called a matrix of the linear map $f$ with respect to the bases $B$ and $C $.

Although it should already be clear, we highlight that the transformed vectors $fleft( s
ight) $ belong to $T$ and their coordinate vectors [eq12] are $L	imes 1$ vectors. Moreover, [eq13] is the matrix product of [eq14] and [eq15].

Example Consider the space $P$ of first-order polynomials of the form[eq16]and the space $Q$ of second-order polynomials of the form[eq17]For brevity, we are often going to denote a polynomial $pleft( z
ight) $ by p, omitting the argument $z$. We already know that a space of polynomials is a vector space. Moreover, if we define [eq18]then [eq19] is a basis for $P$ and [eq20] is a basis for $Q$. The coordinate vectors of p and $q$ above with respect to these two bases are[eq21]Let $f:P
ightarrow Q$ be the map that transforms any polynomial $pleft( z
ight) $ into another polynomial equal to [eq22], that is, [eq23]Take two scalars a_1 and a_2, the polynomial $pin P$ defined above and another polynomial $pi in P$ defined as[eq24]Then,[eq25]As a consequence $f$ is a linear mapping. The effect of $f$ on coordinates is to map vectors[eq26]into vectors[eq27]This can be obtained by defining[eq28]and performing the matrix multiplication[eq29]Therefore, [eq14] is the matrix of the linear map $f$ with respect two the two bases $B$ and $C$.

A map is linear if and only if it transforms coordinates through a matrix

We still have to ascertain whether all linear maps have an associated matrix. It turns out that a map is linear if and only if it has one.

Proposition Let $S$ and $T$ be two linear spaces. Let [eq31] be a basis for $S$ and [eq32] a basis for $T$. For any $sin S$ and any $tin T$, denote by [eq8] and [eq9] their Kx1 and $L	imes 1$ coordinate vectors with respect to the two bases of $S$ and $T$ respectively. Let $f:S
ightarrow T$ be a map. Then, $f$ is a linear map if and only if there exists an $L	imes K$ matrix [eq35] such that, for any $sin S$,[eq11]

Proof

Suppose such a matrix [eq14] exists. Then, for any two vectors $s_{1},s_{2}in S$ and any two scalars $lpha _{1}$ and $lpha _{2} $, we have that [eq38]where: in step $rame{A}$ we have used the properties of addition and scalar multiplication of coordinate vectors; in step $rame{B}$ we have applied the distributive property of matrix multiplication. We have just proved that if [eq14] exists, then the mapping $f$ is linear. We now need to prove the converse statement (the "only if" part). Let $f$ be linear. Any element $b_{k}$ of the basis $B$ is transformed by $f$ into a vector that can be written as a linear combination of the basis $C$ as follows:[eq40]where the scalars [eq41] are the $L$ coefficients of the linear combination. Note that the coefficients $F_{l,k}$ are unique by the uniqueness of representations in terms of a basis. Denote by F the $L	imes K$ matrix that is formed by all the coefficients $F_{l,k}$, in such a way that the rows and columns of F (indexed by $l$ and k respectively) correspond to the different elements of the basis of $T$ and $S$ respectively. Now, take any $sin S$ and its associated coordinate vector[eq42]which means that $s$ can be written as a linear combination of the basis of $S$ as follows:[eq43]Since $f$ is a linear map, we have that[eq44]Thus, the coordinate vector of $fleft( s
ight) $ is[eq45]We have just proved that if $f$ is a linear map, then there exists a matrix of the map [eq46]. This demonstrates the "only if" part of the proposition and concludes the proof.

We highly recommend reading the previous proof because it is a constructive proof that shows how to actually build the matrix [eq14] by using the bases $B$ and $C$. After going through the proof, we can see that the matrix is[eq48]

In other words, the k-th column of [eq14] is the coordinate vector of the transformation [eq50] of the k-th vector of the basis $B$.

The latter is a fact worth memorizing.

Uniqueness of the matrix of a linear map with respect to two given bases

An important uniqueness result follows.

Proposition The matrix of a linear map with respect to two given bases is unique.

Proof

We have already demonstrated uniqueness in the equivalence proof above when we noted that the entries of the matrix [eq14] are unique by the uniqueness of representations in terms of a basis.

Solved exercises

Below you can find some exercises with explained solutions.

Exercise 1

Let $P$ be the space of second-order polynomials[eq52]with basis [eq53]. Let $Q$ be the space of fourth-order polynomials[eq54]with basis [eq55]. Define a linear mapping $f:P
ightarrow Q$ that transforms any polynomial $pleft( z
ight) $ into another polynomial equal to [eq56]

Find the matrix [eq14].

Solution

The coordinate vector of the polynomial $pleft( z
ight) $ is[eq58]The polynomial p is transformed as follows:[eq59]Thus, the coordinate vector of the transformation is[eq60]where [eq61]is the matrix of the linear map $f$ with respect to the two bases.

How to cite

Please cite as:

Taboga, Marco (2021). "Matrix of a linear map", Lectures on matrix algebra. https://www.statlect.com/matrix-algebra/matrix-of-a-linear-map.

The books

Most of the learning materials found on this website are now available in a traditional textbook format.