Let the new basis be b₁, b₂, written in the old basis, and let P be the matrix with b₁ and b₂ as its columns. A
vector with coordinates x′ = (x′₁, x′₂) in the new basis has the coordinates x in the old one, where
- x = P x′ = x′₁·b₁ + x′₂·b₂
- x₁ = p₁₁x′₁ + p₁₂x′₂ and x₂ = p₂₁x′₁ + p₂₂x′₂, where p₁₁, p₂₁ are the entries of b₁ and p₁₂, p₂₂ those of b₂
The other way round,
The card above computes x from x′ and P, which is the product written out as the combination of the columns.
Going back needs the inverse of P; for a 2×2 matrix see the page on the
inverse of a 2×2 matrix, and the coordinates
relative to a basis come out of the determinants as on the page on
basis and dimension.
Holds when the columns of P are linearly independent, so that P is a matrix with an inverse and the new vectors
are a basis.
Worked example
The new basis is b₁ = (2, 1) and b₂ = (1, 3), so P has the rows (2, 1) and (1, 3). A vector with new
coordinates x′ = (1, 2) has the old coordinates
- x = 1·(2, 1) + 2·(1, 3) = (2 + 2, 1 + 6) = (4, 7)
Back again: det P = 2·3 − 1·1 = 5, so P⁻¹ has the rows (3/5, −1/5) and (−1/5, 2/5). Then
x′ = P⁻¹(4, 7) = ((12 − 7)/5, (−4 + 14)/5) = (1, 2).
A second example: the matrix of a map in a new basis
If A is the matrix of a linear map in the old basis, its matrix in the new basis is
Take A with the rows (4, 1) and (2, 3), the matrix on the page on
eigenvalues of a 2×2 matrix. It has the
eigenvalues 5 and 2, with the eigenvectors (1, 1) and (1, −2): A(1, 1) = (5, 5) and A(1, −2) = (2, −4). Use them as
the new basis, so P has the rows (1, 1) and (1, −2) and det P = −3. Then AP has the rows (5, 2) and (5, −4), and
- A′ = P⁻¹(AP) = the matrix with the rows (5, 0) and (0, 2)
In the basis of eigenvectors the map is diagonal, with the eigenvalues on the diagonal.
The matrix in the matrix calculator finds the eigenvalues and the
eigenvectors.
The direction
P converts new coordinates to old. Applying it to old coordinates gives two numbers that are the coordinates in
neither basis.
| For the vector in the example |
Result |
| Right: P x′ with x′ = (1, 2) |
(4, 7) |
| Right: P⁻¹ x with x = (4, 7) |
(1, 2) |
| Wrong: P x with x = (4, 7) |
(15, 25) |
Common mistakes
- The wrong direction. x = P x′ and x′ = P⁻¹x. Check with a vector whose answer you know, such as a basis
vector: b₁ has the new coordinates (1, 0).
- New basis vectors as rows. They are the columns of P. With rows, P is the transpose and gives another
matrix.
- P A P⁻¹ instead of P⁻¹ A P. The matrix of a map in the new basis has P⁻¹ on the left and P on the right.
- Writing the new basis vectors in the new basis. Their coordinates there are (1, 0) and (0, 1) by
definition. P holds the old coordinates.
Frequently asked questions
Does P go from the old basis to the new, or the other way?
Its columns are the new basis vectors in old coordinates, so it takes new coordinates to old ones. Books
differ: some call P⁻¹ the change-of-basis matrix, because it takes old coordinates to new. Check which
direction a book means before comparing answers.
Does the change of basis change the vector?
No. The vector is the same arrow; only its list of coordinates changes with the basis.
Why do similar matrices have the same eigenvalues?
A and P⁻¹AP represent the same linear map in two bases, and eigenvalues belong to the map. They also have the
same determinant and trace.