Engineering/Mathematics/Eigenvalues
Properties of Similar Matrices
Similarity partitions the square matrices of each size into disjoint classes, because it is reflexive, symmetric and transitive. Within a class every matrix shares the same characteristic polynomial, and therefore the same eigenvalues, trace, determinant and rank — but the converse fails, and knowing why is the point at which similarity stops being obvious.
- Core level
- Stream: similarity
- Reading time 15 min
- Ref KVS-ENG-MATH-0087
- Taxonomy
- Engineering / Mathematics
- Relation type
- Equivalence — reflexive, symmetric, transitive
- Key invariant
- Also invariant
- Trace, determinant, rank, eigenspace dimensions
- Not invariant
- Entries, symmetry, sparsity, singular values
- Converse
- False — equal spectra do not imply similarity
Overview
Similarity was defined by an existential condition: and are similar when some non-singular satisfies . Existential definitions are awkward to work with, because refuting one requires ruling out every possible . The results on this page convert that awkwardness into something usable. First, similarity behaves like a weakened form of equality — it is an equivalence relation, so it partitions matrices into disjoint classes and any member of a class represents the whole class. Second, a list of computable quantities is constant across each class, so a single mismatch refutes similarity outright.
The equivalence properties are proved by exhibiting the required matrix in each case. Reflexivity uses the identity. Symmetry uses in place of . Transitivity composes two transformations into one, using the fact that the product of non-singular matrices is non-singular and that . Each proof is short, but together they license the entire language of similarity classes and canonical representatives.
The central invariant is the characteristic polynomial. Its proof is a determinant computation: and can be factored out of because commutes with everything, and their determinants multiply to one. Because the characteristic polynomial is preserved, so is everything derivable from it — the eigenvalues, their algebraic multiplicities, the trace as a coefficient, and the determinant as the constant term. Geometric multiplicities are preserved too, by a separate but equally short argument about the transformed eigenvectors.
The converse is false, and the counterexample is worth carrying around. The identity matrix of size two and the matrix with an extra one above the diagonal share the characteristic polynomial , yet the identity is similar to nothing but itself, because for every . Equal spectra are therefore a necessary but not sufficient condition. The full invariant that does characterise similarity is the Jordan structure — eigenvalues together with the sizes of their blocks — which is exactly the information the characteristic polynomial discards.
Definition
Equivalence Relation
ERA relation on a set is an equivalence relation when it is reflexive (every element relates to itself), symmetric (if relates to then relates to ) and transitive (if relates to and to then relates to ).
An equivalence relation partitions its set into disjoint classes. Every element belongs to exactly one class, so a single representative can stand for all the others.
Similarity Invariant
SIA quantity computed from a square matrix is a similarity invariant when it takes the same value on every matrix in a similarity class. Trace, determinant, rank, the characteristic polynomial, the eigenvalues with their algebraic and geometric multiplicities, and the minimal polynomial are all invariants.
A mismatch in any invariant proves two matrices are not similar. Agreement in all listed invariants does not prove that they are.
Concepts
Similarity is reflexive
Every square matrix is similar to itself. The identity matrix is non-singular, since it row-reduces to itself, and . The observation is trivial to prove but not vacuous: without reflexivity the relation would not partition matrices into classes, and a matrix could fail to belong to any class at all. Reflexivity is what guarantees that every matrix has a similarity class to belong to, and hence that a search for a simple representative of that class is a well-posed question.
Similarity is symmetric
Suppose with non-singular. Then is itself invertible and therefore non-singular, so it is an admissible similarity matrix. Substituting it into the definition gives . So is similar to via . This is why the phrasing and are similar requires no ordering, and why the direction of the transformation is a matter of convenience rather than of mathematics.
Similarity is transitive
Suppose and with and both non-singular. The product is invertible because the product of invertible matrices is invertible, and its inverse is — note the reversal of order. Then , so is similar to via . Transitivity is what allows a chain of coordinate changes to be collapsed into a single one, which is precisely how iterative eigenvalue algorithms accumulate their transformations.
Similar matrices share a characteristic polynomial
Let . Since commutes with and , the shifted matrix factors as . Taking determinants and using multiplicativity, . The scalars commute, so the outer factors combine to , leaving . Everything read from the characteristic polynomial is therefore an invariant: the eigenvalues, their algebraic multiplicities, the trace as the coefficient of up to sign, and the determinant as the value at .
Geometric multiplicities are invariant too
The characteristic polynomial does not see eigenspace dimensions, so those require a separate argument — and they survive as well. From it follows that , and multiplying a matrix on either side by a non-singular matrix leaves its rank unchanged. So and hence . Similarity can therefore never repair or introduce a defect: a defective matrix is similar only to defective matrices, which is exactly why some matrices cannot be diagonalised.
The converse fails, and why
Consider and . Both have characteristic polynomial , so every polynomial-derived invariant agrees. Yet they are not similar: for any non-singular , . The identity is alone in its similarity class. The invariant that separates the two is the geometric multiplicity of — two for , one for — and more finely the Jordan block structure. Equal characteristic polynomials are a screening test, never a proof.
What similarity classes are for
Because similarity is an equivalence relation, a question about an entire class reduces to a question about one convenient representative. The programme of canonical forms is exactly this: find, for each class, a distinguished member that is as simple as possible. Diagonal where the class permits it, Jordan in general over , real Schur where numerical stability dominates. Once a canonical representative is fixed, deciding whether two matrices are similar becomes a matter of computing both canonical forms and comparing them — the same logic that makes reduced row-echelon form the decisive test for row equivalence.
Deciding whether two square matrices are similar
Equations
Reflexivity
EQ-PSM-01The identity matrix is non-singular, so every square matrix is similar to itself and belongs to a similarity class.
Symmetry
EQ-PSM-02The reverse transformation uses , which is non-singular whenever is. The relation therefore needs no direction.
Transitivity
EQ-PSM-03Two similarity transformations compose into one, with the transformation matrices multiplying in the order and inverting in the reverse order.
Factoring the shifted matrix
EQ-PSM-04The step that makes the characteristic polynomial invariant. It works because commutes with every matrix of the same size.
Equality of characteristic polynomials
EQ-PSM-05Multiplicativity of the determinant plus commutativity of scalar multiplication collapse the outer factors to .
Invariance of eigenspace dimensions
EQ-PSM-06Multiplying by non-singular matrices on either side preserves rank, so geometric multiplicities transfer even though the characteristic polynomial cannot see them.
Failure of the converse
EQ-PSM-07Equal characteristic polynomials with different eigenspace dimensions: while .
Variable Definitions
| Symbol | Name | Meaning | Domain / type |
|---|---|---|---|
| First matrix | A square matrix of size | n x n complex matrix | |
| Second matrix | A square matrix compared with for similarity | n x n complex matrix | |
| Third matrix | Used in the transitivity argument | n x n complex matrix | |
| First similarity matrix | Non-singular matrix relating and | n x n non-singular | |
| Second similarity matrix | Non-singular matrix relating and | n x n non-singular | |
| Composed transformation | Product realising the transitive similarity from to | n x n non-singular | |
| Characteristic polynomial | , invariant across a similarity class | polynomial of degree n | |
| Geometric multiplicity | Eigenspace dimension, invariant under similarity | 1 to n | |
| Identity matrix | Realises reflexivity and is similar only to itself | n x n matrix |
Worked Numerical Example
Problem statement
Three state matrices arrive from three separate modelling teams working on the same physical system in different coordinate conventions. Establish that all three describe the same dynamics, and then refute a fourth team's claim that a proposed simplified model is also equivalent.
The three candidate matrices
The first is the physical symmetric form; the second and third come from successive coordinate changes and look nothing like it or like each other.
Screen with the cheap invariants
All three traces are : , and . All three determinants are . Nothing is proved yet, but nothing is refuted either, so the investigation continues.
Exhibit the first transformation
The second team's change of variables is recorded by the matrix , with so that is integral. Direct multiplication confirms the relation.
Exhibit the second transformation
The third team applied a further shear to the first two coordinates, recorded by with . Again the relation is verified by multiplication.
Compose the two by transitivity
Transitivity says is similar to via the single matrix , with . Forming the product and checking directly confirms it, so all three teams' matrices lie in one similarity class.
Confirm the shared spectrum
All three matrices have the same characteristic polynomial, so the same eigenvalues with the same algebraic multiplicities. The three models predict identical dynamics regardless of the coordinates each team used.
Test the fourth team's proposal
A fourth team proposes replacing the model with a matrix whose spectrum matches but whose structure is simpler. Consider the two-dimensional analogue of their argument: and share the characteristic polynomial , and the proposal is that this makes them interchangeable.
Refute the claim
It does not. For any non-singular , , so the only matrix similar to is itself. The invariant that separates them is the eigenspace dimension at : gives , while gives . Equal spectra were never sufficient.
The first three matrices are pairwise similar and therefore describe the same operator in three coordinate systems; the eigenvalues , and are properties of the physical system, not of any team's conventions. The fourth proposal fails: matching the characteristic polynomial is a screening test only, and the deeper invariant — the dimension of each eigenspace, and beyond it the Jordan block structure — must also agree before two models can be substituted for one another.
Applications & Industry Use
Equivalence of state-space realisations
Two realisations of the same transfer function differ by a similarity transformation of the state matrix, so they share poles, stability and the characteristic polynomial. Verifying that a delivered implementation is a valid realisation of a designed controller is a similarity check, and equal pole locations alone do not establish it.
Correctness of eigenvalue algorithms
The QR iteration produces a sequence of matrices each similar to the last, so the spectrum is invariant throughout by construction. This invariance is what makes the algorithm's convergence to a triangular form a valid computation of the original eigenvalues rather than of some other matrix's.
Frame independence of modal properties
A structural model expressed in global, local or modal coordinates gives three similar system matrices. Natural frequencies, being eigenvalues, are identical across all three, which is the mathematical guarantee that a computed frequency is a property of the structure rather than of the analyst's coordinate choice.
Invariant time constants under variable transformation
Recasting a linearised model in terms of deviation variables, dimensionless groups or reaction extents transforms the Jacobian by similarity. The relaxation time constants are unchanged, which provides a strong consistency check on any change of variables performed during model reduction.
Cross-validating models from different vendors
Two vendors supplying small-signal models of the same plant in different state orderings and scalings should produce similar matrices. Comparing trace, determinant and characteristic polynomial is a fast screening test; a disagreement identifies a modelling discrepancy immediately, while agreement warrants a deeper eigenspace comparison.
Frame-independent manipulability measures
Only similarity invariants can serve as coordinate-free performance indices. Eigenvalues of a Jacobian-derived square matrix qualify; individual entries, the matrix norm and the singular values do not, since the latter change under a non-orthogonal change of frame. Choosing an index from the invariant list avoids conclusions that depend on the frame in which the analysis happened to be run.
Design Considerations
Use invariants to refute, canonical forms to confirm
Trace, determinant and characteristic polynomial are cheap and definitive when they disagree. They prove nothing when they agree. Structure any similarity investigation to run the cheap refutations first, and reach for a canonical form or an explicit only when the screening tests have all passed.
Include the geometric multiplicities in the comparison
The most common false conclusion in this area is that equal spectra imply similarity. Adding one rank computation per distinct eigenvalue closes the most frequent gap at modest cost and catches exactly the identity-against-Jordan-block failure mode. Where a definitive answer is needed, compare full Jordan structures.
Exploit transitivity to collapse transformation chains
A sequence of coordinate changes accumulates into a single matrix product, so intermediate transformations need not be stored. Numerical eigenvalue algorithms rely on this: each orthogonal step is multiplied into an accumulating matrix, and only the accumulated result is retained.
Do not use non-invariants as equivalence tests
Matrix norms, singular values, condition numbers, symmetry and sparsity patterns are all destroyed by a general similarity transformation. Comparing two models on any of these will produce disagreement between genuinely equivalent descriptions. Restrict comparisons to the invariant list, or fix the coordinate system before comparing.
Treat numerical invariance as approximate
In floating point, a computed similarity transformation preserves the invariants only to within the conditioning of . Trace and determinant will not match exactly, and characteristic polynomial coefficients may differ in several digits. Compare with a relative tolerance scaled to the matrix norm, and prefer orthogonal transformations, which preserve the invariants to near machine precision.
Record the transformation, not just the result
When a model is delivered in transformed coordinates, retaining allows results to be mapped back to physical variables. Without it, eigenvalues remain interpretable but eigenvectors, state trajectories and physical bounds do not. Treat as part of the deliverable rather than as scratch work.
Standards & Codes
Notation, interchange and numerical standards that govern how this material is written down, stored and computed in production systems.
| Reference | Title | Relevance to this topic |
|---|---|---|
ISO 80000-2 | Quantities and units — Part 2: Mathematics | Governs the notation for the determinant and trace operators and the inverse superscript used throughout the invariance proofs on this page. |
LAPACK reference implementation | Linear Algebra PACKage Schur and Hessenberg routines | xGEES accumulates a sequence of orthogonal similarity transformations into a single matrix , an application of transitivity that lets the algorithm report both the Schur form and the transformation that produced it. |
IEC 61131-3 | Programmable controllers — Programming languages | State-space function blocks are realisation-dependent; verifying that an implemented block is similar to the designed one is the acceptance test for a controller delivered under this standard. |
IEEE 754-2019 | IEEE Standard for Floating-Point Arithmetic | Determines the tolerance at which computed invariants such as trace and determinant can be expected to agree between two numerically similar matrices. |
ISO/IEC 40314 | Mathematical Markup Language (MathML) Version 3.0 | Encodes the invariance identities and matrix displays as semantic markup so that the argument remains machine-readable and accessible. |
Material Selection
For a mathematical topic, "material" is the numeric representation: the scalar field, storage format and precision the computation is built from.
| Representation | Select when | Trade-off |
|---|---|---|
| Exact rational or integer arithmetic | Similarity must be proved or refuted definitively, as in a model acceptance test. | Invariants agree exactly or not at all, removing every tolerance decision; limited to small matrices and rational data. |
| Unimodular integer transformations | Hand or symbolic construction of similarity chains where must remain integral. | Every intermediate quantity stays an integer and transitivity products remain exact, but such transformations cannot generally diagonalise. |
| Orthogonal transformations in binary64 | Numerical work where the invariants must be preserved to near machine precision. | Backward stable and norm-preserving, so invariants survive; cannot reach a diagonal form for a non-normal matrix. |
| General binary64 transformations | A diagonal or otherwise simple representative is needed and the transformation is well conditioned. | Reaches simpler forms but degrades the invariants by a factor of ; report the condition number alongside any invariant comparison. |
| Characteristic polynomial coefficients as the comparison key | A quick equivalence screen between two models is wanted. | Compact and easy to compare, but numerically ill-conditioned; two genuinely similar matrices can produce noticeably different computed coefficients. |
| Sorted eigenvalue list plus eigenspace ranks | A practical numerical similarity screen that is more robust than polynomial coefficients. | Far better conditioned than coefficient comparison and catches the identity-against-Jordan case, but requires a clustering tolerance for repeated eigenvalues. |
Manufacturing Notes
Implementation notes — how the result is actually produced by hand, by algorithm and by library, including cost and numerical behaviour.
Cost of the screening tests
The trace costs additions. The determinant costs about by LU factorisation. A rank computation per distinct eigenvalue costs a further each. A full eigendecomposition, which subsumes all of these, costs about . Running the cheap tests first is worth several orders of magnitude on large matrices.
Verifying a claimed similarity without inverting
To confirm , check instead. This uses two matrix multiplications and no inversion, avoids the error amplification of forming , and produces a residual that can be compared against times the machine epsilon.
Accumulating transformations
Transitivity is implemented in practice by maintaining a running product. Initialise an accumulator to and multiply each new transformation into it as the algorithm proceeds. For orthogonal steps this preserves orthogonality to machine precision; for general steps the accumulated condition number should be monitored, since it multiplies across the chain.
Library behaviour
No library exposes a similarity test directly. The practical route is numpy.linalg.eigvals on both matrices with a sorted comparison, followed by numpy.linalg.matrix_rank on and for each eigenvalue. For exact work, sympy.Matrix.jordan_form gives the complete invariant and settles the question outright, at a cost that grows quickly with size.
Numerical caution on the characteristic polynomial
Comparing characteristic polynomial coefficients is an appealing but poorly conditioned test. Coefficients are extremely sensitive to matrix perturbations, so two matrices that are similar to within roundoff can produce coefficient lists that differ in the first few significant digits. Compare sorted eigenvalues with a relative tolerance instead.
Failure Modes & Common Mistakes
| Failure mode / mistake | Impact | Root cause | Prevention & detection |
|---|---|---|---|
| Concluding similarity from equal eigenvalues | high | Treating the characteristic polynomial as a complete invariant, as with against a Jordan block. | Add a geometric multiplicity comparison for every eigenvalue, and use the Jordan form when a definitive answer is required. |
| Reversing the order in | high | Writing instead of when composing two transformations. | Inversion reverses the order of a product. Verify the composed transformation by direct multiplication rather than relying on the algebra alone. |
| Comparing non-invariant quantities | medium | Using matrix norms, singular values or symmetry to decide whether two models are equivalent. | Restrict comparisons to the invariant list. Non-invariants will disagree between genuinely similar matrices and lead to a false refutation. |
| Testing exact equality of invariants in floating point | medium | Requiring computed traces or determinants to match bit for bit after a numerical transformation. | Compare with a relative tolerance scaled to the matrix norm and to the condition number of the transformation used. |
| Assuming symmetry is a similarity invariant | medium | Refuting a similarity because one matrix is symmetric and the other is not. | Symmetry is coordinate-dependent and is destroyed by a general similarity. Only an orthogonal transformation preserves it. |
| Forgetting reflexivity when reasoning about classes | low | Treating similarity as a strict relation that excludes a matrix from being similar to itself. | Reflexivity via is what makes the classes a partition. Every matrix belongs to exactly one class, its own included. |
| Assuming similarity preserves the condition number | medium | Transforming a well-conditioned model into new coordinates and expecting the numerical behaviour to carry across. | The condition number is not a similarity invariant. Recompute it after any non-orthogonal transformation, and prefer orthogonal transformations when conditioning matters. |
| Using similarity where equivalence is meant | low | Applying the two-sided form to rectangular matrices or to a problem where independent left and right transformations are appropriate. | Similarity is for square matrices with tied left and right factors. For rectangular matrices use equivalence, , whose complete invariant is the rank. |
FAQs
Why does it matter that similarity is an equivalence relation?
Because an equivalence relation partitions the set of square matrices of a given size into disjoint classes, and every matrix belongs to exactly one class. That justifies the whole programme of canonical forms: a question about a class can be answered by computing with one convenient representative, and two matrices are similar precisely when their canonical representatives agree.
Why do similar matrices have the same characteristic polynomial?
Because commutes with and , so factors as . Taking determinants and using multiplicativity gives , and the outer determinants multiply to . The middle factor is , so .
If two matrices have the same characteristic polynomial, are they similar?
No. The identity matrix of size two and the matrix with ones on the diagonal and one above it both have characteristic polynomial , but the identity is similar only to itself since for every non-singular . The eigenspace dimensions differ, which the characteristic polynomial cannot detect.
Which quantities are guaranteed to survive a similarity transformation?
The characteristic polynomial and everything derived from it — eigenvalues, algebraic multiplicities, trace and determinant — plus the rank, the nullity, the geometric multiplicity of every eigenvalue, the minimal polynomial and the Jordan block structure. Entries, symmetry, sparsity, norms, singular values and the condition number are not preserved.
How do I actually prove two matrices are similar?
Either exhibit a non-singular and verify by multiplication, or compute the Jordan form of each over and confirm the forms agree up to block ordering. The invariant comparisons are screening tests: they can refute similarity conclusively but can never confirm it.
Can a symmetric matrix be similar to a non-symmetric one?
Yes, routinely. Symmetry depends on the coordinate system and is destroyed by any similarity transformation whose matrix is not orthogonal. The worked example on this page transforms a symmetric matrix into a non-symmetric one that shares every intrinsic property. Preserving symmetry requires restricting to orthogonal or unitary transformations.
Does similarity preserve whether a matrix is diagonalisable?
Yes. Diagonalisability depends only on whether the geometric multiplicities sum to , and geometric multiplicities are invariant under similarity because multiplying by a non-singular matrix on either side preserves rank. A defective matrix is therefore similar only to defective matrices, which is why the defect cannot be transformed away.
References
- Beezer, R. A. A First Course in Linear Algebra, Version 0.70. University of Puget Sound, 2006. Section SD, Subsection PSM. Licensed under the GNU Free Documentation License v1.2.
- Horn, R. A. and Johnson, C. R. Matrix Analysis, 2nd edition. Cambridge University Press, 2012. Chapter 3, Canonical Forms.
- Golub, G. H. and Van Loan, C. F. Matrix Computations, 4th edition. Johns Hopkins University Press, 2013. Section 7.1.
- ISO 80000-2:2019, Quantities and units — Part 2: Mathematics. International Organization for Standardization.
- Anderson, E. et al. LAPACK Users' Guide, 3rd edition. Society for Industrial and Applied Mathematics, 1999.
AI Suggested Questions
- Give a complete set of invariants that determines a similarity class over , and explain why the characteristic polynomial alone is insufficient.
- Show that the minimal polynomial is a similarity invariant and give two matrices distinguished by it but not by the characteristic polynomial.
- Prove that a matrix is similar to its own transpose, and explain why the same is not true of the adjoint in general.
- How many similarity classes of complex matrices have characteristic polynomial , and what distinguishes them?
- Describe a numerically robust procedure for deciding whether two floating-point matrices are similar to within a stated tolerance.
- Why do the singular values of a matrix fail to be similarity invariants, and what transformation group do they belong to instead?
Related Calculators
Compare trace, determinant, characteristic polynomial and eigenspace dimensions of two matrices and report whether similarity is refuted.
Similarity Transformation CalculatorForm , compose chained transformations and verify the result by checking .
Jordan Form CalculatorCompute the exact Jordan canonical form and block structure, the complete invariant of a similarity class.
