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:V→VT: 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 A′A' in another, how are AA and A′A' related? The answer is the similarity relation A′=P−1APA' = 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 PC←BP_{\mathcal{C} \leftarrow \mathcal{B}} converts B\mathcal{B}-coordinates to C\mathcal{C}-coordinates:

Change of Basis Formula
[v]C=PC←B [v]B[\mathbf{v}]_\mathcal{C} = P_{\mathcal{C} \leftarrow \mathcal{B}} \, [\mathbf{v}]_\mathcal{B}
Learn more about this formula: Change of Basis Formula →


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: PB←C=P−1P_{\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

The Change-of-Basis Matrix
P=(111−1)P = \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}

Pitfall: Converting in the wrong direction
Multiplying PP by the standard coordinates of (3,1)(3, 1) gives (4,2)(4, 2), but 4(1,1)+2(1,−1)=(6,2)4(1, 1) + 2(1, -1) = (6, 2), not (3,1)(3, 1). The B\mathcal{B}-coordinates come from P−1P^{-1}: P−1(3,1)=(2,1)P^{-1}(3, 1) = (2, 1).

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 P−1=1−2(−1−1−11)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 PC←BP_{\mathcal{C} \leftarrow \mathcal{B}} with its domino cancellation are all set out at basis. The same device around a map, [T]C←B[T]_{\mathcal{C} \leftarrow \mathcal{B}}, belongs to matrix representation. The letter contract of A=PDP−1A = PDP^{-1} is at diagonalization, and the transpose standing in for an inverse at the spectral decomposition.
A′=P−1APA' = 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 A′A' are two descriptions of one object, and the prime is the only thing recording that they describe the same thing.
CasesWhich side P−1P^{-1} takes is decided by the direction PP converts, not by preference. With PP carrying C\mathcal{C}-coordinates into B\mathcal{B}-coordinates, PP on the right converts the input into B\mathcal{B}-coordinates, AA acts, and P−1P^{-1} on the left converts the result back, which puts the inverse on the left. Reverse the direction of PP and the same relation is written A=PA′P−1A = PA'P^{-1}, with the letters unchanged and the sides swapped.
Also writtenBoth forms appear on this page: A′=P−1APA' = P^{-1}AP when a basis is being changed, and A=PDP−1A = 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 P−1APP^{-1}AP — the same letter on both sides — for a promise that structure survives. Symmetry of AA does not: P−1APP^{-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→VT: 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:V→WT: V \to W, needs two independent basis choices and the relation becomes A′=Q−1APA' = 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 A′A' need not even be the same size, the invariants below stop being invariants, and the notation P−1APP^{-1}AP does not typecheck.
A∼BA \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 A∼BA \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, A≃BA \simeq B or A≈BA \approx B appear for similarity, and some texts write A∼sBA \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:V→VT: V \to V has matrix AA in basis B\mathcal{B} and matrix A′A' in basis C\mathcal{C}, then

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


where P=PB←CP = P_{\mathcal{B} \leftarrow \mathcal{C}} is the change-of-basis matrix from C\mathcal{C} to B\mathcal{B}: [v]B=P[v]C[\mathbf{v}]_\mathcal{B} = P[\mathbf{v}]_\mathcal{C}, and its columns are the C\mathcal{C} basis vectors written in B\mathcal{B}-coordinates.

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 with P−1=PC←BP^{-1} = P_{\mathcal{C} \leftarrow \mathcal{B}}: [T(v)]C=P−1[T(v)]B=P−1A[v]B=P−1AP[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 P−1APP^{-1}AP.

Fact: Every matrix is similar to its transpose
For every square AA there is an invertible PP with AT=P−1APA^T = P^{-1}AP, even though rows and columns trade places. Transposing does not change the rank of A−λIA - \lambda I or of any of its powers, and those ranks are exactly what decides similarity.

Two matrices related by A′=P−1APA' = 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′=P−1APA' = P^{-1}AP implies A=PA′P−1A = PA'P^{-1}), and it is transitive.

Similarity can join matrices whose entries look nothing alike. Because PP may be any invertible matrix, a triangular matrix can be similar to one with no zero entries at all. Deciding whether two given matrices are similar means finding such a PP, and the entries alone give little hint of where to look.

P−1APP^{-1}AP translates new coordinates into old ones, applies AA, and translates the answer back.

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′=P−1AP⇒{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 →


Pitfall: Treating shared invariants as proof of similarity
Calling II and (1101)\begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} similar because both have trace 22, determinant 11, rank 22 and eigenvalues 1,11, 1 reads the rule backwards. P−1IP=IP^{-1}IP = I for every PP, so II is similar only to itself.

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

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

The eigenvalues are preserved: det⁡(P−1AP−λI)=det⁡(P−1(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 P−1APP^{-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:

Diagonalization as a Change of Basis
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=PDP−1,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=P−1APD = P^{-1}AP.

Diagonalization is the most powerful application of basis change. It reduces matrix powers to diagonal powers: Ak=PDkP−1=P diag(λ1k,…,λnk) P−1A^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.

THEOREM
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.

Pitfall: Blaming the repeated eigenvalue
Ruling out diagonalization because λ=2\lambda = 2 is repeated would also rule out 2I2I, which has the same repeated eigenvalue and is already diagonal. What fails for AA is the eigenspace: dimension 11, below the multiplicity 22.

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 (P−1=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.

THEOREMSpectral Theorem
The Spectral Theorem states that every real symmetric matrix is orthogonally similar to a diagonal matrix.

Pitfall: Transposing before normalizing
For A=(2112)A = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix}, using PTP^T as P−1P^{-1} with the eigenvectors (1,1)(1, 1) and (1,−1)(1, -1), orthogonal but not unit, gives PTAP=(6002)P^TAP = \begin{pmatrix} 6 & 0 \\ 0 & 2 \end{pmatrix} instead of DD. Dividing each column by 2\sqrt{2} makes PP orthogonal, and then PTAP=(3001)P^TAP = \begin{pmatrix} 3 & 0 \\ 0 & 1 \end{pmatrix}.

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=PDP−1A = PDP^{-1}.

The characteristic polynomial is det⁡(A−λI)=(4−λ)(3−λ)−2=λ2−7λ+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: (A−2I)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: (A−5I)v=0(A - 5I)\mathbf{v} = \mathbf{0} gives (−112−2)v=0\begin{pmatrix} -1 & 1 \\ 2 & -2 \end{pmatrix}\mathbf{v} = \mathbf{0}, so v2=(1,1)\mathbf{v}_2 = (1, 1).

Worked Example: Full Basis Change
P=(11−21),D=(2005)P = \begin{pmatrix} 1 & 1 \\ -2 & 1 \end{pmatrix}, \quad D = \begin{pmatrix} 2 & 0 \\ 0 & 5 \end{pmatrix}

Pitfall: Swapping P and its inverse
Recombining as P−1DPP^{-1}DP instead of PDP−1PDP^{-1} gives (4−1−23)\begin{pmatrix} 4 & -1 \\ -2 & 3 \end{pmatrix}, not AA. With the eigenvectors as its columns, PP stands on the left of DD: A=PDP−1A = PDP^{-1}.

Verification: P−1=13(1−121)P^{-1} = \frac{1}{3}\begin{pmatrix} 1 & -1 \\ 2 & 1 \end{pmatrix}, and PDP−1=(11−21)(2005)13(1−121)=(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=PD10P−1=P(21000510)P−1=P(1024009765625)P−1A^{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 over ℝ when every eigenvalue is real) 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 P−1APP^{-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=P−1APD = 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=P−1APD = 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 P−1=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=P−1APJ = 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=U∗AUT = 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.

Common Pitfalls

Five mistakes account for many wrong answers on this topic. Each is marked with a box where it happens in the sections above; here each is worked through in full, with the wrong and the right working side by side.

Converting in the wrong direction

The matrix PP is built from the vectors of the new basis B\mathcal{B}, so it takes B\mathcal{B}-coordinates to standard coordinates. To find the B\mathcal{B}-coordinates of a vector given in standard coordinates, PP is applied to them anyway.

Wrong working: with B={(1,1),(1,−1)}\mathcal{B} = \{(1, 1), (1, -1)\}, P=(111−1)P = \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} and v=(3,1)\mathbf{v} = (3, 1),
P(31)=(42)P\begin{pmatrix} 3 \\ 1 \end{pmatrix} = \begin{pmatrix} 4 \\ 2 \end{pmatrix}

taken as the B\mathcal{B}-coordinates of v\mathbf{v}.

Right working: solve Pc=(3,1)P\mathbf{c} = (3, 1), that is c1+c2=3c_1 + c_2 = 3 and c1−c2=1c_1 - c_2 = 1. This gives c1=2c_1 = 2, c2=1c_2 = 1, the same as
P−1(31)=1−2(−1−1−11)(31)=(21)P^{-1}\begin{pmatrix} 3 \\ 1 \end{pmatrix} = \frac{1}{-2}\begin{pmatrix} -1 & -1 \\ -1 & 1 \end{pmatrix}\begin{pmatrix} 3 \\ 1 \end{pmatrix} = \begin{pmatrix} 2 \\ 1 \end{pmatrix}


Why it happens: PP is made of the B\mathcal{B} vectors, so it feels like the matrix that produces B\mathcal{B}-coordinates. It does the opposite: it takes B\mathcal{B}-coordinates as its input.

How to check: rebuild the vector from the coordinates. 2(1,1)+1(1,−1)=(3,1)2(1, 1) + 1(1, -1) = (3, 1), as it should be, while 4(1,1)+2(1,−1)=(6,2)4(1, 1) + 2(1, -1) = (6, 2) is a different vector.

Treating shared invariants as proof of similarity

Two matrices turn out to have the same trace, determinant, rank and eigenvalues, and they are declared similar. These invariants are necessary for similarity, not sufficient.

Wrong working: II and N=(1101)N = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} both have trace 22, determinant 11, rank 22 and characteristic polynomial (λ−1)2(\lambda - 1)^2, so they are similar.

Right working: for every invertible PP,
P−1IP=P−1P=IP^{-1}IP = P^{-1}P = I

so the only matrix similar to II is II itself, and NN is not similar to II. NN is a defective matrix of the kind described in the section on when diagonalization fails.

Why it happens: the list of invariants is read in both directions, as something similar matrices share and as a test that proves similarity.

How to check: a differing invariant proves two matrices are not similar; matching invariants prove nothing. Here the eigenspaces differ: N−I=(0100)N - I = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} has rank 11, so the eigenspace of NN for λ=1\lambda = 1 is one-dimensional, while for II it is all of R2\mathbb{R}^2.

Blaming the repeated eigenvalue

A repeated root of the characteristic polynomial is taken as the reason a matrix cannot be diagonalized.

Wrong working: A=(2102)A = \begin{pmatrix} 2 & 1 \\ 0 & 2 \end{pmatrix} and 2I2I both have characteristic polynomial (λ−2)2(\lambda - 2)^2, so neither is diagonalizable.

Right working: compare the dimension of each eigenspace with the multiplicity. For AA, A−2I=(0100)A - 2I = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} has rank 11, so the eigenspace has dimension 2−1=1<22 - 1 = 1 < 2, and AA is not diagonalizable. For 2I2I, 2I−2I2I - 2I is the zero matrix, the eigenspace has dimension 22, and 2I2I is diagonalizable; it is already diagonal, with P=IP = I.

Why it happens: distinct eigenvalues guarantee a diagonalization, and the converse is assumed without checking, as if a repeated eigenvalue prevented it.

How to check: for each repeated eigenvalue λ\lambda, compute n−rank(A−λI)n - \text{rank}(A - \lambda I) and compare it with the multiplicity of λ\lambda.

Transposing before normalizing

For a symmetric matrix the eigenvectors are orthogonal, and PTP^T is used in place of P−1P^{-1}. But the eigenvectors were not scaled to length 11, so PP is not an orthogonal matrix.

Wrong working: A=(2112)A = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix} has eigenvalues 33 and 11, with eigenvectors (1,1)(1, 1) and (1,−1)(1, -1). With P=(111−1)P = \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix},
PTAP=(111−1)(313−1)=(6002)P^TAP = \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}\begin{pmatrix} 3 & 1 \\ 3 & -1 \end{pmatrix} = \begin{pmatrix} 6 & 0 \\ 0 & 2 \end{pmatrix}


Right working: divide each eigenvector by its length 2\sqrt{2}.
Q=12(111−1),QTAQ=12(6002)=(3001)=DQ = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}, \qquad Q^TAQ = \frac{1}{2}\begin{pmatrix} 6 & 0 \\ 0 & 2 \end{pmatrix} = \begin{pmatrix} 3 & 0 \\ 0 & 1 \end{pmatrix} = D


Why it happens: perpendicular columns sound like enough for an orthogonal matrix, but an orthogonal matrix needs orthonormal columns, each of length 11.

How to check: compute PTPP^TP. Here PTP=2IP^TP = 2I, not II, so PT=2P−1P^T = 2P^{-1}, and PTAPP^TAP comes out as 2D2D.

Swapping P and its inverse

The eigenvalues and eigenvectors are correct, but PP, DD and P−1P^{-1} are multiplied in the wrong order, as P−1DPP^{-1}DP instead of PDP−1PDP^{-1}.

Wrong working: with P=(11−21)P = \begin{pmatrix} 1 & 1 \\ -2 & 1 \end{pmatrix}, D=(2005)D = \begin{pmatrix} 2 & 0 \\ 0 & 5 \end{pmatrix} and P−1=13(1−121)P^{-1} = \frac{1}{3}\begin{pmatrix} 1 & -1 \\ 2 & 1 \end{pmatrix} from the worked example,
P−1DP=13(1−121)(2005)(11−21)=(4−1−23)P^{-1}DP = \frac{1}{3}\begin{pmatrix} 1 & -1 \\ 2 & 1 \end{pmatrix}\begin{pmatrix} 2 & 0 \\ 0 & 5 \end{pmatrix}\begin{pmatrix} 1 & 1 \\ -2 & 1 \end{pmatrix} = \begin{pmatrix} 4 & -1 \\ -2 & 3 \end{pmatrix}


Right working: PDP−1=(4123)=APDP^{-1} = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix} = A, as in the verification step of the worked example.

Why it happens: both orders put DD between PP and P−1P^{-1}, and the page uses both A=PDP−1A = PDP^{-1} and D=P−1APD = P^{-1}AP, which have the inverse on opposite sides.

How to check: trace and determinant do not catch this, since the wrong matrix also has trace 77 and determinant 1010. Check an eigenvector instead: A(1,−2)=(2,−4)=2(1,−2)A(1, -2) = (2, -4) = 2(1, -2), while the wrong matrix sends (1,−2)(1, -2) to (6,−8)(6, -8).

Change of Basis FAQ

Does similarity preserve symmetry, zeros or sparsity?

+
None of them in general. The expression P−1APP^{-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:V→WT : V \to W needs an independent basis choice at each end, giving A′=Q−1APA' = 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 A′A' need not even be the same size.Read more →