Engineering/Mathematics/Eigenvalues
Worked Examples: Computing Eigenvalues and Eigenvectors
Every square matrix has a spectrum, but spectra come in sharply different shapes: all distinct, repeated with room to spare, repeated and deficient, complex in conjugate pairs, or containing zero. This page computes one representative of each and extracts the two multiplicities that distinguish them.
- Core level
- Stream: computation
- Reading time 16 min
- Ref KVS-ENG-MATH-0082
- Taxonomy
- Engineering / Mathematics
- Prerequisite
- Characteristic polynomial, null space bases
- Algebraic multiplicity
- — exponent in
- Geometric multiplicity
- —
- Always true
- Diagnostic
- for any eigenvalue not diagonalisable
Overview
The procedure for a spectrum is fixed: expand , factor it, and for each root row-reduce to obtain a basis of the eigenspace. What is not fixed is the shape of the answer. Two matrices of the same size, both with integer entries and both computed by identical steps, can produce results that behave completely differently in every downstream application.
Two integers attached to each eigenvalue capture that difference. The algebraic multiplicity is the exponent of in the factored characteristic polynomial — how many times the root occurs. The geometric multiplicity is the dimension of the eigenspace — how many independent directions the matrix actually scales by . They are computed by entirely separate routes, one from a polynomial and one from a null space, and they need not agree.
When they do agree for every eigenvalue, the matrix has a full set of independent eigenvectors and can be diagonalised; every subsequent computation involving powers, exponentials or long-run behaviour becomes trivial. When they disagree for even one eigenvalue, the matrix is defective: no basis of eigenvectors exists, diagonalisation is impossible, and the associated dynamic response acquires polynomial terms that a purely exponential model cannot represent. The gap is therefore not a curiosity but a design-relevant number.
The examples below are chosen to make each possibility unmistakable, and each is small enough to verify by hand. Read them as a catalogue of what a spectrum can look like, and as a set of arithmetic checks — trace, determinant, multiplicity sums — that should be applied to every eigenvalue computation before its results are trusted.
Definition
Algebraic Multiplicity of an Eigenvalue
AMELet be a square matrix and let be an eigenvalue of . The algebraic multiplicity of , written , is the largest power of the factor that divides the characteristic polynomial .
Because is a root of , the factor appears at least once, so for every eigenvalue.
Geometric Multiplicity of an Eigenvalue
GMELet be a square matrix and let be an eigenvalue of . The geometric multiplicity of , written , is the dimension of the eigenspace .
Every eigenvalue has at least one eigenvector, so the eigenspace is never the trivial subspace and .
Defective Matrix
DEFA square matrix is defective when some eigenvalue satisfies . Equivalently, has fewer than linearly independent eigenvectors and no basis of consisting of eigenvectors of exists.
Concepts
Case one — all eigenvalues distinct
The generic situation. If has distinct roots then each has , and since the geometric multiplicity is forced to as well. Every eigenspace is a single line, the eigenvectors are automatically linearly independent, and the matrix is diagonalisable with no further checking. The tridiagonal matrix has and eigenvectors , , — distinct eigenvalues, and because the matrix is symmetric, mutually orthogonal directions as well.
Case two — a repeated eigenvalue with a full eigenspace
A repeated root does not by itself cause trouble. Consider the matrix with on the diagonal and everywhere else. Its characteristic polynomial is , so . Subtracting leaves the matrix of all ones, which has rank and therefore nullity : the eigenspace for is three-dimensional and . The matrix is diagonalisable despite the triple root. Repeated eigenvalues with matching multiplicities are the signature of symmetry in a model — identical components, identical couplings — and they mean the associated response has a whole subspace of equivalent modes rather than one distinguished direction.
Case three — a defective eigenvalue
Now take , whose characteristic polynomial is , so . Reducing gives two pivot columns and hence a one-dimensional null space spanned by : . There are only two independent eigenvectors in total, so no eigenvector basis of exists and is defective. The polynomial alone could never have revealed this — only the row reduction does. Every eigenvalue computation with a repeated root must therefore compute the eigenspace dimension explicitly.
Case four — complex eigenvalues from a real matrix
The real matrix has , an irreducible real quadratic whose roots are . Solving from the first row, , gives the eigenvector ; the conjugate eigenvalue has eigenvector . The conjugate structure is not coincidence: for a matrix with real entries, taking the conjugate of leaves unchanged and produces . Half of every such computation is therefore free.
Case five — zero as an eigenvalue
The rank-one matrix has . The eigenvalue has , and its eigenspace is itself, which is two-dimensional because has rank ; so and the matrix is diagonalisable. A zero eigenvalue is exactly the statement that the matrix is singular, and it is the single most informative thing a spectrum can tell you about invertibility. Here the remaining eigenvalue equals the trace, as it must when all other eigenvalues vanish.
The arithmetic checks that come free
Three identities should be applied to every computed spectrum before the eigenvectors are used. The algebraic multiplicities must sum to , because has degree . The eigenvalues, counted with algebraic multiplicity, must sum to and multiply to . Each check costs a few additions and catches sign errors, transcription errors and missed roots. A fourth check applies to eigenvectors: substitute each one back and confirm entry by entry.
Classifying a computed spectrum
Equations
Algebraic multiplicity from the factored polynomial
EQ-ECEE-01The exponent attached to each distinct root is its algebraic multiplicity. The exponents sum to , the degree of the polynomial.
Geometric multiplicity from the eigenspace
EQ-ECEE-02Counted as the number of non-pivot columns in the reduced row-echelon form of .
Multiplicity inequality
EQ-ECEE-03Both multiplicities are at least one; the geometric never exceeds the algebraic. Strict inequality in the middle defines a defective eigenvalue.
Distinct spectrum example
EQ-ECEE-04Three distinct real eigenvalues, each with . Symmetry additionally forces the three eigenvectors to be mutually orthogonal.
Defective spectrum example
EQ-ECEE-05A double root whose eigenspace is only a line. The matrix has two independent eigenvectors in a three-dimensional space and cannot be diagonalised.
Complex conjugate pair
EQ-ECEE-06A real matrix with no real eigenvalue. The eigenvalues and eigenvectors occur as conjugate pairs, so only one of each pair need be computed.
Trace and determinant identities
EQ-ECEE-07Two independent checks on a computed spectrum, obtained by comparing coefficients of at degrees and .
Variable Definitions
| Symbol | Name | Meaning | Domain / type |
|---|---|---|---|
| Matrix | The square matrix whose spectrum is being computed | n x n complex matrix | |
| Size | Common row and column count of the matrix | positive integer | |
| Eigenvalue | A root of the characteristic polynomial | complex number | |
| Algebraic multiplicity | Exponent of in the factorisation of | 1 to n | |
| Geometric multiplicity | Dimension of the eigenspace for | 1 to alpha | |
| Eigenspace | Null space of ; all eigenvectors for plus | subspace of C^n | |
| Characteristic polynomial | , of degree | polynomial over C | |
| Distinct eigenvalue count | Number of distinct roots of | 1 to n | |
| Trace | Sum of the diagonal entries, equal to the sum of the eigenvalues | complex number |
Worked Numerical Example
Problem statement
Four identical processing units are cross-coupled so that every unit exchanges load with every other at the same rate. The interaction matrix carries on the diagonal and in every off-diagonal position. Compute the full spectrum and both multiplicities for each eigenvalue.
State the matrix and exploit its structure
Complete symmetry means the matrix is plus the matrix of all ones. That observation is not required, but it predicts the answer and provides an independent check on the determinant expansion that follows.
Form and add all rows to the first
Adding rows to another row leaves a determinant unchanged. Every column of sums to , so after the operation the first row is constant.
Factor out the common row factor and clear below
Extracting from the first row leaves a row of ones. Subtracting that row from each of the remaining rows produces a triangular pattern whose determinant is the product of the diagonal entries.
Record the eigenvalues and algebraic multiplicities
Writing the polynomial in monic form, . The eigenvalues are with and with . The multiplicities sum to , and , as required.
Eigenspace for
Reduce . Three pivot columns appear, leaving one free variable and a one-dimensional null space. The eigenvector is the fully in-phase state, every unit at the same level.
Eigenspace for
Here is the matrix of all ones, which reduces to a single non-zero row . Its rank is , so the null space has dimension — every vector whose entries sum to zero.
Compare the multiplicities
For both eigenvalues , so the eigenvectors found — one for and three for — total four independent vectors in . The matrix is diagonalisable. Contrast this with above, where a double root produced only a single eigenvector direction.
Verify one eigenpair directly
Take the second basis vector of . Then , which is exactly times the vector. The eigenvalue and the eigenvector are confirmed without reference to any of the intermediate work.
The system has one in-phase mode at and a three-dimensional family of differential modes at . Because the geometric multiplicity matches the algebraic multiplicity, any initial state decomposes into these two behaviours and the long-run response is governed entirely by the dominant eigenvalue . Physically, symmetric coupling amplifies the common mode and leaves every difference between units decaying at the same slower rate.
Applications & Industry Use
Repeated frequencies in symmetric structures
A structure with rotational or reflective symmetry — a circular tank, a square tower, a symmetric truss — produces repeated natural frequencies with multi-dimensional mode subspaces. Any orthogonal basis of that subspace is an equally valid pair of mode shapes, so modal test results that appear to disagree between laboratories may simply be different bases of the same eigenspace.
Detecting defective state matrices
A repeated pole with a deficient eigenspace produces a response containing terms of the form rather than pure exponentials. A controller tuned on the assumption of exponential decay will underestimate the transient peak. Computing against during model review is the check that catches this before commissioning.
Complex modes and oscillation damping
Conjugate eigenvalue pairs correspond to oscillatory modes with frequency and damping governed by . Since the state matrix is real, only one member of each pair is computed and the other is inferred, halving the analysis cost for the many lightly damped modes in a large interconnected network.
Zero eigenvalues and conserved quantities
A reaction network whose Jacobian has a zero eigenvalue possesses a conserved combination of species — total mass, total charge, an invariant element balance. The eigenvectors of the zero eigenspace name the conserved combinations directly, and their number is the nullity of the stoichiometric matrix.
Spectral gaps in graph partitioning
The graph Laplacian always has with geometric multiplicity equal to the number of connected components. A cluster of small non-zero eigenvalues signals weakly linked communities, and the eigenvectors of that cluster are used directly as coordinates for spectral clustering.
Flutter margins from complex eigenvalue tracking
Aeroelastic stability is assessed by tracking the complex eigenvalues of a coupled structural-aerodynamic model as airspeed increases. Flutter onset is the speed at which a conjugate pair crosses into the right half plane, and the eigenvector at that point identifies which structural modes are coalescing.
Design Considerations
Never infer geometric multiplicity from the polynomial
The characteristic polynomial is blind to eigenspace dimension. Two matrices can share an identical characteristic polynomial while one is diagonalisable and the other is defective — the identity matrix of size two and a Jordan block are the standard pair. Every repeated root demands its own row reduction.
Treat near-defectiveness as a numerical warning
In floating point a defective matrix rarely appears exactly defective; instead the computed eigenvectors for a repeated eigenvalue become nearly parallel and the eigenvector matrix becomes severely ill-conditioned. Monitor the condition number of the eigenvector matrix, not just the eigenvalue residuals, when a model is expected to have repeated roots.
Prefer structural arguments over expansion
Where a matrix is built from a symmetry — identical diagonal entries, a constant off-diagonal, a circulant or block structure — the spectrum is often available in closed form with no determinant expansion at all. Recognising the structure is faster, exact, and generalises to sizes where hand expansion is hopeless.
Decide how to present a complex eigenpair
A conjugate pair can be reported as two complex eigenvalues with complex eigenvectors, or converted into a real block with a real invariant plane. The complex form is more compact and composes better algebraically; the real form avoids complex arithmetic in downstream code and is what real Schur factorisations return. Choose one convention per project and document it.
Scale eigenvector bases for readability
Row reduction naturally produces basis vectors with fractional entries. Clearing denominators gives integer representatives that are easier to check by hand and to compare against published results, at the cost of losing any norm information. For numerical work the opposite convention — unit norm with a fixed sign — is preferable.
Watch the size limit on exact factorisation
Exact eigenvalue computation requires the characteristic polynomial to factor over a field you can work in. Integer matrices of size five or more routinely produce irreducible quintic factors with no radical expression at all. Beyond about , treat closed-form spectra as a fortunate special case rather than an expectation.
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 presentation of the multiplicities and Greek symbols used here, and the distinction between the imaginary unit set upright and italic scalar variables. |
IEEE 754-2019 | IEEE Standard for Floating-Point Arithmetic | Defines the complex arithmetic underlying every computed conjugate pair, including the signed-zero rules that determine which branch a complex square root returns. |
LAPACK reference implementation | Linear Algebra PACKage driver routines | xGEEV returns a real matrix's conjugate eigenvalue pairs as adjacent entries with the eigenvector real and imaginary parts stored in consecutive columns — a packing convention that must be unpacked correctly. |
ISO 7626 | Mechanical vibration and shock — Experimental determination of mechanical mobility | Experimental modal analysis reported under this standard must handle repeated natural frequencies, where the measured mode shapes span an eigenspace rather than identifying unique directions. |
W3C WCAG 2.1 AA | Web Content Accessibility Guidelines | The matrices and multi-vector spans on this page are published as semantic MathML with alternative text so that spectra remain readable by assistive technology. |
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 integer and rational arithmetic | Small textbook-scale matrices where multiplicities must be certified and the polynomial factors over the rationals. | Gives unambiguous multiplicities, but fails as soon as the characteristic polynomial has irrational or transcendental roots. |
| Gaussian integers and exact complex rationals | Matrices whose complex eigenvalues have rational real and imaginary parts, as in the conjugate-pair example above. | Keeps conjugate structure exact and lets the conjugate eigenvector be written down without recomputation; only a narrow class of matrices qualifies. |
| IEEE 754 binary64 complex | Any realistic engineering matrix, where complex eigenvalues must be represented numerically. | Fast and general, but multiplicities become tolerance decisions: distinguishing a genuine double root from two close roots is not possible from the numbers alone. |
| Real Schur form instead of complex eigenvectors | Downstream code must remain in real arithmetic, as in embedded control implementations. | Avoids complex storage entirely by keeping blocks, but the invariant subspace replaces the eigenvector and requires different downstream handling. |
| Symmetric or Hermitian storage | The matrix is known symmetric, guaranteeing real eigenvalues and throughout. | Halves the work and removes defectiveness from consideration entirely, but is unsafe if the assembly process does not enforce exact symmetry. |
| Interval or arbitrary-precision arithmetic | Certified bounds on a cluster of eigenvalues are required, for example in a safety case. | Produces verifiable enclosures, at a cost of one to two orders of magnitude in runtime and with intervals that can widen uselessly near a defective eigenvalue. |
Manufacturing Notes
Implementation notes — how the result is actually produced by hand, by algorithm and by library, including cost and numerical behaviour.
Hand computation strategy at size four and above
Direct cofactor expansion of a determinant with an indeterminate on the diagonal produces twenty-four terms and is a reliable source of error. Prefer determinant-preserving row operations, as in the worked example: adding rows to expose a common factor and then clearing below turns the problem into a product of diagonal entries. Where the matrix is block triangular, take the product of the blocks' characteristic polynomials instead.
Guessing integer roots
If a matrix has integer entries, its characteristic polynomial has integer coefficients and any rational root divides the constant term, which is . Testing the divisors of the determinant is far quicker than general factorisation and usually resolves textbook-scale problems immediately.
Library behaviour on multiplicities
numpy.linalg.eig reports a repeated eigenvalue as several nearly equal floating-point numbers and gives no multiplicity information; the eigenvector columns it returns for a defective eigenvalue will be nearly linearly dependent rather than obviously wrong. sympy.Matrix.eigenvects returns exact triples of eigenvalue, algebraic multiplicity and eigenspace basis, from which the geometric multiplicity is the length of the basis list.Verification of a full spectrum
Confirm four things: the algebraic multiplicities sum to ; the weighted sum of eigenvalues equals the trace; the weighted product equals the determinant; and each returned eigenvector satisfies its own eigenvalue equation to within rounding. The first three are scalar checks costing almost nothing and they catch the majority of realistic mistakes.
Cost of the eigenspace stage
Once the eigenvalues are in hand, each eigenspace costs one row reduction of an matrix, about operations. With distinct eigenvalues the total eigenvector work is , which for a matrix with many distinct eigenvalues can exceed the cost of finding the eigenvalues themselves. Production solvers avoid this by computing eigenvectors from an already-factored Schur form.
Failure Modes & Common Mistakes
| Failure mode / mistake | Impact | Root cause | Prevention & detection |
|---|---|---|---|
| Assuming a repeated root has a matching eigenspace | high | Reporting without reducing . | Compute the eigenspace dimension for every repeated eigenvalue. The polynomial contains no information about it. |
| Stopping when the roots found are fewer than | high | Treating a degree- polynomial with distinct roots as incompletely solved, or missing a repeated factor. | Divide out each factor found and continue until the quotient is a constant; confirm the multiplicities sum to . |
| Discarding an irreducible quadratic factor | high | Working over and concluding that a factor such as contributes no eigenvalues. | Complete the square or apply the quadratic formula over . Every real quadratic contributes a conjugate pair. |
| Recomputing the conjugate eigenpair from scratch | low | Not recognising that a real matrix determines the conjugate pair automatically. | Compute one eigenpair of the pair and conjugate both the eigenvalue and every entry of the eigenvector. |
| Reporting a scaled eigenvector as a different eigenvector | medium | Comparing results against a reference that used a different normalisation and concluding the answers disagree. | Compare spans, not vectors. Two eigenvectors for the same eigenvalue agree if one is a non-zero multiple of the other. |
| Mixing eigenvectors from different eigenvalues into one span | medium | Collecting all basis vectors found into a single set and calling it the eigenspace. | Each eigenvalue has its own eigenspace. The union of bases spans the sum of the eigenspaces, which is not itself an eigenspace. |
| Declaring a numerical double root | medium | Two computed eigenvalues agreeing to six digits are assumed equal, or two genuinely equal eigenvalues differing in the twelfth digit are assumed distinct. | Base multiplicity claims on exact arithmetic or on structural knowledge, never on floating-point equality. Where necessary, cluster eigenvalues with a documented tolerance. |
| Trace check applied without multiplicities | low | Summing the distinct eigenvalues rather than summing them with algebraic multiplicity. | Weight each eigenvalue by before comparing against . |
FAQs
What exactly is the difference between algebraic and geometric multiplicity?
Algebraic multiplicity counts how many times appears as a root of the characteristic polynomial; geometric multiplicity counts how many linearly independent eigenvectors actually has. They are computed by completely different routes — polynomial factorisation against null space dimension — and the geometric value can be strictly smaller. It can never be larger.
Can the geometric multiplicity exceed the algebraic multiplicity?
No. The inequality holds for every eigenvalue of every square matrix. The proof extends a basis of the eigenspace to a basis of and shows that the resulting similarity transformation forces at least factors of into the characteristic polynomial.
Does a repeated eigenvalue always mean the matrix is defective?
No. A repeated eigenvalue is a necessary condition for defectiveness but not a sufficient one. The identity matrix has a single eigenvalue of algebraic multiplicity and geometric multiplicity as well, and is as far from defective as a matrix can be. Only a strict inequality makes a matrix defective.
Why do complex eigenvalues of a real matrix always come in pairs?
Conjugating the equation gives , and when is real . So is an eigenvector for . Equivalently, the characteristic polynomial has real coefficients, and non-real roots of a real polynomial occur in conjugate pairs.
What does a zero eigenvalue tell me about the matrix?
That the matrix is singular. If is an eigenvalue then has a non-trivial null space, so has no inverse and . The eigenspace for zero is precisely , and its dimension is the nullity of the matrix.
How do I know when I have found every eigenvalue?
When the algebraic multiplicities sum to . The characteristic polynomial has degree exactly , so a complete factorisation over accounts for exactly roots counted with multiplicity. If the exponents you have found sum to less than , part of the polynomial remains unfactored.
Two textbooks give different eigenvectors for the same matrix and eigenvalue — is one wrong?
Probably neither. Eigenvectors are determined only up to a non-zero scalar multiple, and when the eigenspace has dimension greater than one, any basis of that subspace is an equally correct answer. Compare the spans, not the individual vectors: check that each published vector lies in the null space of .
References
- Beezer, R. A. A First Course in Linear Algebra, Version 0.70. University of Puget Sound, 2006. Section EE, Subsection ECEE. 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 1, Eigenvalues, Eigenvectors and Similarity.
- Golub, G. H. and Van Loan, C. F. Matrix Computations, 4th edition. Johns Hopkins University Press, 2013.
- 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
- Construct two matrices with the same characteristic polynomial where one is diagonalisable and the other is defective.
- For a circulant matrix, derive the eigenvalues in closed form and explain why repeated values appear.
- How does a defective eigenvalue change the time response of compared with a diagonalisable one?
- Given a real matrix with a conjugate eigenvalue pair, show how to convert the complex eigenvectors into a real invariant plane and a rotation-scaling block.
- What tolerance should I use to decide numerically whether two computed eigenvalues represent a single repeated root?
- Show why the eigenvalues of a rank-one matrix are the scalar and zero repeated times.
Related Calculators
Compute the full spectrum with both multiplicities and a basis for every eigenspace.
Multiplicity Comparison ToolCompare against for each eigenvalue and flag any defective matrix.
Characteristic Polynomial CalculatorExpand and factor exactly, including complex conjugate factors.
Complex Eigenpair ConverterConvert a conjugate eigenvalue pair into a real invariant plane with its rotation and scaling parameters.
