01 / 20

Change of
Basis

Learn how the same vector gets different coordinate representations in different bases, and master the change-of-basis matrix that translates between them.

Linear Algebra

What Is a Basis?

A basis for a vector space \( V \) is a set of vectors that is both linearly independent and spans \( V \). Every vector in the space can be written as a unique linear combination of the basis vectors.

Coordinates Depend on the Basis

The same vector \(\mathbf{v}\) has different coordinate tuples depending on which basis you use. Given a basis \(\mathcal{B} = \{\mathbf{b}_1, \mathbf{b}_2\}\), the coordinate vector of \(\mathbf{v}\) relative to \(\mathcal{B}\) is:

\(\mathbf{e}_1\)
\(\mathbf{e}_2\)
\(\mathbf{b}_1\)
\(\mathbf{b}_2\)
\(\mathbf{v}\)
Same vector, two bases
Standard \(\mathcal{E}\)
Alternate \(\mathcal{B}\)

Why Change of Basis Matters

Simplify Problems
Choosing the right basis can turn a complicated matrix into a diagonal matrix.
Computer Graphics
Cameras, models, and world coordinates all use different bases: converting between them is essential.
Physics
Switching from Cartesian to polar or from lab to rotating frames is a change of basis.

The Change-of-Basis Matrix

Let \(\mathcal{B} = \{\mathbf{b}_1, \mathbf{b}_2, \dots, \mathbf{b}_n\}\) be a basis for \(\mathbb{R}^n\). The change-of-basis matrix from \(\mathcal{B}\) to the standard basis \(\mathcal{E}\) is:

This matrix converts \(\mathcal{B}\)-coordinates into standard coordinates:

Going the Other Direction

To convert from standard coordinates to \(\mathcal{B}\)-coordinates, we need the inverse of \(P_{\mathcal{B}}\):

Since \(\mathcal{B}\) is a basis, its vectors are linearly independent, so \(P_{\mathcal{B}}\) is always invertible.

Between Two Non-Standard Bases

What if you want to convert from basis \(\mathcal{B}\) to basis \(\mathcal{C}\), neither of which is the standard basis? Route through the standard basis:

\([\mathbf{v}]_{\mathcal{B}}\)
\(\mathbf{v}\)
Standard
\([\mathbf{v}]_{\mathcal{C}}\)
\(P_{\mathcal{B}}\)
\(P_{\mathcal{C}}^{-1}\)

\(P\) vs \(P^{-1}\): Which Direction?

\(P_{\mathcal{B}}\) \(P_{\mathcal{B}}^{-1}\)
Input \(\mathcal{B}\)-coordinates Standard coordinates
Output Standard coordinates \(\mathcal{B}\)-coordinates
Columns are Basis vectors \(\mathbf{b}_i\) Rows of \(P^{-1}\)
Mnemonic "Multiply to expand" "Multiply to compress"

How to Apply Change of Basis

1
Identify your bases. Which basis are you converting from and which to?
2
Build \(P_{\mathcal{B}}\). Place the basis vectors of \(\mathcal{B}\) as columns of a matrix.
3
Compute \(P_{\mathcal{B}}^{-1}\) if you need to go from standard to \(\mathcal{B}\).
4
Multiply. Apply the appropriate matrix to your coordinate vector.
5
Verify. Reconstruct the vector in both bases and confirm they match.

Example 1: Standard to \(\mathcal{B}\)

Let \(\mathcal{B} = \left\{\begin{pmatrix}1\\1\end{pmatrix},\;\begin{pmatrix}1\\-1\end{pmatrix}\right\}\). Find \([\mathbf{v}]_{\mathcal{B}}\) for \(\mathbf{v} = \begin{pmatrix}3\\1\end{pmatrix}\).

Example 1: Verification

We found \([\mathbf{v}]_{\mathcal{B}} = \begin{pmatrix}2\\1\end{pmatrix}\). Let's verify by reconstructing the original vector:

\(\mathbf{b}_1\)
\(2\mathbf{b}_1\)
\(1\mathbf{b}_2\)
\(\mathbf{v}=(3,1)\)
O

Example 2: Basis \(\mathcal{B}\) to Basis \(\mathcal{C}\)

Let \(\mathcal{B} = \left\{\begin{pmatrix}1\\0\end{pmatrix},\begin{pmatrix}0\\1\end{pmatrix}\right\}\) (standard) and \(\mathcal{C} = \left\{\begin{pmatrix}2\\1\end{pmatrix},\begin{pmatrix}1\\1\end{pmatrix}\right\}\). Find \([\mathbf{v}]_{\mathcal{C}}\) for \(\mathbf{v} = \begin{pmatrix}5\\3\end{pmatrix}\).

Example 3: Clean Example

Let \(\mathcal{B} = \left\{\begin{pmatrix}2\\1\end{pmatrix},\begin{pmatrix}1\\2\end{pmatrix}\right\}\) and \(\mathbf{v} = \begin{pmatrix}7\\8\end{pmatrix}\). Find \([\mathbf{v}]_{\mathcal{B}}\).

Common Mistakes

✕ Wrong Direction
Using \(P_{\mathcal{B}}\) when you need \(P_{\mathcal{B}}^{-1}\), or vice versa. Always track which basis you're converting from and to.
✕ Row vs Column
Placing basis vectors as rows instead of columns. The change-of-basis matrix uses basis vectors as columns.
✕ Forgetting to Verify
Not checking the answer by substituting back. As we saw, even careful computation can have errors.

Summary Table

Goal Formula Matrix Needed
\(\mathcal{B} \to\) Standard \(\mathbf{v} = P_{\mathcal{B}}[\mathbf{v}]_{\mathcal{B}}\) \(P_{\mathcal{B}}\)
Standard \(\to \mathcal{B}\) \([\mathbf{v}]_{\mathcal{B}} = P_{\mathcal{B}}^{-1}\mathbf{v}\) \(P_{\mathcal{B}}^{-1}\)
\(\mathcal{B} \to \mathcal{C}\) \([\mathbf{v}]_{\mathcal{C}} = P_{\mathcal{C}}^{-1}P_{\mathcal{B}}[\mathbf{v}]_{\mathcal{B}}\) \(P_{\mathcal{C}}^{-1}P_{\mathcal{B}}\)
Build \(P_{\mathcal{B}}\) Columns = basis vectors \(P = [\mathbf{b}_1 \;|\; \mathbf{b}_2 \;|\; \cdots]\)

Question 1 of 5

Let \(\mathcal{B} = \left\{\begin{pmatrix}1\\1\end{pmatrix}, \begin{pmatrix}1\\-1\end{pmatrix}\right\}\). What is the change-of-basis matrix \(P_{\mathcal{B}}\)?

Question 2 of 5

To convert a vector from standard coordinates to \(\mathcal{B}\)-coordinates, you multiply by:

Question 3 of 5

If \([\mathbf{v}]_{\mathcal{B}} = \begin{pmatrix}3\\-1\end{pmatrix}\) and \(\mathcal{B} = \left\{\begin{pmatrix}2\\0\end{pmatrix}, \begin{pmatrix}0\\3\end{pmatrix}\right\}\), what is \(\mathbf{v}\) in standard coordinates?

Question 4 of 5

The columns of the change-of-basis matrix \(P_{\mathcal{B}}\) are:

Question 5 of 5

To convert from basis \(\mathcal{B}\) to basis \(\mathcal{C}\) (neither is standard), the correct change-of-basis matrix is: