Computing Eigenvalues and Singular Values
Numerical Computation of Eigenvalues and Singular Values
1. Overview
Computing eigenvalues and singular values is a central task in numerical linear algebra. Although software systems provide commands such as eig and SVD, the underlying algorithms are built from fundamental matrix factorizations and transformations.
The central ideas are:
QR iteration computes eigenvalues while preserving them through similarity transformations.
Shifts accelerate QR iteration by moving an eigenvalue closer to zero before factoring.
Hessenberg reduction introduces zeros that make repeated QR factorizations much faster.
For symmetric matrices, Hessenberg form becomes tridiagonal form.
Singular values are preserved by multiplying on the left and right by orthogonal matrices, allowing reduction to bidiagonal form.
For extremely large or sparse matrices, Krylov subspace methods approximate eigenvalues using a much smaller problem.
The goal is generally not to obtain exact symbolic eigenvalues. For matrices of sufficiently large size, exact formulas are impossible or impractical. Instead, numerical algorithms produce approximations within a desired tolerance.
2. Why Eigenvalue Computation Is Different from Solving Linear Systems
Solving a system
can be accomplished through elimination, producing an upper-triangular matrix. Once the system has been reduced to triangular form, the solution can be obtained by back substitution.
Eigenvalue computation is more difficult. The eigenvalues of an n×n matrix are the roots of its characteristic polynomial,
For matrices of size 5×5 or larger, there is generally no formula using only elementary arithmetic operations and radicals that expresses the roots of an arbitrary fifth-degree or higher polynomial. This result is associated with the work of Abel and explains why eigenvalue algorithms rely on iterative approximation rather than exact formulas.
Important consequences include:
Eigenvalues usually cannot be computed exactly by a finite sequence of simple algebraic steps.
Numerical algorithms instead produce increasingly accurate approximations.
The same limitation applies to singular values when they are derived from eigenvalue problems.
A successful algorithm must preserve the relevant spectral information while gradually simplifying the matrix.
3. QR Factorization
Every suitable matrix A can be factored as
where:
Q is orthogonal, so
QTQ=I,R is upper triangular.
For a matrix with columns that are not generally orthogonal, QR factorization constructs an orthogonal basis for the column space. The columns of Q are obtained by orthogonalizing the columns of A, often through a version of Gram–Schmidt or through more stable orthogonal transformations. The upper-triangular matrix R records how the original columns are expressed in terms of the orthogonalized columns.
QR factorization is the computational core of the QR eigenvalue algorithm.
4. The Basic QR Iteration
4.1 Algorithm
Start with the matrix whose eigenvalues are required:
At the first step, compute its QR factorization:
Then reverse the order of the factors to define the next matrix:
The process is repeated:
Factor the current matrix: $$ A_k=Q_kR_k. $$
Reverse the factors: $$ A_{k+1}=R_kQ_k. $$
Thus, the iteration is
The key questions are:
Do all the matrices Ak have the same eigenvalues?
Does the matrix become simpler as the iteration continues?
If it becomes simpler, where do the eigenvalues appear?
4.2 Why the Eigenvalues Are Preserved
The QR iteration preserves eigenvalues because consecutive matrices are similar.
From
and the fact that Q0 is orthogonal,
The definition of A1 is
Since
substitution gives
Therefore,
This is a similarity transformation. More generally,
Similar matrices have the same eigenvalues, including algebraic multiplicities.
Consequently, every matrix in the QR sequence has the same eigenvalues as the original matrix:
This is the fundamental invariant of the QR method.
4.3 Convergence of QR Iteration
Although the QR iteration preserves eigenvalues, it progressively changes the locations of the matrix entries. For many matrices, entries below the main diagonal become smaller with each iteration.
A typical sequence has the form
where the lower-triangular portion gradually approaches zero. In the limit, the matrix becomes approximately upper triangular:
The diagonal entries of an upper-triangular matrix are its eigenvalues. Therefore, once the entries below the diagonal are sufficiently small, the diagonal entries of Ak provide approximations to the eigenvalues of A.
For a general nonsymmetric real matrix, the limiting form may be quasi-upper-triangular, containing 1×1 and 2×2 diagonal blocks. The 2×2 blocks represent complex-conjugate eigenvalue pairs.
The convergence should be interpreted numerically:
The matrix does not usually become exactly triangular after a finite number of iterations.
The subdiagonal entries become small enough that the diagonal or diagonal blocks accurately reveal the eigenvalues.
The iteration continues until the remaining errors are below a chosen tolerance.
4.4 Rapid Convergence in a 2×2 Example
A simple 2×2 example illustrates the speed of QR convergence. In an appropriate parameterization involving an angle θ, an off-diagonal term can transform approximately as
The exponents follow the pattern
so the off-diagonal quantity is repeatedly raised to higher powers. If ∣sinθ∣<1, these powers rapidly drive the quantity toward zero.
This behavior is described as cubic convergence. Cubic convergence is much faster than linear convergence because the number of correct digits can increase dramatically from one iteration to the next when the iteration is close to its limiting behavior.
5. Shifted QR Iteration
5.1 Motivation for Shifts
The basic QR method can be accelerated by introducing a shift. A shift replaces the matrix Ak temporarily by
where s is a scalar and I is the identity matrix.
The shift is selected to approximate an eigenvalue. If s is close to an eigenvalue λ, then
is close to zero. This causes the corresponding part of the QR iteration to converge much more rapidly.
5.2 Effect of Subtracting a Multiple of the Identity
Suppose
Then
Therefore:
The eigenvectors remain unchanged.
Each eigenvalue is shifted from λ to λ−s.
Thus, subtracting sI changes the eigenvalues but not the eigenvectors.
After carrying out the QR iteration on the shifted matrix, the shift is added back so that the resulting matrix has the same eigenvalues as the original matrix.
5.3 Shifted QR Algorithm
At iteration k, choose a shift sk and factor
Reverse the factors and restore the shift:
The steps are:
Subtract a multiple of the identity: $$ A_k-s_kI. $$
Compute its QR factorization: $$ A_k-s_kI=Q_kR_k. $$
Reverse the factors: $$ R_kQ_k. $$
Add the shift back: $$ A_{k+1}=R_kQ_k+s_kI. $$
5.4 Why the Shifted Method Still Preserves Eigenvalues
The shifted iteration is still a similarity transformation.
From
one has
Then
Because
the shift terms cancel:
Thus, Ak+1 is similar to Ak, and the eigenvalues are preserved.
A shift changes the matrix used during factorization, but subtracting and then adding the shift produces a matrix similar to the original one.
5.5 Choosing a Shift
The ideal shift would be an exact eigenvalue, but the eigenvalues are precisely what the algorithm is trying to compute. In practice, a shift is estimated from information already available in the current matrix, often using an entry near the bottom-right corner.
A good shift:
Is close to an eigenvalue that has not yet converged.
Makes one eigenvalue of Ak−skI very small.
Accelerates the movement of that eigenvalue toward the diagonal.
Can lead to very rapid, sometimes effectively cubic, convergence.
The shift does not substantially increase the cost of the iteration. The expensive operation remains the QR factorization.
6. Where the Computational Work Occurs
The shifted QR iteration involves:
Subtracting or adding sI.
Computing a QR factorization.
Multiplying RkQk.
The shift operation is inexpensive because it only modifies diagonal entries. Reversing the factors is also relatively inexpensive compared with the factorization.
The dominant cost is the repeated QR factorization. Therefore, an important improvement is to transform the matrix into a form in which QR factorization can be performed much more efficiently.
7. Hessenberg Reduction
7.1 Upper Hessenberg Form
An upper Hessenberg matrix has zeros below the first subdiagonal. Its structure is
All entries below the first subdiagonal are zero.
An upper Hessenberg matrix is almost upper triangular, but it retains one additional nonzero diagonal below the main diagonal.
7.2 Why Hessenberg Form Is Useful
A dense n×n matrix contains on the order of n2 entries. During QR factorization, many operations are required to eliminate entries below the diagonal.
For an upper Hessenberg matrix, most of those entries are already zero. The QR factorization can therefore skip many operations. Even better, the Hessenberg structure is preserved by subsequent QR iterations.
This produces a major computational saving:
The initial reduction to Hessenberg form is performed once.
Shifted QR iteration is then applied to the Hessenberg matrix.
Each subsequent iteration is much cheaper than factoring a fully dense matrix.
7.3 Similarity Reduction to Hessenberg Form
The matrix is not merely sparsified arbitrarily. It must be transformed in a way that preserves its eigenvalues.
The reduction has the form
where Q is orthogonal. Since
this can also be written as
Therefore, H is similar to A and has exactly the same eigenvalues.
The full practical eigenvalue algorithm begins with:
Reduce A to upper Hessenberg form through an orthogonal similarity transformation.
Apply shifted QR iteration to the Hessenberg matrix.
7.4 Why the Matrix Cannot Generally Be Reduced Directly to Diagonal Form
If a general matrix could be reduced to diagonal form using simple, universally applicable operations while preserving its eigenvalues, the eigenvalues would be obtained immediately from the diagonal. Such a process would amount to an exact general solution of the characteristic polynomial.
For matrices of degree five or higher, no general formula using elementary operations and radicals exists. Therefore, numerical algorithms aim for progressively simpler forms such as:
Upper Hessenberg form for general matrices.
Tridiagonal form for symmetric matrices.
Bidiagonal form for singular-value computations.
These forms are sparse enough to make computation efficient but do not reveal the eigenvalues or singular values immediately.
8. Symmetric Matrices and Tridiagonal Reduction
8.1 Preservation of Symmetry
Suppose A0 is symmetric:
The QR iteration preserves symmetry when implemented in the appropriate similarity form. Since the orthogonal matrix satisfies
the transformed matrix can be expressed using an orthogonal similarity transformation. This ensures that the next matrix remains symmetric.
Symmetric matrices have especially favorable numerical properties:
Their eigenvalues are real.
Their eigenvectors can be chosen orthogonal.
Their QR iteration can use a much sparser matrix structure.
8.2 Symmetric Hessenberg Matrices
If a matrix is both:
Upper Hessenberg, and
Symmetric,
then symmetry forces the entries above and below the main diagonal to correspond. Because all entries below the first subdiagonal are zero, the corresponding entries above the first superdiagonal must also be zero.
The resulting structure is tridiagonal:
A tridiagonal matrix has nonzero entries only on:
The main diagonal.
The first diagonal above the main diagonal.
The first diagonal below the main diagonal.
Thus, a symmetric matrix can be reduced to
where T is symmetric and tridiagonal.
8.3 Computational Benefits
A dense symmetric matrix requires on the order of n2 storage locations. A symmetric tridiagonal matrix requires only approximately 2n numerical values:
n diagonal entries.
n−1 off-diagonal entries.
Because the tridiagonal structure is preserved during the specialized QR iteration, each step is very fast. This is the basis of efficient symmetric eigenvalue routines.
The symmetric eigenvalue workflow is:
Reduce the symmetric matrix to symmetric tridiagonal form.
Apply shifted QR iteration to the tridiagonal matrix.
Read the converged eigenvalues from the diagonal.
9. Singular Values
9.1 Definition Through ATA
For a matrix A, the singular values are the nonnegative square roots of the eigenvalues of ATA.
If λi are the eigenvalues of ATA, then the singular values are
This follows from the singular value decomposition,
where:
U and V are orthogonal matrices.
Σ is diagonal or rectangular diagonal.
The diagonal entries of Σ are the singular values σi.
Indeed,
Thus, the eigenvalues of ATA are σi2.
9.2 Why One Should Not Form ATA
Although the definition uses ATA, a numerical algorithm should generally avoid explicitly forming this product.
Forming ATA can be harmful because:
It increases the condition number approximately by squaring it:
κ(ATA)≈κ(A)2.Squaring the condition number can severely magnify numerical errors.
Important information may be lost through cancellation and finite-precision arithmetic.
The product requires additional computation and storage.
It is unnecessary because the singular values can be computed directly from A.
A stable SVD algorithm works with A itself and uses orthogonal transformations rather than first forming ATA.
9.3 Orthogonal Invariance of Singular Values
Eigenvalues are preserved under similarity transformations of the form
Singular values have a different invariance property. They are preserved when the matrix is multiplied on the left and right by orthogonal matrices:
where Q1 and Q2 are orthogonal.
Using the SVD,
consider
Substituting the SVD gives
This can be regrouped as
Because products of orthogonal matrices are orthogonal, both Q1U and Q2V are orthogonal. Therefore, this is another SVD with the same middle factor Σ.
The singular values remain unchanged under independent orthogonal transformations on the left and right.
This provides more freedom than eigenvalue similarity transformations because the left and right orthogonal matrices do not need to be the same.
10. Bidiagonal Reduction for the SVD
10.1 Bidiagonal Form
Because singular values are invariant under transformations of the form
a general matrix can be reduced to bidiagonal form.
A typical upper bidiagonal matrix is
It has nonzero entries only on:
The main diagonal.
One adjacent diagonal, usually the superdiagonal.
The reduction has the form
with Q1 and Q2 orthogonal. Therefore, B has exactly the same singular values as A.
10.2 Two-Stage SVD Algorithm
The practical SVD algorithm has two main stages:
Stage 1: Reduce to bidiagonal form
Use orthogonal transformations on the left and right to obtain
The matrix B is much sparser than A but retains the singular values.
Stage 2: Compute the singular values of the bidiagonal matrix
Apply an iterative algorithm, often a QR-type method, to the bidiagonal matrix. The sparsity makes each step efficient.
The general strategy is therefore:
Create zeros in locations that will remain zero.
Work only with the resulting structured matrix.
Iterate until the diagonal entries converge to the singular values.
10.3 Relationship Between Bidiagonal and Tridiagonal Forms
If B is bidiagonal, then
is symmetric tridiagonal. For example, if B is upper bidiagonal, then each column of B overlaps only with itself and its neighboring column. Consequently, BTB has nonzero entries only on the main diagonal and the two adjacent diagonals.
Thus:
A bidiagonal matrix leads to a tridiagonal BTB.
A symmetric tridiagonal eigenvalue problem is closely connected to the SVD of a bidiagonal matrix.
The SVD algorithm obtains the advantages of tridiagonal eigenvalue algorithms without explicitly forming ATA.
This relationship explains why bidiagonal reduction is the natural preprocessing step for singular-value computation.
11. Practical Software Implementations
High-quality numerical software does not normally apply the most naive version of these algorithms. Instead, it uses carefully optimized routines based on:
Orthogonal transformations.
Hessenberg reduction.
Tridiagonal reduction for symmetric problems.
Bidiagonal reduction for SVD problems.
Shifted QR iterations.
Deflation when parts of the matrix have already converged.
Libraries such as LAPACK contain professionally developed routines for eigenvalue and singular-value computation. High-level systems such as MATLAB, Python numerical libraries, and Julia typically call such optimized low-level routines.
The important conceptual point is that a command such as an eigenvalue or SVD routine is backed by a sequence of structured reductions and iterations rather than by direct symbolic solution of the characteristic polynomial.
12. Computational Complexity and Matrix Size
For dense matrices of moderate to large size, QR-based methods are highly successful. A typical eigenvalue computation can achieve a desired accuracy with computational work on the order of
This is impressive because the method approximates the roots of an nth-degree characteristic polynomial without requiring an explicit symbolic formula.
However, the O(n3) cost becomes prohibitive when n is extremely large. Additional difficulties arise because:
Storing a dense n×n matrix requires O(n2) memory.
Each matrix-vector product may itself be expensive.
A complete decomposition may compute far more eigenvalues or singular values than are actually needed.
For very large or sparse matrices, algorithms often compute only a small number of eigenvalues or singular values using iterative subspace methods.
13. Krylov Subspace Methods
13.1 Constructing a Krylov Subspace
A Krylov method begins with a vector b and repeatedly multiplies by A:
The first m such vectors span the Krylov subspace
For example, with m=100,
The vectors may not initially be orthogonal, so they are orthogonalized to form a stable basis.
13.2 Reducing a Large Problem
Suppose A is a matrix of size one million by one million, but only a relatively small number of eigenvalues are required.
A Krylov method constructs a subspace of dimension perhaps 100 rather than working with the full million-dimensional space. Let
contain an orthonormal basis for the subspace.
The large matrix A is then represented on this subspace by the smaller projected matrix
The original eigenvalue problem is approximated by the 100×100 eigenvalue problem
The values θ are approximate eigenvalues of A, and the corresponding approximate eigenvectors in the original space are
The large problem has been replaced by a much smaller one.
13.3 Why Krylov Spaces Can Capture Eigenvectors
If a starting vector b has components in the directions of several eigenvectors of A, repeated multiplication by A scales those components by increasing powers of the corresponding eigenvalues.
If
for eigenvectors vi, then
The powers λik change the relative importance of the eigenvector components. As a result, the Krylov subspace can become strongly aligned with eigenvectors associated with particular parts of the spectrum.
The effectiveness of the method depends on factors such as:
The choice of starting vector.
The separation between eigenvalues.
The number of Krylov vectors.
Whether the matrix is sparse.
The desired part of the spectrum.
The method is especially useful when matrix-vector multiplication Ax is inexpensive, as occurs with sparse matrices.
13.4 Approximation and Truncation
When A acts on a vector in the Krylov subspace, the result may not remain exactly in that subspace. It can be decomposed into:
A component inside the subspace.
A residual component outside the subspace.
Krylov methods project the action of A back onto the selected subspace and either ignore or monitor the residual. The smaller the residual, the more reliable the approximate eigenpair.
The method does not necessarily produce the first 100 eigenvalues in numerical order. It produces the eigenvalues that are best represented by the chosen subspace and algorithm. Additional techniques are required when particular eigenvalues—such as the smallest or largest ones—are desired.
13.5 Relation to Gram–Schmidt
Krylov methods repeatedly return to the same fundamental operation used in QR factorization: orthogonalization.
The sequence
usually becomes linearly dependent or nearly dependent numerically. Orthogonalizing the vectors:
Produces a stable basis.
Prevents loss of useful directions.
Allows the projected matrix to be formed cleanly.
Connects Krylov methods to QR factorization and related orthogonalization procedures.
Thus, Gram–Schmidt and orthogonal transformations are central not only to QR iteration but also to large-scale iterative eigenvalue algorithms.
14. Key Comparisons
Eigenvalue computation
Invariant: Similarity transformations preserve eigenvalues.
Transformation: A↦Q−1AQ or, in the orthogonal case, A↦QTAQ.
Structured form: Upper Hessenberg for general matrices; tridiagonal for symmetric matrices.
Main iteration: Shifted QR iteration.
Output: Eigenvalues appear on the diagonal or in converged diagonal blocks.
Singular-value computation
Invariant: Independent orthogonal transformations on the left and right preserve singular values.
Transformation: A↦Q1AQ2T.
Structured form: Bidiagonal.
Main iteration: QR-type iteration on the bidiagonal matrix.
Output: Singular values converge from the structured reduced problem.
Very large or sparse matrices
Invariant or principle: Approximate the action of A on a low-dimensional subspace.
Transformation: Projection onto a Krylov subspace.
Structured problem: A small projected matrix.
Main operation: Repeated sparse matrix-vector multiplication and orthogonalization.
Output: Approximate eigenvalues and eigenvectors.
15. Essential Takeaways
Similarity is the key invariant for eigenvalues. If two matrices are similar, they have the same eigenvalues.
QR iteration preserves eigenvalues while making the matrix progressively more triangular.
Shifts accelerate QR iteration by moving an estimated eigenvalue close to zero before the factorization.
Hessenberg reduction makes QR practical for general dense matrices by introducing zeros that remain in place.
Symmetric Hessenberg matrices are tridiagonal, making symmetric eigenvalue computation especially efficient.
Singular values are invariant under independent orthogonal transformations on the left and right, which allows reduction to bidiagonal form.
One should not explicitly form ATA to compute singular values because doing so can worsen conditioning and lose numerical accuracy.
Krylov methods handle very large or sparse matrices by approximating the eigenvalue problem in a much smaller subspace generated by repeated matrix-vector multiplication.
Numerical linear algebra therefore replaces unavailable exact formulas with structure-preserving transformations, rapidly convergent iterations, and carefully chosen low-dimensional approximations.

Ask anything
We've read this whole study set, so questions about it get the best answers.