Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Change of Basis






Same Transformation, Different Matrix

The same linear transformation has different matrix representations in different bases. Changing the basis changes the numbers but not the map itself. The relationship between two matrix representations of the same transformation is similarity — and choosing the right basis is how difficult matrices become simple ones.



The Problem

A linear transformation T:VVT: V \to V is a fixed geometric object — it sends each vector to a definite image regardless of how coordinates are assigned. But the matrix that represents TT depends on the choice of basis. Different bases assign different coordinates to the same vectors, and the matrix that converts input coordinates to output coordinates changes accordingly.

This raises a natural question: if TT has matrix AA in one basis and matrix AA' in another, how are AA and AA' related? The answer is the similarity relation A=P1APA' = P^{-1}AP, where PP is the change-of-basis matrix. Understanding this relation is the key to choosing bases strategically — picking the basis that makes the matrix as simple as possible.

The Change-of-Basis Matrix

If B\mathcal{B} and C\mathcal{C} are two bases for VV, the change-of-basis matrix PCBP_{\mathcal{C} \leftarrow \mathcal{B}} converts B\mathcal{B}-coordinates to C\mathcal{C}-coordinates:

[v]C=PCB[v]B[\mathbf{v}]_\mathcal{C} = P_{\mathcal{C} \leftarrow \mathcal{B}} \, [\mathbf{v}]_\mathcal{B}


Column jj of PP is the C\mathcal{C}-coordinate vector of the jj-th basis vector of B\mathcal{B}. The reverse conversion uses the inverse: PBC=P1P_{\mathcal{B} \leftarrow \mathcal{C}} = P^{-1}.

Worked Example


In R2\mathbb{R}^2, let B={(1,1),(1,1)}\mathcal{B} = \{(1, 1), (1, -1)\} and let C\mathcal{C} be the standard basis. The C\mathcal{C}-coordinates of the B\mathcal{B}-basis vectors are just their components: (1,1)(1, 1) and (1,1)(1, -1). So

P=(1111)P = \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}


To find the B\mathcal{B}-coordinates of v=(5,1)\mathbf{v} = (5, 1): solve Pc=(5,1)P\mathbf{c} = (5, 1). Using P1=12(1111)P^{-1} = \frac{1}{-2}\begin{pmatrix} -1 & -1 \\ -1 & 1 \end{pmatrix}, we get c=(3,2)\mathbf{c} = (3, 2). So v=3(1,1)+2(1,1)\mathbf{v} = 3(1, 1) + 2(1, -1).
b₁b₂v
The same point, two sets of coordinates

The grid has been redrawn along the new basis vectors and the point read off against it instead of against the axes. The point has not moved; only the description has. The change-of-basis matrix is simply the dictionary between the two readings. Swap between bases and watch the numbers change on the change of basis explorer.

Its inverse is the dictionary read the other way, which is why change of basis always comes as a conjugating pair.

Basis Change Notation

Notation

Basis Change Notation

The coordinate machinery is borrowed from elsewhere. What belongs to this page is a prime that is not a derivative, an arrow whose two ends are deliberately the same, and a relation that is never given a symbol.
The coordinate brackets [v]B[\mathbf{v}]_\mathcal{B}, the script letters for bases, and the backward-arrow subscript on PCBP_{\mathcal{C} \leftarrow \mathcal{B}} with its domino cancellation are all set out at basis. The same device around a map, [T]CB[T]_{\mathcal{C} \leftarrow \mathcal{B}}, belongs to matrix representation. The letter contract of A=PDP1A = PDP^{-1} is at diagonalization, and the transpose standing in for an inverse at the spectral decomposition.
A' = P^{-1}AP
A prime equals P inverse A P
The prime says same transformation, different basis. It is not a derivative, not a transpose, and not a new matrix built from AA by some operation on its entries. AA and AA' are two descriptions of one object, and the prime is the only thing recording that they describe the same thing.
CasesWhich side P1P^{-1} takes is decided by the direction PP converts, not by preference. With PP carrying B\mathcal{B}-coordinates into C\mathcal{C}-coordinates, the conversion has to undo itself on the way in and redo itself on the way out, which puts the inverse on the left. Reverse the direction of PP and the same relation is written A=PAP1A = PA'P^{-1}, with the letters unchanged and the sides swapped.
Also writtenBoth forms appear on this page: A=P1APA' = P^{-1}AP when a basis is being changed, and A=PDP1A = PDP^{-1} when a matrix is being built out of eigen-data. They are one relation read in opposite directions.
Do not confuseTaking the visible symmetry of P1APP^{-1}AP — the same letter on both sides — for a promise that structure survives. Symmetry of AA does not: P1APP^{-1}AP is generally not symmetric unless PP is orthogonal, and entries, zeros and sparsity are lost as a matter of course.
Same glyph elsewhereA prime marks differentiation elsewhere on this site, including inside the Wronskian at determinant applications. Nothing is being differentiated here.
T: V \to V
T maps V to V
Both ends of the arrow name the same space, and that repetition is what makes this page possible. Because input and output live in one space, a single basis choice governs both, so a single PP appears twice in the relation — once undoing the choice and once redoing it.
CasesA map between different spaces, T:VWT: V \to W, needs two independent basis choices and the relation becomes A=Q1APA' = Q^{-1}AP with two unrelated matrices. Similarity is the special case in which the two collapse into one.
Also writtenSuch a map is called an operator on VV rather than a transformation between spaces, and the word carries exactly the information the repeated VV does.
Do not confuseReading the two VV symbols as decoration. If they differ, AA and AA' need not even be the same size, the invariants below stop being invariants, and the notation P1APP^{-1}AP does not typecheck.
A \sim B
A is similar to B
This page names the relation in words and never writes it with a symbol, which is a deliberate omission. The tilde is already spoken for: at Gaussian elimination ABA \sim B means row equivalence, a different relation entirely.
CasesThe two relations disagree on the things this page cares about. Row-equivalent matrices generally have different eigenvalues and different determinants; similar matrices always share both. A tilde read with the wrong meaning turns a true statement into a false one without changing a symbol.
Also writtenWhere a symbol is wanted, ABA \simeq B or ABA \approx B appear for similarity, and some texts write AsBA \sim_{s} B with a subscript naming the relation. None is standard enough to rely on.
Do not confuseReading similarity as a loose word for resemblance. It is an equivalence relation with a precise definition — reflexive with P=IP = I, symmetric by inverting PP, transitive by multiplying the two conversions — and matrices that merely look alike are not similar.
Same glyph elsewhereThe tilde also marks approximation, asymptotic equivalence, and distribution membership in probability. Its meaning here would come entirely from context, which is the reason for avoiding it.

The Similarity Relation

If T:VVT: V \to V has matrix AA in basis B\mathcal{B} and matrix AA' in basis C\mathcal{C}, then

Similarity Relation
A=P1APA' = P^{-1}AP
Learn more about this formula: Similarity Relation →


where P=PCBP = P_{\mathcal{C} \leftarrow \mathcal{B}} is the change-of-basis matrix from B\mathcal{B} to C\mathcal{C}.

The derivation is direct. For any vector v\mathbf{v}, the transformation in B\mathcal{B}-coordinates reads [T(v)]B=A[v]B[T(\mathbf{v})]_\mathcal{B} = A[\mathbf{v}]_\mathcal{B}. Converting to C\mathcal{C}-coordinates: [T(v)]C=P1[T(v)]B=P1A[v]B=P1AP[v]C[T(\mathbf{v})]_\mathcal{C} = P^{-1}[T(\mathbf{v})]_\mathcal{B} = P^{-1}A[\mathbf{v}]_\mathcal{B} = P^{-1}AP[\mathbf{v}]_\mathcal{C}. Since this holds for every v\mathbf{v}, the matrix of TT in basis C\mathcal{C} is P1APP^{-1}AP.

Two matrices related by A=P1APA' = P^{-1}AP for some invertible PP are called similar. Similarity is an equivalence relation: every matrix is similar to itself (P=IP = I), similarity is symmetric (A=P1APA' = P^{-1}AP implies A=PAP1A = PA'P^{-1}), and it is transitive.

Properties Preserved by Similarity

Similar matrices represent the same transformation, so they share every property that is intrinsic to the transformation rather than to a particular coordinate system. Formally:

Similarity Invariants
A=P1AP{det(A)=det(A)tr(A)=tr(A)rank(A)=rank(A)eigenvalues(A)=eigenvalues(A)A' = P^{-1}AP \Rightarrow \begin{cases} \det(A') = \det(A) \\ \text{tr}(A') = \text{tr}(A) \\ \text{rank}(A') = \text{rank}(A) \\ \text{eigenvalues}(A') = \text{eigenvalues}(A) \end{cases}
Learn more about this formula: Similarity Invariants →


The determinant is preserved: det(P1AP)=det(P1)det(A)det(P)=det(A)\det(P^{-1}AP) = \det(P^{-1})\det(A)\det(P) = \det(A).

The trace is preserved: tr(P1AP)=tr(APP1)=tr(A)\text{tr}(P^{-1}AP) = \text{tr}(APP^{-1}) = \text{tr}(A) by the cyclic property.

The eigenvalues are preserved: det(P1APλI)=det(P1(AλI)P)=det(AλI)\det(P^{-1}AP - \lambda I) = \det(P^{-1}(A - \lambda I)P) = \det(A - \lambda I), so the characteristic polynomial — and therefore all eigenvalues with their multiplicities — is the same.

The rank is preserved: multiplying by invertible matrices cannot change the rank.

Individual matrix entries, symmetry, and sparsity are generally not preserved. A symmetric matrix AA can become non-symmetric under P1APP^{-1}AP if PP is not orthogonal.
Quantity / property of A Preserved under A ↦ P⁻¹AP? Reason
Determinant det(P⁻¹AP) = det(P⁻¹) det(A) det(P) = det(A)
Trace tr(P⁻¹AP) = tr(APP⁻¹) = tr(A) by cyclic property
Eigenvalues (with algebraic multiplicities) characteristic polynomial is preserved
Characteristic polynomial det(P⁻¹AP − λI) = det(P⁻¹(A − λI)P) = det(A − λI)
Rank and nullity multiplication by invertible matrices cannot change rank
Individual entries entries are basis-dependent coordinates; they change with P
Symmetry (A = Aᵀ) preserved only when P is orthogonal (P⁻¹ = Pᵀ)
Sparsity / triangular structure generally destroyed unless P is itself sparse / triangular

Diagonalization as a Change of Basis

If TT has nn linearly independent eigenvectors v1,,vn\mathbf{v}_1, \dots, \mathbf{v}_n with eigenvalues λ1,,λn\lambda_1, \dots, \lambda_n, use them as the basis B\mathcal{B}. In this eigenvector basis, TT acts by scaling each basis vector:

T(vi)=λiviT(\mathbf{v}_i) = \lambda_i \mathbf{v}_i


The matrix of TT in this basis is diagonal: D=diag(λ1,,λn)D = \text{diag}(\lambda_1, \dots, \lambda_n).

The change-of-basis matrix PP has the eigenvectors as columns. The similarity relation then gives the diagonalization:

Diagonalization Formula
A=PDP1,D=diag(λ1,,λn),P=[v1    vn]A = PDP^{-1}, \quad D = \operatorname{diag}(\lambda_1, \ldots, \lambda_n), \quad P = [\mathbf{v}_1 \;\cdots\; \mathbf{v}_n]
Learn more about this formula: Diagonalization Formula →


Equivalently, D=P1APD = P^{-1}AP.

Diagonalization is the most powerful application of basis change. It reduces matrix powers to diagonal powers: Ak=PDkP1=Pdiag(λ1k,,λnk)P1A^k = PD^kP^{-1} = P\,\text{diag}(\lambda_1^k, \dots, \lambda_n^k)\,P^{-1}. It simplifies differential equations, recurrence relations, and any computation involving repeated application of the same transformation.
b₁b₂v
A basis in which the map acts along the axes

In this basis the transformation stretches along each grid direction independently, with no mixing between them — which is exactly what a diagonal matrix does. Diagonalisation is therefore not a computation performed on a matrix but a search for the basis in which the matrix was always going to look simple. Hunt for it yourself on the change of basis explorer.

When no such basis exists the matrix is defective, and the next section is about what can be done instead.

When Diagonalization Fails

Not every matrix is diagonalizable. A transformation may not have nn linearly independent eigenvectors — this happens when the geometric multiplicity of some eigenvalue is strictly less than its algebraic multiplicity.

For example, A=(2102)A = \begin{pmatrix} 2 & 1 \\ 0 & 2 \end{pmatrix} has eigenvalue λ=2\lambda = 2 with algebraic multiplicity 22, but the eigenspace is one-dimensional (spanned by (1,0)(1, 0)). There is no basis of eigenvectors, so AA cannot be diagonalized.

In such cases, the best achievable form under similarity is the Jordan normal form: a block-diagonal matrix where each block is an upper triangular matrix with a single eigenvalue on the diagonal and ones on the superdiagonal. The Jordan form is unique up to ordering of blocks and is the canonical representative of the similarity class. Its full development belongs to advanced linear algebra.

Orthogonal Similarity

When the change-of-basis matrix PP is orthogonal (P1=PTP^{-1} = P^T), the similarity relation becomes A=PTAPA' = P^TAP. This is called orthogonal similarity.

Orthogonal similarity preserves more than ordinary similarity. If AA is symmetric, then PTAPP^TAP is also symmetric — a property that ordinary similarity does not guarantee.

The Spectral Theorem states that every real symmetric matrix is orthogonally similar to a diagonal matrix. The eigenvectors of a symmetric matrix can be chosen orthonormal, and the columns of PP form an orthonormal basis. This is a stronger conclusion than ordinary diagonalizability — the diagonalizing basis is not just independent but orthonormal, which simplifies projections, least squares, and numerical computation.

Worked Example: Full Basis Change

Let A=(4123)A = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix}. Find a diagonalization A=PDP1A = PDP^{-1}.

The characteristic polynomial is det(AλI)=(4λ)(3λ)2=λ27λ+10=(λ2)(λ5)\det(A - \lambda I) = (4 - \lambda)(3 - \lambda) - 2 = \lambda^2 - 7\lambda + 10 = (\lambda - 2)(\lambda - 5). Eigenvalues: λ1=2\lambda_1 = 2, λ2=5\lambda_2 = 5.

For λ1=2\lambda_1 = 2: (A2I)v=0(A - 2I)\mathbf{v} = \mathbf{0} gives (2121)v=0\begin{pmatrix} 2 & 1 \\ 2 & 1 \end{pmatrix}\mathbf{v} = \mathbf{0}, so v1=(1,2)\mathbf{v}_1 = (1, -2).

For λ2=5\lambda_2 = 5: (A5I)v=0(A - 5I)\mathbf{v} = \mathbf{0} gives (1122)v=0\begin{pmatrix} -1 & 1 \\ 2 & -2 \end{pmatrix}\mathbf{v} = \mathbf{0}, so v2=(1,1)\mathbf{v}_2 = (1, 1).

P=(1121),D=(2005)P = \begin{pmatrix} 1 & 1 \\ -2 & 1 \end{pmatrix}, \quad D = \begin{pmatrix} 2 & 0 \\ 0 & 5 \end{pmatrix}


Verification: P1=13(1121)P^{-1} = \frac{1}{3}\begin{pmatrix} 1 & -1 \\ 2 & 1 \end{pmatrix}, and PDP1=(1121)(2005)13(1121)=(4123)=APDP^{-1} = \begin{pmatrix} 1 & 1 \\ -2 & 1 \end{pmatrix}\begin{pmatrix} 2 & 0 \\ 0 & 5 \end{pmatrix}\frac{1}{3}\begin{pmatrix} 1 & -1 \\ 2 & 1 \end{pmatrix} = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix} = A.

Application: A10=PD10P1=P(21000510)P1=P(1024009765625)P1A^{10} = PD^{10}P^{-1} = P\begin{pmatrix} 2^{10} & 0 \\ 0 & 5^{10} \end{pmatrix}P^{-1} = P\begin{pmatrix} 1024 & 0 \\ 0 & 9765625 \end{pmatrix}P^{-1}.

Why Basis Choice Matters

The standard basis is the default, but it is rarely the best choice for a given problem.

An eigenvector basis diagonalizes the matrix, reducing powers and exponentials to operations on diagonal entries. A system of differential equations x=Ax\mathbf{x}' = A\mathbf{x} decouples into independent scalar equations when AA is diagonal.

An orthonormal basis simplifies projections and least-squares computations. Coordinates relative to an orthonormal basis are computed by dot products rather than by solving systems, and numerical errors are minimized because the change-of-basis matrix has condition number 11.

A Jordan basis achieves the simplest possible form for non-diagonalizable matrices, isolating the defective eigenvalues into small blocks.

Choosing the right basis is often the key insight that converts a hard problem into an easy one. The transformation does not change — only its numerical description does — but the right description can make all the difference between a tractable computation and an intractable one.
New basis Resulting matrix form What it simplifies
Eigenvector basis (when n indep. eigenvectors exist) diagonal D = diag(λ₁, ..., λₙ) matrix powers Aᵏ = PDᵏP⁻¹; exponentials e^(At); differential systems x' = Ax decouple into scalar ODEs
Orthonormal eigenbasis (symmetric A) diagonal D, with P orthogonal (P⁻¹ = Pᵀ) projections, least-squares, numerical stability (condition number κ(P) = 1)
Jordan basis (when diagonalization fails) block-diagonal Jordan normal form canonical representative for defective matrices; isolates each defective eigenvalue into a small block
Standard basis (default) the original matrix A rarely the best choice — the natural starting point but the right basis can convert a hard problem into an easy one

Summary: Matrix Structure → Canonical Form

The strategic-basis discussion above was organized by which kind of basis you choose. Reading the page in the other direction — starting from what you know about the matrix and asking what form it can be reduced to — gives a recognition guide for similarity transformations. The table below collects the standard canonical forms: when a matrix's structure permits a stronger reduction, similarity can deliver it; when no diagonalization exists, similarity still delivers the Jordan form (over ℝ or ℂ) and Schur form (always available over ℂ). It is the lookup card to consult when a specific A is in front of you and the question is how far similarity can simplify it.
Every row below is the same operation — conjugate AA by some PP and see what comes out — and they are ordered by how much structure AA has to have for the result to be simple. The split is between the cases that reach a diagonal matrix and the cases that reach the closest thing available, which is where most matrices actually land.
Transformations · canonical forms

How simple the matrix can be made

Choosing a basis means choosing PP, and the question is how simple P1APP^{-1}AP can be made. The answer depends entirely on what AA satisfies — and the list is ordered from the strongest structure to no structure at all.

5cases
Diagonal — the best case3
1
nn distinct λi\lambda_i
D=P1APD = P^{-1}AP
Eigenvectors for distinct eigenvalues are automatically independent, so PP is invertible without further checking. Sufficient but not necessary — the row below covers the repeated case, and II diagonalizes trivially with one eigenvalue.
2
mg(λi)=ma(λi)m_g(\lambda_i) = m_a(\lambda_i) for every ii
D=P1APD = P^{-1}AP
The necessary and sufficient condition. Columns of PP are nn independent eigenvectors; the question is only whether that many exist, and the multiplicity comparison answers it eigenvalue by eigenvalue.
3
A=ATA = A^{\mathsf{T}} — always succeeds
D=PTAPD = P^{\mathsf{T}}AP
The spectral theorem guarantees not just diagonalizability but an orthonormal eigenbasis, so P1=PTP^{-1} = P^{\mathsf{T}} and nothing needs inverting. The only row where the hypothesis is checkable at a glance.
As close as the matrix allows2
4
mg(λ)<ma(λ)m_g(\lambda) < m_a(\lambda) for some λ\lambda
J=P1APJ = P^{-1}AP
Block diagonal with ones on the superdiagonal. The columns of PP are eigenvectors plus generalized eigenvectors, and the number of ones counts exactly how many eigenvectors are missing — the Jordan form measures the failure rather than working around it.
5
no hypotheses; UU unitary
T=UAUT = U^{*}AU, upper triangular
Schur decomposition. Triangular rather than diagonal, but it exists for every square matrix over C\mathbb{C} and UU is unitary, which makes it numerically stable where the Jordan form is not — the reason libraries compute Schur and not Jordan.
Every row is the same operation with a different guarantee: conjugate by PP and read the result. Similarity preserves eigenvalues, trace, determinant, rank and characteristic polynomial, so nothing about the transformation is lost in any of these — only the coordinates change, and the entries below say how much simplicity that buys.
How simple the matrix can be made·/linear-algebra/transformations/basis-changeLearn Math Class
Read downward and the hypotheses weaken while the form degrades in step. Distinct eigenvalues give a diagonal matrix and are easy to check; symmetry gives a diagonal matrix and an orthogonal PP, so the inverse is a transpose; matching multiplicities is the exact condition and is the one that actually has to be tested. Below that line no diagonal form exists, and the question changes from how do I diagonalize this to what is the best I can do.
The last two rows answer that differently and it is worth knowing which is used. The Jordan form is the more informative — the ones on its superdiagonal count precisely how many eigenvectors each eigenvalue is missing — but it is numerically unusable, since an arbitrarily small perturbation can change the block structure entirely. The Schur form gives up on diagonal blocks and settles for triangular, in exchange for a unitary PP and stability. Libraries compute Schur; textbooks prove Jordan.

Change of Basis FAQ

Does similarity preserve symmetry, zeros or sparsity?

+
None of them in general. The expression P1APP^{-1}AP looks symmetric because the same letter appears on both sides, but that visual balance promises nothing about the matrix. A symmetric AA usually comes out non-symmetric unless PP is orthogonal, and entries, zero patterns and sparsity are lost as a matter of course.Read more →

Is "similar" the same as "row-equivalent"?

+
No, and the two disagree on exactly the properties this topic cares about. Row-equivalent matrices generally have different eigenvalues and different determinants, while similar matrices always share both. Since a tilde is sometimes used for either relation, reading it with the wrong meaning turns a true statement false without a symbol changing.Read more →

Does similarity apply to maps between two different spaces?

+
No. A map T:VWT : V \to W needs an independent basis choice at each end, giving A=Q1APA' = Q^{-1}AP with two unrelated matrices. Similarity is the special case where domain and codomain coincide so the two collapse into one. If the spaces differ, AA and AA' need not even be the same size.Read more →