A basis lets us describe every vector by its weights. The standard basis is only one choice. Often another basis fits a problem better, and then we need to translate between descriptions. The translation uses inverse matrices.
If $\mathcal{B} = \{\mathbf{b}_1, \dots, \mathbf{b}_n\}$ is a basis of $\mathbb{R}^n$ and $\mathbf{x} = c_1\mathbf{b}_1 + \cdots + c_n\mathbf{b}_n$, the coordinate vector of $\mathbf{x}$ relative to $\mathcal{B}$ is $[\mathbf{x}]_{\mathcal{B}} = (c_1, \dots, c_n)$. With $P_{\mathcal{B}} = [\,\mathbf{b}_1\ \cdots\ \mathbf{b}_n\,]$, that equation says $$\mathbf{x} = P_{\mathcal{B}}[\mathbf{x}]_{\mathcal{B}}, \qquad [\mathbf{x}]_{\mathcal{B}} = P_{\mathcal{B}}^{-1}\mathbf{x}.$$
Worked example: Finding coordinates
- $P_{\mathcal{B}} = \begin{bmatrix} 2 & 1 \\ 1 & 1 \end{bmatrix}$ has determinant $1$, so $P_{\mathcal{B}}^{-1} = \begin{bmatrix} 1 & -1 \\ -1 & 2 \end{bmatrix}$.
- $[\mathbf{x}]_{\mathcal{B}}$ $= P_{\mathcal{B}}^{-1}\mathbf{x}$ $= \begin{bmatrix} 1 & -1 \\ -1 & 2 \end{bmatrix}\begin{bmatrix} 5 \\ 4 \end{bmatrix}$ $= \begin{bmatrix} 1 \\ 3 \end{bmatrix}$.
- Check: $\begin{bmatrix} 2 \\ 1 \end{bmatrix} + 3\begin{bmatrix} 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 5 \\ 4 \end{bmatrix}$. ✓
Answer: $[\mathbf{x}]_{\mathcal{B}} = (1, 3)$
Between two bases
For two bases $\mathcal{B}$ and $\mathcal{C}$, the change-of-coordinates matrix $P_{\mathcal{C} \leftarrow \mathcal{B}}$ turns $\mathcal{B}$-coordinates into $\mathcal{C}$-coordinates: $[\mathbf{x}]_{\mathcal{C}} = P_{\mathcal{C} \leftarrow \mathcal{B}}[\mathbf{x}]_{\mathcal{B}}$. Its columns are the $\mathcal{C}$-coordinates of the $\mathcal{B}$ vectors, $P_{\mathcal{C} \leftarrow \mathcal{B}}$ $= \left[\,[\mathbf{b}_1]_{\mathcal{C}}\ \cdots\ [\mathbf{b}_n]_{\mathcal{C}}\,\right]$ $= P_{\mathcal{C}}^{-1}P_{\mathcal{B}}$, and going back uses its inverse.
Why it works
Worked example: A change-of-coordinates matrix
- $[\mathbf{b}_1]_{\mathcal{C}}$: solve $c_1(1, 0) + c_2(1, 1) = (2, 1)$: $c_2 = 1$, $c_1 = 1$.
- $[\mathbf{b}_2]_{\mathcal{C}}$: $c_1(1, 0) + c_2(1, 1) = (1, 1)$: $c_2 = 1$, $c_1 = 0$.
- $P_{\mathcal{C} \leftarrow \mathcal{B}} = \begin{bmatrix} 1 & 0 \\ 1 & 1 \end{bmatrix}$. Same as $P_{\mathcal{C}}^{-1}P_{\mathcal{B}}$ $= \begin{bmatrix} 1 & -1 \\ 0 & 1 \end{bmatrix}\begin{bmatrix} 2 & 1 \\ 1 & 1 \end{bmatrix}$. ✓
- Use it on the earlier vector: $[\mathbf{x}]_{\mathcal{C}}$ $= \begin{bmatrix} 1 & 0 \\ 1 & 1 \end{bmatrix}\begin{bmatrix} 1 \\ 3 \end{bmatrix}$ $= \begin{bmatrix} 1 \\ 4 \end{bmatrix}$, and indeed $1(1, 0) + 4(1, 1) = (5, 4)$.
Answer: $\begin{bmatrix} 1 & 0 \\ 1 & 1 \end{bmatrix}$
Common mistake
Why bother with other bases? A basis adapted to a problem makes it simpler. In a picture tilted at an angle, coordinates along the tilt are more natural; in a vibrating system, coordinates along the natural modes separate the motion; in data, coordinates along the main directions of spread compress the information. All of these are changes of basis.
Changing basis also changes the matrix of a map. If $T(\mathbf{x}) = A\mathbf{x}$, then in $\mathcal{B}$-coordinates $T$ has matrix $P_{\mathcal{B}}^{-1}AP_{\mathcal{B}}$. Choosing a basis that makes this matrix diagonal is the whole idea behind diagonalization.
Key idea