# 6. Basis transformations#

## 6.1. Bases#

Until now, we have been working with one specific coordinate system in
which vectors are identified with their coordinate vectors with
respect to the *standard basis vectors*

In other words, a vector \(\vv=\begin{pmatrix}v_1\\ v_2\\ \vdots\\ v_n\end{pmatrix}\) means the same as the corresponding linear combination of the standard basis vectors:

In many situations, it is useful to express vectors in a different
coordinate system. For this we need the general concept of a *basis*.

(Basis)

A *basis* of \(\RR^n\) consists of \(n\) vectors \((\vb_1,\ldots,\vb_n)\)
such that every vector \(\vv\in\RR^n\) can be written in exactly one way
as a *linear combination*

of \(\vb_1,\ldots,\vb_n\) with scalars \(c_1,\ldots,c_n\). These scalars
are called the *coordinates* of \(\vv\) relative to
\((\vb_1,\ldots,\vb_n)\). The vector \(\begin{pmatrix}c_1\\ \vdots\\
c_n\end{pmatrix}\) is called the *coordinate vector* of \(\vv\) relative
to \((\vb_1,\ldots,\vb_n)\).

Alternatively, a basis consists of \(n\) vectors \(\vb_1,\ldots,\vb_n\) with the following two properties:

they

*span*the space \(\RR^n\), i.e. every vector is a linear combination of \(\vb_1,\ldots,\vb_n\);they are

*linearly independent*, i.e. the only way to write the zero vector as a linear combination of \(\vb_1,\ldots,\vb_n\) is as \(0\vb_1+\cdots+0\vb_n\).

Note

A priori, we could have defined a basis as a collection of *some*
number (say \(m\)) of vectors that span the space and are linearly
independent. However, it can be shown that in fact any two bases contain
the same number of vectors. Since the standard basis of \(\RR^n\)
consists of \(n\) vectors, the same therefore holds for *any* basis.

## 6.2. Basis transformation matrices#

Suppose we have two bases of \(\RR^n\), say

(Basis transformation matrix)

The *basis transformation matrix* (or *change-of-basis matrix*)
from \(\vv\) to \(\vw\) is the matrix \(P\) such that the \(j\)-th column of
\(P\) contains the coordinates of \(\vv_j\) relative to the basis
\((\vw_1,\ldots,\vw_n)\).

The definition of \(P\) means (note the difference with the formula (14.2) for matrix-vector multiplication)

Given a vector \(\vx\), we write \(\vx^{(\vv)}=(x_1^{(\vv)},\ldots,x_n^{(\vv)})\) for the coordinate vector of \(\vx\) with respect to the basis \((\vv_1,\ldots,\vv_n)\), and we define \(\vx^{(\vw)}\) similarly. Then we calculate

which shows that

Similarly, given a linear map \(A\), we write \(A^{(\vv)}\) for the matrix of \(A\) with respect to the basis \((\vv_1,\ldots,\vv_n)\), and similarly for \(A^{(\vw)}\). Then \(A^{(\vv)}\) and \(A^{(\vw)}\) are related by

Namely, consider what happens when we multiply this matrix to a coordinate vector of the form \(\vx^{\vw}\). First, applying \(P^{-1}\) to \(\vx^{\vw}\) gives \(\vx^{\vv}\). Next, applying \(A^{(\vv)}\) gives \((A\vx)^{(\vv)}\). Finally, applying \(P\) gives \((A\vx)^{(\vw)}\), which is what we wanted to show.

## 6.3. Invariance under basis transformations#

In Matrix operations we attached several quantities to a square matrix: the trace, the determinant and the characteristic polynomial. In Exercise 6.3, you will check that the trace and the determinant are invariant under basis transformation: if \(A\) and \(P\) are square matrices of the same size with \(P\) invertible, then we have

Because the characteristic polynomial is also defined as a determinant, it too is invariant under basis transformation.

## 6.4. Exercises#

Which of the following collections of vectors are bases for \(\RR^2\)?

\(\begin{pmatrix}1\\ 2\end{pmatrix}\), \(\begin{pmatrix}3\\ 4\end{pmatrix}\), \(\begin{pmatrix}5\\ 6\end{pmatrix}\)

\(\begin{pmatrix}0\\ 0\end{pmatrix}\), \(\begin{pmatrix}1\\ 1\end{pmatrix}\)

\(\begin{pmatrix}1\\ 2\end{pmatrix}\), \(\begin{pmatrix}-3\\ 4\end{pmatrix}\)

Given the two bases

determine the basis transformation matrix from \(\vv\) to \(\vw\).

Suppose \(A\) and \(B\) are two \(n\times n\)-matrices and \(P\) is an invertible \(n\times n\)-matrix such that \(B=PAP^{-1}\). Show that