Engineering/Mathematics/Representations
Matrix Representations and Similarity
Two matrix representations of the same transformation, taken on different bases, are related by . Similarity is therefore not an abstract equivalence imposed on matrices: it is exactly the relation between two descriptions of one operator.
- Advanced level
- Stream: similarity
- Reading time 16 min
- Ref KVS-ENG-MATH-0115
- Taxonomy
- Engineering / Mathematics
- Prerequisite
- Matrix representation, change-of-basis matrix, similar matrices
- General rule
- Square case
- Invariant
- Characteristic polynomial, eigenvalues, determinant, trace, rank
- Goal
- Choose a basis that makes the representation diagonal
Overview
A transformation has one matrix representation for every pair of bases, and the entries can differ completely between them. The question that organises this section is how two such representations of a single transformation are related. The answer is a two-sided formula: convert the input coordinates into the basis the known representation expects, apply it, then convert the output coordinates into the basis wanted. Each conversion is a change-of-basis matrix, so the new representation is the old one flanked by two conversions.
The case that matters most is a transformation of a space to itself, represented with one basis at both ends. The general formula then collapses into , which is exactly the definition of two matrices being similar. This identifies the abstract relation of similarity with a concrete situation: two matrices are similar precisely when they represent the same transformation with respect to two bases, and the similarity matrix is the change of basis between them.
Everything preserved by similarity is therefore a property of the transformation rather than of the description. Similar matrices share a characteristic polynomial, and hence share eigenvalues with their algebraic multiplicities, determinant, trace and rank. Those quantities can be computed from any convenient representation and attributed to the transformation itself. Eigenvectors correspond as well, not by being equal but by being related through the coordinatisation map: is an eigenvector of if and only if is an eigenvector of , with the same eigenvalue.
This turns basis choice into a design problem with a clear objective. Among all the representations of a transformation, some are dense and unreadable and some are diagonal. If a basis of eigenvectors exists, representing the transformation in it produces a diagonal matrix whose entries are the eigenvalues, and every subsequent computation becomes elementwise. Diagonalisation, modal analysis and decoupling of dynamic systems are the same manoeuvre viewed from three engineering vantage points.
Definition
Similar Matrices
SIMSquare matrices and of the same size are similar, written , when there is a non-singular matrix with . Similarity is an equivalence relation, and its equivalence classes are precisely the sets of all matrix representations of one linear transformation of a space to itself.
Similarity is stronger than having the same rank or the same size. Two matrices can share every dimension-based invariant and still fail to be similar, because similarity also preserves the characteristic polynomial and the whole eigenstructure.
Matrix Representation and Change of Basis
MRCBLet be a linear transformation, with and bases of and and bases of . Then the representations relative to the two pairs are related by . The right-hand factor converts the incoming coordinates and the left-hand factor converts the outgoing ones.
Similarity and Change of Basis
SCBFor and bases and of , taking and in the general rule gives . Any two square representations of one transformation are therefore similar, with the change-of-basis matrix as the similarity matrix.
Concepts
The two-sided conversion rule
The general theorem is proved by writing every factor as a representation and applying the composition rule. Because and , the product represents , which is itself, relative to and . Every step is bookkeeping with the composition rule; the content is in the observation that inserting identity transformations costs nothing and changes the bases in exactly the way required.
Why similarity and not congruence or equivalence
Three different relations appear when matrices are transformed on both sides, and confusing them is a persistent source of error. General two-sided conversion by different matrices, , is matrix equivalence and preserves only rank. Conversion by is congruence, which is what happens to a bilinear or quadratic form under a change of basis and preserves inertia rather than eigenvalues. Similarity, , is what happens to a linear transformation under a change of basis, and it preserves the whole spectrum. The correct relation is determined by the kind of object being re-expressed.
Invariants become properties of the transformation
Similar matrices have equal characteristic polynomials, because . Consequently they share eigenvalues with multiplicities, determinant, trace and rank. Since all representations of one transformation are mutually similar, each of these quantities may be computed from any representation and attributed to the transformation. This is the precise sense in which the eigenvalues of an operator do not depend on the coordinates used to describe it.
Eigenvectors correspond through the coordinatisation
The correspondence for eigenvectors is exact but not literal: is an eigenvector of for if and only if is an eigenvector of for . The proof is one application of the fundamental theorem in each direction. Two representations on different bases therefore have eigenvectors that are related by the change-of-basis matrix, which is why an eigenvector computed in one coordinate system must be converted, not copied, before use in another.
Diagonalisation as an optimal basis choice
If possesses a basis of eigenvectors, then each basis vector maps to a multiple of itself and the representation relative to is diagonal, holding the eigenvalues. Written through the similarity rule with a convenient starting basis, this reads , which is exactly the diagonalisation of a matrix by its eigenvector matrix. The abstract statement and the matrix recipe are one theorem.
When diagonalisation is unavailable
Not every transformation has an eigenbasis. When the geometric multiplicities fail to sum to the dimension, the best available representations are triangular or block diagonal rather than diagonal. A unitary change of basis always achieves an upper triangular representation with the eigenvalues on the diagonal, and a general change of basis achieves the Jordan form. In numerical practice the triangular route is preferred, because it can be reached by a well conditioned orthonormal basis change, whereas the Jordan form requires a basis that may be arbitrarily badly conditioned.
Re-representing a transformation on a better basis
Equations
Representation under a change of both bases
EQ-MRS-01For , with and bases of and and bases of . The rightmost factor converts input coordinates, the leftmost converts output coordinates.
Similarity and change of basis
EQ-MRS-02The square case, obtained by using one basis at both ends of each representation. Any two square representations of one transformation are similar.
Definition of similarity
EQ-MRS-03Conversely, every similarity arises as a change of basis between two representations of a single transformation.
Invariance of the characteristic polynomial
EQ-MRS-04Hence eigenvalues with algebraic multiplicities, determinant, trace and rank are shared by all representations of a transformation.
Eigenvalues, eigenvectors and representations
EQ-MRS-05Eigenvectors of the transformation and of any square representation correspond exactly through the coordinatisation map.
Diagonalisation by an eigenbasis
EQ-MRS-06Valid when is a basis of eigenvectors. The change-of-basis matrix is then the eigenvector matrix expressed in the coordinates of .
Worked similarity
EQ-MRS-07The dilation operator of the worked example, converted from monomial coordinates to coordinates about its fixed point, where it becomes diagonal.
Variable Definitions
| Symbol | Name | Meaning | Domain / type |
|---|---|---|---|
| Linear transformation | The operator being represented on two different bases | element of L(V,V) | |
| Target basis | The basis in which a better representation is wanted, often an eigenbasis | ordered basis of V | |
| Source basis | The convenient basis in which the representation is first built | ordered basis of V | |
| Change-of-basis matrix | Converts -coordinates into -coordinates; the similarity matrix | n x n non-singular matrix | |
| Original representation | Square representation of relative to at both ends | n x n matrix | |
| Converted representation | Square representation of the same relative to at both ends | n x n matrix | |
| Eigenvalue | Shared by every representation; the diagonal entries after diagonalisation | complex number | |
| Similarity matrix | Any non-singular matrix realising a similarity; here a change-of-basis matrix | n x n non-singular matrix | |
| Dimension | Dimension of and size of every square representation | positive integer |
Worked Numerical Example
Problem statement
A quadratic profile defined on a normalised coordinate is re-parameterised by the substitution , a dilation of factor two about the point . Represent this operator on the monomial basis, then convert it to a basis centred on the fixed point and confirm the similarity relation delivers a diagonal representation.
Define the operator
Let be defined by . Substituting a linear expression into a polynomial preserves sums and scalar multiples, so is linear, and the result is still of degree at most two, so maps to itself and eigenvalues are meaningful.
Represent on the monomial basis
With the images are , and . Coordinatising gives the three columns.
Read the eigenvalues from the triangular form
The representation is upper triangular, so its characteristic polynomial is the product of the diagonal factors and the eigenvalues are , and . Because all representations of are similar, these are the eigenvalues of the operator itself and will reappear on any other basis.
Choose a basis centred on the fixed point
The substitution fixes , since . Take . Then , so every element of is an eigenvector, with eigenvalues , and respectively.
Build the change-of-basis matrix
The columns of are the coordinates of the vectors in the monomial basis: , and . Its inverse is the reverse conversion, whose columns are the monomials expressed in powers of .
Apply the similarity in two stages
First multiply on the right, converting input coordinates from into , then multiply on the left to convert the output back into .
Complete the conversion
Multiplying on the left by gives the representation relative to , which is diagonal with the eigenvalues in the order of the basis — exactly the matrix obtained earlier by inspection from the eigenvector property.
Check the invariants and interpret the result
Both representations have trace and determinant , and both have characteristic polynomial with roots , and : the entries changed completely, every similarity invariant did not. In coordinates centred on the fixed point the operator simply scales the constant part by , the linear part by and the quadratic part by , so applying the substitution times multiplies those components by , and — a conclusion that is invisible in the monomial representation and immediate in the diagonal one.
The same operator is a dense triangular matrix in monomial coordinates and a diagonal matrix in coordinates centred on its fixed point, the two being related by the change-of-basis matrix through a similarity. Choosing the second basis converts repeated application from a matrix power into three independent scalar powers, which is the practical payoff that diagonalisation delivers throughout dynamics and control.
Applications & Industry Use
Modal and canonical state coordinates
Converting a state-space model to modal form is a similarity transformation applied to the state matrix, with the eigenvector matrix as the change of basis. Because eigenvalues are similarity invariants, the poles and therefore the stability of the system are untouched, while the dynamics decouple into independent first-order modes that can be examined and shaped one at a time.
Decoupling equations of motion
Expressing a multi-degree-of-freedom system in modal coordinates converts a coupled set of equations into independent single-degree-of-freedom oscillators. The transformation to modal coordinates is a change of basis, and the natural frequencies are preserved because they are determined by similarity invariants of the underlying operator.
Principal axes of inertia
The inertia operator of a rigid body is represented by a matrix that depends on the chosen body axes. Rotating to the principal axes is an orthogonal change of basis, and the resulting representation is diagonal with the principal moments of inertia. The products of inertia vanish not because the body changed but because the description did.
Transformations about an arbitrary axis
Rotating about an arbitrary axis is constructed by changing basis so that the axis becomes a coordinate direction, applying a simple rotation, and changing back. The composite is a similarity transformation, and recognising it as such explains why the two flanking conversions must be exact inverses if the operation is to be a pure rotation.
Operators in a rotated measurement basis
Expressing an observable or a gate in a different measurement basis is a unitary similarity transformation. The eigenvalues, which are the physically observable outcomes, are unchanged, while the matrix entries and hence the apparent coupling between basis states change entirely. Circuit optimisation exploits this by seeking bases in which an operator is diagonal.
Similarity-preserving eigenvalue algorithms
The QR algorithm computes eigenvalues by applying a sequence of orthogonal similarity transformations that drive a matrix towards triangular form. Each step preserves the spectrum exactly because similarity does, and orthogonal similarities are chosen specifically because they do not amplify rounding error the way general ones can.
Design Considerations
Match the transformation rule to the object
A vector's coordinates convert on one side, a linear transformation's representation converts by similarity, and a quadratic or bilinear form converts by congruence. Using the wrong rule produces a conformable and entirely wrong result. Decide what kind of object is being re-expressed before writing the product.
Prefer orthonormal target bases
When the similarity matrix is orthogonal or unitary, the inverse is the adjoint and the conversion neither amplifies error nor changes norms. Eigenvector bases are often far from orthonormal, and the accuracy of a diagonalisation degrades with the condition number of the eigenvector matrix. Where a triangular representation suffices, an orthonormal basis change is the numerically superior choice.
Never form the inverse explicitly
The expression should be evaluated by forming and then solving , not by computing and multiplying twice. The solve route costs less and is more accurate, and it fails loudly rather than silently when is close to singular.
Verify with invariants, not entries
After a conversion, compare trace, determinant and eigenvalues with those of the original representation. Entrywise comparison is meaningless across bases, whereas invariants must agree. In floating point, treat a relative discrepancy far above the unit round-off as evidence of an error rather than of rounding.
Decide whether diagonal is achievable before designing for it
A workflow built around a diagonal representation fails when the transformation is defective. Check that the geometric multiplicities sum to the dimension, and if they do not, design against a triangular or block-diagonal representation instead. Nearly defective cases deserve the same caution, since their eigenvector matrices are nearly singular.
Keep the basis with the representation
Two representations of the same operator are different matrices, and only the accompanying basis distinguishes them. Storing a bare array invites a later reader to combine it with coordinates from the wrong basis. Carry the basis as part of the stored object, and require conversion at the boundary rather than by convention.
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 | Standardises the notation for similarity, matrix inverses and determinants, keeping the two-sided conversion formula unambiguous about which factor acts on inputs and which on outputs. |
LAPACK / BLAS reference | Linear Algebra PACKage reference implementation | Implements the orthogonal similarity transformations behind xGEHRD, xHSEQR and xGEES, and returns the Schur form that stands in for diagonalisation when a transformation is defective. |
ISO 7626-1 | Mechanical vibration and shock — Experimental determination of mechanical mobility | Underpins experimental modal analysis, where measured data are converted to modal coordinates; the conversion is exactly the change of basis studied here. |
IEEE 754-2019 | IEEE Standard for Floating-Point Arithmetic | Explains why invariants agree only to within rounding after a numerical similarity, and why an ill-conditioned similarity matrix can degrade a computed diagonalisation severely. |
ISO/IEC 40314 | Mathematical Markup Language (MathML) Version 3.0 | Encodes the flanked products and subscripted representation symbols so that the ordering of factors survives indexing and assistive presentation. |
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 |
|---|---|---|
| Orthogonal or unitary similarity | Numerical work where the target basis can be chosen orthonormal, including Schur and symmetric eigenvalue computations. | Condition number one, inverse available as the adjoint, and no error amplification; the cost is that a diagonal result is only guaranteed for normal operators. |
| General eigenvector similarity | Diagonalisation is required and the transformation is known to have a full set of independent eigenvectors. | Delivers a fully decoupled representation, but the accuracy of every entry degrades with the condition number of the eigenvector matrix, which can be enormous near a defective case. |
| Exact rational arithmetic | Small symbolic operators where an exact diagonal or Jordan form is the deliverable. | Invariants are preserved exactly and defectiveness is detected with certainty, but eigenvalues are generally irrational so an algebraic number representation is required. |
| Complex scalars | Operators with complex spectra, including any rotation-like or oscillatory dynamics. | Permits a genuine diagonalisation where a real basis cannot, at the cost of complex storage; the real alternative is a block-diagonal form with two-by-two rotation blocks. |
| IEEE 754 binary64 | Standard numerical practice for state matrices, inertia tensors and modal analysis. | Fast and well supported, with invariants preserved to within rounding; nearly equal eigenvalues make the eigenvector basis unreliable even when the eigenvalues are accurate. |
| Structured triangular or block-diagonal target | The transformation is defective or nearly so, and a fully diagonal representation is unattainable or unstable. | Reachable through a well conditioned orthonormal change of basis and adequate for most computation, but coordinates remain coupled within each block. |
Manufacturing Notes
Implementation notes — how the result is actually produced by hand, by algorithm and by library, including cost and numerical behaviour.
Cost of a similarity conversion
Forming costs two matrix products at about operations each, plus a factorisation of at about if the inverse is applied by solving. When the target basis is orthonormal, the inverse product is replaced by a multiplication by the adjoint, saving the factorisation entirely and improving accuracy.
Order of operations by hand
Compute first, then apply the inverse conversion to the result. This keeps the intermediate quantity interpretable — it is the operator applied to the new basis vectors, expressed in the old coordinates — and localises errors to a single column when a check fails.
Verification by invariants and by columns
Trace and determinant give a fast global check. A sharper test is columnwise: column of the new representation must be the coordinates, relative to the new basis, of the image of the -th new basis vector. When the new basis is an eigenbasis, that column must have a single non-zero entry, which makes any error conspicuous.
Library behaviour
NumPy's numpy.linalg.eig returns the eigenvector matrix and the eigenvalues, so the diagonalisation is ; apply it with numpy.linalg.solve rather than inv. SciPy's scipy.linalg.schur returns an orthogonal similarity to triangular form and is the robust choice when diagonalisability is uncertain. SymPy's diagonalize works exactly and raises when the matrix is defective.
Conditioning of the similarity
Errors introduced by a numerical similarity scale with the condition number of the similarity matrix. Orthogonal similarities have condition number one and are effectively free of amplification, which is why every serious eigenvalue algorithm is built from them. A diagonalisation using a nearly singular eigenvector matrix can lose most of the available digits even though the eigenvalues themselves are well determined.
Failure Modes & Common Mistakes
| Failure mode / mistake | Impact | Root cause | Prevention & detection |
|---|---|---|---|
| Applying a one-sided conversion to an operator | high | Treating a representation like a coordinate vector and multiplying by a single change-of-basis matrix. | Remember that an operator has an input side and an output side; both must be converted, giving a two-sided product. |
| Reversing the similarity | high | Writing instead of , since both conform and both look plausible. | Derive the product from the composition rule with subscripts attached, or test on a single new basis vector whose image is known. |
| Confusing similarity with congruence | high | Using for an operator, or for a quadratic form, by analogy with the wrong case. | Classify the object first: transformations transform by similarity, forms by congruence. The two coincide only when is orthogonal. |
| Comparing representations entrywise | medium | Concluding that two models differ because their matrices differ, when only the bases differ. | Compare characteristic polynomials, eigenvalues, trace and determinant. Entries carry no basis-independent meaning. |
| Assuming a diagonal form exists | medium | Designing a pipeline around modal decoupling for a defective or nearly defective operator. | Check that geometric multiplicities sum to the dimension, and fall back on a Schur or block-diagonal representation when they do not. |
| Using an ill-conditioned eigenvector basis | high | Diagonalising an operator whose eigenvectors are nearly dependent, so the change-of-basis matrix is nearly singular. | Report the condition number of the similarity matrix, and prefer an orthogonal similarity to triangular form when it is large. |
| Forming the inverse explicitly | low | Computing and multiplying, rather than solving with a factorisation. | Form and solve ; the result is cheaper and more accurate, and near-singularity is detected rather than hidden. |
| Losing the association between matrix and basis | medium | Storing converted representations as bare arrays, so a later computation mixes coordinates from different bases. | Store the ordered basis with the representation and convert explicitly at every interface. |
FAQs
Why does changing the basis produce a similarity rather than a one-sided product?
Because a representation acts on coordinates at both ends. Incoming coordinates must be converted into the basis the known representation expects, and outgoing coordinates must be converted into the basis wanted. Two conversions appear, they are inverses of each other, and the result is .
Are all similar matrices representations of the same transformation?
Yes. Given , interpret as the representation of a transformation on the standard basis and read the columns of as a new basis; then is the representation relative to that new basis. Similarity classes and transformations therefore correspond exactly, which is what makes similarity the natural equivalence for operators.
Which quantities are preserved by a change of basis?
The characteristic polynomial, and consequently the eigenvalues with their algebraic multiplicities, the determinant, the trace and the rank. Geometric multiplicities and the Jordan structure are preserved too. Not preserved: individual entries, symmetry, sparsity, orthogonality of columns and the condition number.
Do eigenvectors change when I change basis?
The vectors themselves do not; their coordinate descriptions do. If is an eigenvector of , its coordinate vector relative to each basis is an eigenvector of the corresponding representation, and the two coordinate vectors are related by the change-of-basis matrix. Never transplant an eigenvector between coordinate systems without converting it.
How is this related to diagonalising a matrix?
It is the same operation described abstractly. Diagonalising a matrix means finding a basis of eigenvectors and re-representing the transformation in it. The eigenvector matrix is the change-of-basis matrix, and the diagonal result is the representation relative to the eigenbasis, with the eigenvalues in the order the basis was written.
What if the transformation cannot be diagonalised?
Then no eigenbasis exists and the best achievable representations are triangular or block diagonal. A unitary change of basis always produces an upper triangular representation with the eigenvalues on the diagonal, which is sufficient for most numerical purposes, and a general change of basis produces the Jordan form, which is informative but numerically fragile.
Why do numerical algorithms insist on orthogonal similarity transformations?
Because the error introduced by a similarity scales with the condition number of the similarity matrix, and orthogonal matrices have condition number one. A general similarity can amplify rounding error without bound, whereas a sequence of orthogonal similarities preserves both the spectrum and the accuracy, which is the design principle behind the QR algorithm.
References
- Beezer, R. A. A First Course in Linear Algebra, Version 0.70. University of Puget Sound, 2006. Section CB, Subsection MRS. Licensed under the GNU Free Documentation License v1.2.
- Horn, R. A. and Johnson, C. R. Matrix Analysis, 2nd edition. Cambridge University Press, 2013.
- Golub, G. H. and Van Loan, C. F. Matrix Computations, 4th edition. Johns Hopkins University Press, 2013.
- ISO 7626-1:2011, Mechanical vibration and shock — Experimental determination of mechanical mobility. International Organization for Standardization.
- Anderson, E. et al. LAPACK Users' Guide, 3rd edition. Society for Industrial and Applied Mathematics, 1999.
AI Suggested Questions
- Take a two-by-two operator with a repeated eigenvalue and one eigenvector, and show why no change of basis makes its representation diagonal.
- Demonstrate numerically how the accuracy of a diagonalisation degrades as the eigenvector matrix approaches singularity.
- Explain the difference between similarity and congruence using the same matrix as an operator and as a quadratic form.
- Show how converting a state-space model to modal coordinates decouples the dynamics, and confirm the poles are unchanged.
- Why does the QR algorithm use only orthogonal similarity transformations, and what would go wrong with general ones?
- Given two square matrices with equal trace, determinant and rank, construct an example showing they need not be similar.
Related Calculators
Apply to a representation with a supplied change-of-basis matrix and compare invariants before and after.
Diagonalisation CalculatorTest a square representation for an eigenbasis, return the eigenvector matrix and the diagonal form, and report the conditioning.
Change-of-Basis CalculatorBuild the conversion matrix between two ordered bases and use it to re-express vectors or operator representations.
