Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Change Basis

Put the new basis vectors into the columns of PP. Then PP turns new coordinates into standard ones, P−1P^{-1} turns standard coordinates into new ones, and the matrix of a map AA in the new basis is P−1APP^{-1}AP.

Recognize the task

Two bases, or coordinates relative to B\mathcal{B}: "find [v]B[\mathbf{v}]_\mathcal{B}", "find the matrix of TT in the basis B\mathcal{B}", "find PC←BP_{\mathcal{C} \leftarrow \mathcal{B}}", "show AA and A′A' are similar". Typical input: B={(1,1),(1,2)}\mathcal{B} = \{(1, 1), (1, 2)\} in R2\mathbb{R}^2 with v=(3,5)\mathbf{v} = (3, 5). Test: decide which way you convert before you write any inverse.
The change-of-basis matrix is defined in The Change-of-Basis Matrix; coordinates themselves are in Coordinates.

Ways to do it

Invert P2×2, or many vectors
[v]B=P−1v,[T]B=P−1AP[\mathbf{v}]_\mathcal{B} = P^{-1}\mathbf{v}, \quad [T]_\mathcal{B} = P^{-1}AP
The inverse converts back; for 2×22 \times 2 use the 2×2 inverse.
Solve P c = vone vector
[ P∣v ]→[ I∣[v]B ][\,P \mid \mathbf{v}\,] \to [\,I \mid [\mathbf{v}]_\mathcal{B}\,]
Row reduce the augmented matrix; no inverse is needed.
Between two non-standard basesB to C
PC←B=C−1B,[ C∣B ]→[ I∣PC←B ]P_{\mathcal{C} \leftarrow \mathcal{B}} = C^{-1}B, \quad [\,C \mid B\,] \to [\,I \mid P_{\mathcal{C} \leftarrow \mathcal{B}}\,]
Then the change-of-basis formula gives [v]C=PC←B[v]B[\mathbf{v}]_\mathcal{C} = P_{\mathcal{C} \leftarrow \mathcal{B}}[\mathbf{v}]_\mathcal{B}.

Steps

StepOn B={(1,1),(1,2)}\mathcal{B} = \{(1, 1), (1, 2)\}, v=(3,5)\mathbf{v} = (3, 5), A=(11−24)A = \begin{pmatrix} 1 & 1 \\ -2 & 4 \end{pmatrix}
1Put the new basis vectors in the columns of PP. Write them in standard coordinates. PP converts B\mathcal{B}-coordinates into standard ones.P=(1112)P = \begin{pmatrix} 1 & 1 \\ 1 & 2 \end{pmatrix}
2Find P−1P^{-1}. It converts standard coordinates into B\mathcal{B}-coordinates.det⁡P=1\det P = 1: P−1=(2−1−11)P^{-1} = \begin{pmatrix} 2 & -1 \\ -1 & 1 \end{pmatrix}
3Convert vectors or matrices. Vectors: [v]B=P−1v[\mathbf{v}]_\mathcal{B} = P^{-1}\mathbf{v}. Maps: [T]B=P−1AP[T]_\mathcal{B} = P^{-1}AP, the similarity relation.[v]B=(1,2)[\mathbf{v}]_\mathcal{B} = (1, 2); P−1AP=(2003)P^{-1}AP = \begin{pmatrix} 2 & 0 \\ 0 & 3 \end{pmatrix}
4Check. Rebuild the vector from its coordinates. For matrices, compare trace and determinant, which similarity preserves.1(1,1)+2(1,2)=(3,5)1(1, 1) + 2(1, 2) = (3, 5) ✓; trace 55 and determinant 66 on both sides ✓

Worked examples

Example 1 · coordinates of a vector

vector
B={(2,1),(1,1)}\mathcal{B} = \{(2, 1), (1, 1)\}, v=(4,3)\mathbf{v} = (4, 3): P=(2111)P = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}
P−1=(1−1−12)P^{-1} = \begin{pmatrix} 1 & -1 \\ -1 & 2 \end{pmatrix}
det⁡P=1\det P = 1
[v]B=P−1(4,3)=(1,2)[\mathbf{v}]_\mathcal{B} = P^{-1}(4, 3) = (1, 2)
check: 1(2,1)+2(1,1)=(4,3)1(2, 1) + 2(1, 1) = (4, 3)

Example 2 · a matrix in a new basis

P⁻¹AP
A=(1234)A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}, B={(1,1),(1,−1)}\mathcal{B} = \{(1, 1), (1, -1)\}: P−1=12(111−1)P^{-1} = \frac{1}{2}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}
AP=(3−17−1)AP = \begin{pmatrix} 3 & -1 \\ 7 & -1 \end{pmatrix}
[T]B=P−1AP=(5−1−20)[T]_\mathcal{B} = P^{-1}AP = \begin{pmatrix} 5 & -1 \\ -2 & 0 \end{pmatrix}
trace 55, determinant −2-2, as for AA

Example 3 · two non-standard bases

B to C
B={(1,1),(1,2)}\mathcal{B} = \{(1, 1), (1, 2)\}, C={(1,0),(1,1)}\mathcal{C} = \{(1, 0), (1, 1)\}
PC←B=C−1B=(1−101)(1112)P_{\mathcal{C} \leftarrow \mathcal{B}} = C^{-1}B = \begin{pmatrix} 1 & -1 \\ 0 & 1 \end{pmatrix}\begin{pmatrix} 1 & 1 \\ 1 & 2 \end{pmatrix}
PC←B=(0−112)P_{\mathcal{C} \leftarrow \mathcal{B}} = \begin{pmatrix} 0 & -1 \\ 1 & 2 \end{pmatrix}
check: (1,2)=−1(1,0)+2(1,1)(1, 2) = -1(1, 0) + 2(1, 1)
See both coordinate grids at once in the change of basis 2D visualizer.

See it happen

A basis is a choice of coordinate grid. The vector (3,5)(3, 5) does not move when the grid changes; only its address does, from "33 across, 55 up" to "11 of (1,1)(1, 1) plus 22 of (1,2)(1, 2)". In the same way, P−1APP^{-1}AP is the same map as AA written in the new grid: convert in with PP, act with AA, convert out with P−1P^{-1}. With eigenvectors as the grid the map becomes pure stretching, which is why diagonalization is a change of basis.

Common mistakes

Multiplying by P instead of its inverse

✗ [v]B=Pv=(8,13)[\mathbf{v}]_\mathcal{B} = P\mathbf{v} = (8, 13)
✓ [v]B=P−1v=(1,2)[\mathbf{v}]_\mathcal{B} = P^{-1}\mathbf{v} = (1, 2)
PP takes B\mathcal{B}-coordinates to standard coordinates, not the reverse.

Inverse on the wrong side

✗ [T]B=PAP−1=(−76−1512)[T]_\mathcal{B} = PAP^{-1} = \begin{pmatrix} -7 & 6 \\ -15 & 12 \end{pmatrix}
✓ [T]B=P−1AP=(2003)[T]_\mathcal{B} = P^{-1}AP = \begin{pmatrix} 2 & 0 \\ 0 & 3 \end{pmatrix}

Wrong order between two bases

✗ PC←B=B−1CP_{\mathcal{C} \leftarrow \mathcal{B}} = B^{-1}C
✓ PC←B=C−1BP_{\mathcal{C} \leftarrow \mathcal{B}} = C^{-1}B: each B\mathcal{B} vector written in C\mathcal{C}-coordinates

Row reducing instead of changing basis

✗ row reduce AA to get its matrix in another basis
✓ row operations change the eigenvalues; a new basis means P−1APP^{-1}AP