This chapter provides methods for the solution of linear least squares problems, eigenvalue problems and singular value problems, as well as associated computations. It provides methods for:
- – solution of linear least squares problems
- – solution of symmetric eigenvalue problems
- – solution of nonsymmetric eigenvalue problems
- – solution of singular value problems
- – solution of generalized linear least squares problems
- – solution of generalized symmetric-definite eigenvalue problems
- – solution of generalized nonsymmetric eigenvalue problems
- – solution of generalized singular value problems
- – matrix factorizations associated with the above problems
- – estimating condition numbers of eigenvalue and eigenvector problems
- – estimating the numerical rank of a matrix
- – solution of the Sylvester matrix equation
For a general introduction to the solution of linear least squares problems, you should turn first to (F04 not in this release). The decision trees, at the end of (F04 not in this release), direct you to the most appropriate methods in (F04 not in this release) F08 class. (F04 not in this release) F08 class contain Black Box (or driver) methods which enable standard linear least squares problems to be solved by a call to a single method.
For a general introduction to eigenvalue and singular value problems, you should turn first to (F02 not in this release). The decision trees, at the end of (F02 not in this release), direct you to the most appropriate methods in (F02 not in this release) F08 class. (F02 not in this release) F08 class contain Black Box (or driver) methods which enable standard types of problem to be solved by a call to a single method. Often methods in (F02 not in this release) call F08 class methods to perform the necessary computational tasks.
The methods in this chapter ( F08 class) handle only dense, band, tridiagonal and Hessenberg matrices (not matrices with more specialised structures, or general sparse matrices). The tables in [Recommendations on Choice and Use of Available Methods] and the decision trees in [Decision Trees] direct you to the most appropriate methods in F08 class.
The methods in this chapter have all been derived from the LAPACK project (see Anderson et al. (1999)). They have been designed to be efficient on a wide range of high-performance computers, without compromising efficiency on conventional serial machines.
It is not expected that you will need to read all of the following sections, but rather you will pick out those sections relevant to your particular problem.
This section is only a brief introduction to the numerical solution of linear least squares problems, eigenvalue and singular value problems. Consult a standard textbook for a more thorough discussion, for example Golub and Van Loan (2012).
The linear least squares problem is
where is an by matrix, is a given element vector and is an -element solution vector.
In the most usual case and , so that has full rank and in this case the solution to problem (1) is unique; the problem is also referred to as finding a least squares solution to an overdetermined system of linear equations.
When and , there are an infinite number of solutions which exactly satisfy . In this case it is often useful to find the unique solution which minimizes , and the problem is referred to as finding a minimum norm solution to an underdetermined system of linear equations.
In the general case when we may have – in other words, may be rank-deficient – we seek the minimum norm least squares solution which minimizes both and .
This chapter ( F08 class) contains driver methods to solve these problems with a single call, as well as computational methods that can be combined with methods in F07 class to solve these linear least squares problems. (F04 not in this release) also contains Black Box methods to solve these linear least squares problems in standard cases. The next two sections discuss the factorizations that can be used in the solution of linear least squares problems.
A number of methods are provided for factorizing a general rectangular by matrix , as the product of an orthogonal matrix (unitary if complex) and a triangular (or possibly trapezoidal) matrix.
A real matrix is orthogonal if ; a complex matrix is unitary if . Orthogonal or unitary matrices have the important property that they leave the -norm of a vector invariant, so that
if is orthogonal or unitary. They usually help to maintain numerical stability because they do not amplify rounding errors.
Orthogonal factorizations are used in the solution of linear least squares problems. They may also be used to perform preliminary steps in the solution of eigenvalue or singular value problems, and are useful tools in the solution of a number of other problems.
The most common, and best known, of the factorizations is the factorization given by
where is an by upper triangular matrix and is an by orthogonal (or unitary) matrix. If is of full rank , then is nonsingular. It is sometimes convenient to write the factorization as
which reduces to
where consists of the first columns of , and the remaining columns.
If , is trapezoidal, and the factorization can be written
where is upper triangular and is rectangular.
The factorization can be used to solve the linear least squares problem (1) when and is of full rank, since
and is an -element vector. Then is the solution of the upper triangular system
The residual vector is given by
The residual sum of squares may be computed without forming explicitly, since
The factorization is given by
where is by lower triangular, is by orthogonal (or unitary), consists of the first rows of , and the remaining rows.
The factorization of is essentially the same as the factorization of ( if is complex), since
The factorization may be used to find a minimum norm solution of an underdetermined system of linear equations where is by with and has rank . The solution is given by
To solve a linear least squares problem (1) when is not of full rank, or the rank of is in doubt, we can perform either a factorization with column pivoting or a singular value decomposition.
The factorization with column pivoting is given by
where and are as before and is a (real) permutation matrix, chosen (in general) so that
and moreover, for each ,
If we put
where is the leading by upper triangular sub-matrix of then, in exact arithmetic, if , the whole of the sub-matrix in rows and columns to would be zero. In numerical computation, the aim must be to determine an index , such that the leading sub-matrix is well-conditioned, and is negligible, so that
Then is the effective rank of . See Golub and Van Loan (2012) for a further discussion of numerical rank determination.
The so-called basic solution to the linear least squares problem (1) can be obtained from this factorization as
where consists of just the first elements of .
The factorization with column pivoting does not enable us to compute a minimum norm solution to a rank-deficient linear least squares problem, unless . However, by applying for further orthogonal (or unitary) transformations from the right to the upper trapezoidal matrix , can be eliminated:
This gives the complete orthogonal factorization
from which the minimum norm solution can be obtained as
[ factorization] gave the forms of the factorization of an by matrix for the two cases and . Taking first the case , the least squares solution of
is the solution of
If the original system is now augmented by the addition of rows so that we require the solution of
where is by , then this is equivalent to finding the least squares solution of
This now requires the factorization of the by triangular-rectangular matrix .
For the case , the least squares solution of the augmented system reduces to
where is pentagonal.
In both cases can be written as a special case of a triangular-pentagonal matrix consisting of an upper triangular part on top of a rectangular part which is itself on top of a trapezoidal part. In the first case there is no trapezoidal part, in the second case a zero upper triangular part can be added, and more generally the two cases can be combined.
The and factorizations are given by
The factorizations are less commonly used than either the or factorizations described above, but have applications in, for example, the computation of generalized factorizations.
The singular value decomposition (SVD) of an by matrix is given by
where and are orthogonal (unitary) and is an by diagonal matrix with real diagonal elements, , such that
The are the singular values of and the first columns of and are the left and right singular vectors of . The singular values and singular vectors satisfy
where and are the th columns of and respectively.
The computation proceeds in the following stages.
|1.||The matrix is reduced to bidiagonal form if is real ( if is complex), where and are orthogonal (unitary if is complex), and is real and upper bidiagonal when and lower bidiagonal when , so that is nonzero only on the main diagonal and either on the first superdiagonal (if ) or the first subdiagonal (if ).|
|2.||The SVD of the bidiagonal matrix is computed as , where and are orthogonal and is diagonal as described above. The singular vectors of are then and .|
If , it may be more efficient to first perform a factorization of , and then compute the SVD of the by matrix , since if and , then the SVD of is given by .
Similarly, if , it may be more efficient to first perform an factorization of .
This chapter supports two primary algorithms for computing the SVD of a bidiagonal matrix. They are:
|(i)||the divide and conquer algorithm;|
The divide and conquer algorithm is much faster than the algorithm if singular vectors of large matrices are required.
The SVD may be used to find a minimum norm solution to a (possibly) rank-deficient linear least squares problem (1). The effective rank, , of can be determined as the number of singular values which exceed a suitable threshold. Let be the leading by sub-matrix of , and be the matrix consisting of the first columns of . Then the solution is given by
where consists of the first elements of .
The simple type of linear least squares problem described in [Linear Least Squares Problems] can be generalized in various ways.
|1.||Linear least squares problems with equality constraints:
where is by and is by , with . The equations may be regarded as a set of equality constraints on the problem of minimizing . Alternatively the problem may be regarded as solving an overdetermined system of equations
where some of the equations (those involving ) are to be solved exactly, and the others (those involving ) are to be solved in a least squares sense. The problem has a unique solution on the assumptions that has full row rank and the matrix has full column rank . (For linear least squares problems with inequality constraints, refer to E04 class.)
|2.||General Gauss–Markov linear model problems:
where is by and is by , with . When , the problem reduces to an ordinary linear least squares problem. When is square and nonsingular, it is equivalent to a weighted linear least squares problem:
The problem has a unique solution on the assumptions that has full column rank , and the matrix has full row rank . Unless is diagonal, for numerical stability it is generally preferable to solve a weighted linear least squares problem as a general Gauss–Markov linear model problem.
The generalized (GQR) factorization of an by matrix and an by matrix is given by the pair of factorizations
where and are respectively by and by orthogonal matrices (or unitary matrices if and are complex). has the form
where is upper triangular. has the form
where or is upper triangular.
Note that if is square and nonsingular, the GQR factorization of and implicitly gives the factorization of the matrix :
without explicitly computing the matrix inverse or the product (remembering that the inverse of an invertible upper triangular matrix and the product of two upper triangular matrices is an upper triangular matrix).
The GQR factorization can be used to solve the general (Gauss–Markov) linear model problem (GLM) (see [Generalized Linear Least Squares Problems], but note that and are dimensioned differently there as by and by respectively). Using the GQR factorization of and , we rewrite the equation as
We partition this as
The GLM problem is solved by setting
from which we obtain the desired solutions
The generalized (GRQ) factorization of an by matrix and a by matrix is given by the pair of factorizations
where and are respectively by and by orthogonal matrices (or unitary matrices if and are complex). has the form
where or is upper triangular. has the form
where is upper triangular.
Note that if is square and nonsingular, the GRQ factorization of and implicitly gives the factorization of the matrix :
without explicitly computing the matrix or the product (remembering that the inverse of an invertible upper triangular matrix and the product of two upper triangular matrices is an upper triangular matrix).
The GRQ factorization can be used to solve the linear equality-constrained least squares problem (LSE) (see [Generalized Linear Least Squares Problems]). We use the GRQ factorization of and (note that and have swapped roles), written as
We write the linear equality constraints as
which we partition as:
Therefore is the solution of the upper triangular system
We partition this expression as:
To solve the LSE problem, we set
which gives as the solution of the upper triangular system
Finally, the desired solution is given by
The generalized (or quotient) singular value decomposition of an by matrix and a by matrix is given by the pair of factorizations
The matrices in these factorizations have the following properties:
|–||is by , is by , is by , and all three matrices are orthogonal. If and are complex, these matrices are unitary instead of orthogonal, and should be replaced by in the pair of factorizations.|
|–||is by , upper triangular and nonsingular. is by (in other words, the is an by zero matrix). The integer is the rank of , and satisfies .|
|–||is by , is by , both are real, non-negative and diagonal, and . Write and , where and lie in the interval from to . The ratios are called the generalized singular values of the pair , . If , then the generalized singular value is infinite.|
and have the following detailed structures, depending on whether or . In the first case, , then
Here is the rank of , , and are diagonal matrices satisfying , and is nonsingular. We may also identify , , for , , and , for . Thus, the first generalized singular values are infinite, and the remaining generalized singular values are finite.
In the second case, when ,
Again, is the rank of , , and are diagonal matrices satisfying , and is nonsingular, and we may identify , , for , , , , for and . Thus, the first generalized singular values are infinite, and the remaining generalized singular values are finite.
Here are some important special cases of the generalized singular value decomposition. First, if is square and nonsingular, then and the generalized singular value decomposition of and is equivalent to the singular value decomposition of , where the singular values of are equal to the generalized singular values of the pair , :
Second, for the matrix , where
if the columns of are orthonormal, then , and the generalized singular value decomposition of and is equivalent to the CS (Cosine–Sine) decomposition of :
Third, the generalized eigenvalues and eigenvectors of can be expressed in terms of the generalized singular value decomposition: Let
Therefore, the columns of are the eigenvectors of , and ‘nontrivial’ eigenvalues are the squares of the generalized singular values (see also [Generalized Symmetric-definite Eigenvalue Problems]). ‘Trivial’ eigenvalues are those corresponding to the leading columns of , which span the common null space of and . The ‘trivial eigenvalues’ are not well defined.
In [Generalized Singular Value Decomposition (GSVD)] the CS (Cosine-Sine) decomposition of an orthogonal matrix partitioned into two submatrices and was given by
The full CS decomposition of an by orthogonal matrix partitions into four submatrices and factorizes as
where, is a by submatrix (which implies the dimensions of , and ); , , and are orthogonal matrices of dimensions , , and respectively; is the by single-diagonal matrix
is the by single-diagonal matrix
is the by single-diagonal matrix
and, is the by single-diagonal matrix
where and the missing zeros remind us that either the column or the row is missing. The by diagonal matrices and are such that .
This is equivalent to the simultaneous singular value decomposition of the four submatrices , , and .
The symmetric eigenvalue problem is to find the eigenvalues, , and corresponding eigenvectors, , such that
For the Hermitian eigenvalue problem we have
For both problems the eigenvalues are real.
When all eigenvalues and eigenvectors have been computed, we write
where is a diagonal matrix whose diagonal elements are the eigenvalues, and is an orthogonal (or unitary) matrix whose columns are the eigenvectors. This is the classical spectral factorization of .
The basic task of the symmetric eigenproblem methods is to compute values of and, optionally, corresponding vectors for a given matrix . This computation proceeds in the following stages.
|1.||The real symmetric or complex Hermitian matrix is reduced to real tridiagonal form . If is real symmetric this decomposition is with orthogonal and symmetric tridiagonal. If is complex Hermitian, the decomposition is with unitary and , as before, real symmetric tridiagonal.|
|2.||Eigenvalues and eigenvectors of the real symmetric tridiagonal matrix are computed. If all eigenvalues and eigenvectors are computed, this is equivalent to factorizing as , where is orthogonal and is diagonal. The diagonal entries of are the eigenvalues of , which are also the eigenvalues of , and the columns of are the eigenvectors of ; the eigenvectors of are the columns of , so that ( when is complex Hermitian).|
This chapter supports four primary algorithms for computing eigenvalues and eigenvectors of real symmetric matrices and complex Hermitian matrices. They are:
|(i)||the divide-and-conquer algorithm;|
|(iii)||bisection followed by inverse iteration;|
|(iv)||the Relatively Robust Representation (RRR).|
The divide-and-conquer algorithm is generally more efficient than the traditional algorithm for computing all eigenvalues and eigenvectors, but the RRR algorithm tends to be fastest of all. For further information and references see Anderson et al. (1999).
This section is concerned with the solution of the generalized eigenvalue problems , , and , where and are real symmetric or complex Hermitian and is positive definite. Each of these problems can be reduced to a standard symmetric eigenvalue problem, using a Cholesky factorization of as either or ( or in the Hermitian case).
With , we have
Hence the eigenvalues of are those of , where is the symmetric matrix and . In the complex case is Hermitian with and .
Table 1 summarises how each of the three types of problem may be reduced to standard form , and how the eigenvectors of the original problem may be recovered from the eigenvectors of the reduced problem. The table applies to real problems; for complex problems, transposed matrices must be replaced by conjugate-transposes.
|Type of problem||Factorization of||Reduction||Recovery of eigenvectors|
|3.||, ||, ||, |
When the generalized symmetric-definite problem has been reduced to the corresponding standard problem , this may then be solved using the methods described in the previous section. No special methods are needed to recover the eigenvectors of the generalized problem from the eigenvectors of the standard problem, because these computations are simple applications of Level 2 or Level 3 BLAS (see F06 class).
Methods which handle symmetric matrices are usually designed so that they use either the upper or lower triangle of the matrix; it is not necessary to store the whole matrix. If either the upper or lower triangle is stored conventionally in the upper or lower triangle of a two-dimensional array, the remaining elements of the array can be used to store other useful data. However, that is not always convenient, and if it is important to economize on storage, the upper or lower triangle can be stored in a one-dimensional array of length ; that is, the storage is almost halved.
This storage format is referred to as packed storage; it is described in [Packed storage] in the F07 class Chapter Introduction.
Methods designed for packed storage are usually less efficient, especially on high-performance computers, so there is a trade-off between storage and efficiency.
A band matrix is one whose elements are confined to a relatively small number of subdiagonals or superdiagonals on either side of the main diagonal. Algorithms can take advantage of bandedness to reduce the amount of work and storage required. The storage scheme for band matrices is described in [Band storage] in the F07 class Chapter Introduction.
If the problem is the generalized symmetric definite eigenvalue problem and the matrices and are additionally banded, the matrix as defined in [Generalized Symmetric-definite Eigenvalue Problems] is, in general, full. We can reduce the problem to a banded standard problem by modifying the definition of thus:
where is an orthogonal matrix chosen to ensure that has bandwidth no greater than that of .
A further refinement is possible when and are banded, which halves the amount of work required to form . Instead of the standard Cholesky factorization of as or , we use a split Cholesky factorization , where
with upper triangular and lower triangular of order approximately ; has the same bandwidth as .
The nonsymmetric eigenvalue problem is to find the eigenvalues, , and corresponding eigenvectors, , such that
More precisely, a vector as just defined is called a right eigenvector of , and a vector satisfying
is called a left eigenvector of .
A real matrix may have complex eigenvalues, occurring as complex conjugate pairs.
This problem can be solved via the Schur factorization of , defined in the real case as
where is an orthogonal matrix and is an upper quasi-triangular matrix with by and by diagonal blocks, the by blocks corresponding to complex conjugate pairs of eigenvalues of . In the complex case, the Schur factorization is
where is unitary and is a complex upper triangular matrix.
The columns of are called the Schur vectors. For each (), the first columns of form an orthonormal basis for the invariant subspace corresponding to the first eigenvalues on the diagonal of . Because this basis is orthonormal, it is preferable in many applications to compute Schur vectors rather than eigenvectors. It is possible to order the Schur factorization so that any desired set of eigenvalues occupy the leading positions on the diagonal of .
The two basic tasks of the nonsymmetric eigenvalue methods are to compute, for a given matrix , all values of and, if desired, their associated right eigenvectors and/or left eigenvectors , and the Schur factorization.
These two basic tasks can be performed in the following stages.
|1.||A general matrix is reduced to upper Hessenberg form which is zero below the first subdiagonal. The reduction may be written with orthogonal if is real, or with unitary if is complex.|
|2.||The upper Hessenberg matrix is reduced to Schur form , giving the Schur factorization (for real) or (for complex). The matrix (the Schur vectors of ) may optionally be computed as well. Alternatively may be postmultiplied into the matrix determined in stage , to give the matrix , the Schur vectors of . The eigenvalues are obtained from the diagonal elements or diagonal blocks of .|
|3.||Given the eigenvalues, the eigenvectors may be computed in two different ways. Inverse iteration can be performed on to compute the eigenvectors of , and then the eigenvectors can be multiplied by the matrix in order to transform them to eigenvectors of . Alternatively the eigenvectors of can be computed, and optionally transformed to those of or if the matrix or is supplied.|
The accuracy with which eigenvalues can be obtained can often be improved by balancing a matrix. This is discussed further in [Balancing and condition for the nonsymmetric eigenproblem] below.
The generalized nonsymmetric eigenvalue problem is to find the eigenvalues, , and corresponding eigenvectors, , such that
More precisely, a vector as just defined is called a right eigenvector of the matrix pair , and a vector satisfying
is called a left eigenvector of the matrix pair .
If is singular then the problem has one or more infinite eigenvalues , corresponding to . Note that if is nonsingular, then the equivalent problem is perfectly well defined and an infinite eigenvalue corresponds to . To deal with both finite (including zero) and infinite eigenvalues, the methods in this chapter do not compute explicitly, but rather return a pair of numbers such that if
and if and then . is always returned as real and non-negative. Of course, computationally an infinite eigenvalue may correspond to a small rather than an exact zero.
For a given pair the set of all the matrices of the form is called a matrix pencil and and are said to be an eigenvalue and eigenvector of the pencil . If and are both singular and share a common null space then
so that the pencil is singular for all . In other words any can be regarded as an eigenvalue. In exact arithmetic a singular pencil will have for some . Computationally if some pair is small then the pencil is singular, or nearly singular, and no reliance can be placed on any of the computed eigenvalues. Singular pencils can also manifest themselves in other ways; see, in particular, Sections 184.108.40.206 and 220.127.116.11 of Anderson et al. (1999) for further details.
The generalized eigenvalue problem can be solved via the generalized Schur factorization of the pair defined in the real case as
where and are orthogonal, is upper triangular with non-negative diagonal elements and is upper quasi-triangular with by and by diagonal blocks, the by blocks corresponding to complex conjugate pairs of eigenvalues. In the complex case, the generalized Schur factorization is
where and are unitary and and are upper triangular, with having real non-negative diagonal elements. The columns of and are called respectively the left and right generalized Schur vectors and span pairs of deflating subspaces of and , which are a generalization of invariant subspaces.
It is possible to order the generalized Schur factorization so that any desired set of eigenvalues correspond to the leading positions on the diagonals of the pair .
The two basic tasks of the generalized nonsymmetric eigenvalue methods are to compute, for a given pair , all values of and, if desired, their associated right eigenvectors and/or left eigenvectors , and the generalized Schur factorization.
These two basic tasks can be performed in the following stages.
|1.||The matrix pair is reduced to generalized upper Hessenberg form , where is upper Hessenberg (zero below the first subdiagonal) and is upper triangular. The reduction may be written as in the real case with and orthogonal, and in the complex case with and unitary.|
|2.||The generalized upper Hessenberg form is reduced to the generalized Schur form using the generalized Schur factorization , in the real case with and orthogonal, and in the complex case. The generalized Schur vectors of are given by , . The eigenvalues are obtained from the diagonal elements (or blocks) of the pair .|
|3.||Given the eigenvalues, the eigenvectors of the pair can be computed, and optionally transformed to those of or .|
The accuracy with which eigenvalues can be obtained can often be improved by balancing a matrix pair. This is discussed further in [Balancing the generalized eigenvalue problem] below.
The Sylvester equation is a matrix equation of the form
where , , and are given matrices with being by , an by matrix and , and the solution matrix , by matrices. The solution of a special case of this equation occurs in the computation of the condition number for an invariant subspace, but a combination of methods in this chapter allows the solution of the general Sylvester equation.
Methods are also provided for solving a special case of the generalized Sylvester equations
where , and are given matrix pairs, and and are the solution matrices.
In this section we discuss the effects of rounding errors in the solution process and the effects of uncertainties in the data, on the solution to the problem. A number of the methods in this chapter return information, such as condition numbers, that allow these effects to be assessed. First we discuss some notation used in the error bounds of later sections.
The bounds usually contain the factor (or ), which grows as a function of the matrix dimension (or matrix dimensions and ). It measures how errors can grow as a function of the matrix dimension, and represents a potentially different function for each problem. In practice, it usually grows just linearly; is often true, although generally only much weaker bounds can be actually proved. We normally describe as a ‘modestly growing’ function of . For detailed derivations of various , see Golub and Van Loan (2012) and Wilkinson (1965).
For linear equation (see F07 class) and least squares solvers, we consider bounds on the relative error in the computed solution , where is the true solution. For eigenvalue problems we consider bounds on the error in the th computed eigenvalue , where is the true th eigenvalue. For singular value problems we similarly consider bounds .
Bounding the error in computed eigenvectors and singular vectors is more subtle because these vectors are not unique: even though we restrict and , we may still multiply them by arbitrary constants of absolute value . So to avoid ambiguity we bound the angular difference between and the true vector , so that
Here is in the standard range: . When is small, we can choose a constant with absolute value so that .
In addition to bounds for individual eigenvectors, bounds can be obtained for the spaces spanned by collections of eigenvectors. These may be much more accurately determined than the individual eigenvectors which span them. These spaces are called invariant subspaces in the case of eigenvectors, because if is any vector in the space, is also in the space, where is the matrix. Again, we will use angle to measure the difference between a computed space and the true space :
may be computed as follows. Let be a matrix whose columns are orthonormal and . Similarly let be an orthonormal matrix with columns spanning . Then
Finally, we remark on the accuracy of the bounds when they are large. Relative errors like and angular errors like are only of interest when they are much less than . Some stated bounds are not strictly true when they are close to , but rigorous bounds are much more complicated and supply little extra information in the interesting case of small errors. These bounds are indicated by using the symbol , or ‘approximately less than’, instead of the usual . Thus, when these bounds are close to 1 or greater, they indicate that the computed answer may have no significant digits at all, but do not otherwise bound the error.
A number of methods in this chapter return error estimates and/or condition number estimates directly. In other cases Anderson et al. (1999) gives code fragments to illustrate the computation of these estimates, and a number of the F08 class example programs, for the driver methods, implement these code fragments.
The conventional error analysis of linear least squares problems goes as follows. The problem is to find the minimizing . Let be the solution computed using one of the methods described above. We discuss the most common case, where is overdetermined (i.e., has more rows than columns) and has full rank.
Then the computed solution has a small normwise backward error. In other words minimizes , where
and is a modestly growing function of and is the machine precision. Let , , and . Then if is small enough, the error is bounded by
If is rank-deficient, the problem can be regularized by treating all singular values less than a user-specified threshold as exactly zero. See Golub and Van Loan (2012) for error bounds in this case, as well as for the underdetermined case.
The solution of the overdetermined, full-rank problem may also be characterised as the solution of the linear system of equations
By solving this linear system (see F07 class) component-wise error bounds can also be obtained (see Arioli et al. (1989)).
The usual error analysis of the SVD algorithm is as follows (see Golub and Van Loan (2012)).
The computed SVD, , is nearly the exact SVD of , i.e., is the true SVD, so that and are both orthogonal, where , , and . Here is a modestly growing function of and and is the machine precision. Each computed singular value differs from the true by an amount satisfying the bound
Thus large singular values (those near ) are computed to high relative accuracy and small ones may not be.
The angular difference between the computed left singular vector and the true satisfies the approximate bound
is the absolute gap between and the nearest other singular value. Thus, if is close to other singular values, its corresponding singular vector may be inaccurate. The same bound applies to the computed right singular vector and the true vector . The gaps may be easily obtained from the computed singular values.
Let be the space spanned by a collection of computed left singular vectors , where is a subset of the integers from to . Let be the corresponding true space. Then
is the absolute gap between the singular values in and the nearest other singular value. Thus, a cluster of close singular values which is far away from any other singular value may have a well determined space even if its individual singular vectors are ill-conditioned. The same bound applies to a set of right singular vectors .
In the special case of bidiagonal matrices, the singular values and singular vectors may be computed much more accurately (see Demmel and Kahan (1990)). A bidiagonal matrix has nonzero entries only on the main diagonal and the diagonal immediately above it (or immediately below it). Reduction of a dense matrix to bidiagonal form can introduce additional errors, so the following bounds for the bidiagonal case do not apply to the dense case.
Using the methods in this chapter, each computed singular value of a bidiagonal matrix is accurate to nearly full relative accuracy, no matter how tiny it is, so that
The computed left singular vector has an angular error at most about
is the relative gap between and the nearest other singular value. The same bound applies to the right singular vector and . Since the relative gap may be much larger than the absolute gap, this error bound may be much smaller than the previous one. The relative gaps may be easily obtained from the computed singular values.
The usual error analysis of the symmetric eigenproblem is as follows (see Parlett (1998)).
The computed eigendecomposition is nearly the exact eigendecomposition of , i.e., is the true eigendecomposition so that is orthogonal, where and and is a modestly growing function of and is the machine precision. Each computed eigenvalue differs from the true by an amount satisfying the bound
Thus large eigenvalues (those near ) are computed to high relative accuracy and small ones may not be.
The angular difference between the computed unit eigenvector and the true satisfies the approximate bound
if is small enough, where
is the absolute gap between and the nearest other eigenvalue. Thus, if is close to other eigenvalues, its corresponding eigenvector may be inaccurate. The gaps may be easily obtained from the computed eigenvalues.
Let be the invariant subspace spanned by a collection of eigenvectors , where is a subset of the integers from to . Let be the corresponding true subspace. Then
is the absolute gap between the eigenvalues in and the nearest other eigenvalue. Thus, a cluster of close eigenvalues which is far away from any other eigenvalue may have a well determined invariant subspace even if its individual eigenvectors are ill-conditioned.
In the special case of a real symmetric tridiagonal matrix , methods in this chapter can compute the eigenvalues and eigenvectors much more accurately. See Anderson et al. (1999) for further details.
The three types of problem to be considered are , and . In each case and are real symmetric (or complex Hermitian) and is positive definite. We consider each case in turn, assuming that methods in this chapter are used to transform the generalized problem to the standard symmetric problem, followed by the solution of the symmetric problem. In all cases
is the absolute gap between and the nearest other eigenvalue.
|1.||. The computed eigenvalues can differ from the true eigenvalues by an amount
The angular difference between the computed eigenvector and the true eigenvector is
|2.|| or . The computed eigenvalues can differ from the true eigenvalues by an amount
The angular difference between the computed eigenvector and the true eigenvector is
These error bounds are large when is ill-conditioned with respect to inversion ( is large). It is often the case that the eigenvalues and eigenvectors are much better conditioned than indicated here. One way to get tighter bounds is effective when the diagonal entries of differ widely in magnitude, as for example with a graded matrix.
|1.||. Let be a diagonal matrix. Then replace by and by in the above bounds.|
|2.||or . Let be a diagonal matrix. Then replace by and by in the above bounds.|
Further details can be found in Anderson et al. (1999).
The nonsymmetric eigenvalue problem is more complicated than the symmetric eigenvalue problem. In this section, we just summarise the bounds. Further details can be found in Anderson et al. (1999).
We let be the th computed eigenvalue and the th true eigenvalue. Let be the corresponding computed right eigenvector, and the true right eigenvector (so ). If is a subset of the integers from to , we let denote the average of the selected eigenvalues: , and similarly for . We also let denote the subspace spanned by ; it is called a right invariant subspace because if is any vector in then is also in . is the corresponding computed subspace.
The algorithms for the nonsymmetric eigenproblem are normwise backward stable: they compute the exact eigenvalues, eigenvectors and invariant subspaces of slightly perturbed matrices , where . Some of the bounds are stated in terms of and others in terms of ; one may use for either quantity.
Methods are provided so that, for each () pair the two values and , or for a selected subset of eigenvalues the values and can be obtained, for which the error bounds in Table 2 are true for sufficiently small , (which is why they are called asymptotic):
If the problem is ill-conditioned, the asymptotic bounds may only hold for extremely small . The global error bounds of Table 3 are guaranteed to hold for all :
|Simple eigenvalue||Holds for all|
There are two preprocessing steps one may perform on a matrix in order to make its eigenproblem easier. The first is permutation, or reordering the rows and columns to make more nearly upper triangular (closer to Schur form): , where is a permutation matrix. If is permutable to upper triangular form (or close to it), then no floating-point operations (or very few) are needed to reduce it to Schur form. The second is scaling by a diagonal matrix to make the rows and columns of more nearly equal in norm: . Scaling can make the matrix norm smaller with respect to the eigenvalues, and so possibly reduce the inaccuracy contributed by roundoff (see Chapter 11 of Wilkinson and Reinsch (1971)). We refer to these two operations as balancing.
Permuting has no effect on the condition numbers or their interpretation as described previously. Scaling, however, does change their interpretation and further details can be found in Anderson et al. (1999).
The algorithms for the generalized nonsymmetric eigenvalue problem are normwise backward stable: they compute the exact eigenvalues (as the pairs ), eigenvectors and deflating subspaces of slightly perturbed pairs , where
As with the standard nonsymmetric eigenvalue problem, there are two preprocessing steps one may perform on a matrix pair in order to make its eigenproblem easier; permutation and scaling, which together are referred to as balancing, as indicated in the following two steps.
|1.||The balancing method first attempts to permute and to block upper triangular form by a similarity transformation:
where is a permutation matrix, , , and are upper triangular. Then the diagonal elements of the matrix and are generalized eigenvalues of . The rest of the generalized eigenvalues are given by the matrix pair . Subsequent operations to compute the eigenvalues of need only be applied to the matrix ; this can save a significant amount of work if is smaller than the original matrix pair . If no suitable permutation exists (as is often the case), then there is no gain in efficiency or accuracy.
|2.||The balancing method applies a diagonal similarity transformation to , to make the rows and columns of as close as possible in the norm:
This transformation usually improves the accuracy of computed generalized eigenvalues and eigenvectors. However, there are exceptional occasions when this transformation increases the norm of the pencil; in this case accuracy could be lower with diagonal balancing.
See Anderson et al. (1999) for further details.
Error bounds for other problems such as the generalized linear least squares problem and generalized singular value decomposition can be found in Anderson et al. (1999).
A number of the methods in this chapter use what is termed a block partitioned algorithm. This means that at each major step of the algorithm a block of rows or columns is updated, and much of the computation is performed by matrix-matrix operations on these blocks. The matrix-matrix operations are performed by calls to the Level 3 BLAS (see F06 class), which are the key to achieving high performance on many modern computers. In the case of the algorithm for reducing an upper Hessenberg matrix to Schur form, a multishift strategy is used in order to improve performance. See Golub and Van Loan (2012) or Anderson et al. (1999) for more about block partitioned algorithms and the multishift strategy.
The performance of a block partitioned algorithm varies to some extent with the block size – that is, the number of rows or columns per block. This is a machine-dependent parameter, which is set to a suitable value when the library is implemented on each range of machines. You do not normally need to be aware of what value is being used. Different block sizes may be used for different methods. Values in the range to are typical.
On more conventional machines there is often no advantage from using a block partitioned algorithm, and then the methods use an unblocked algorithm (effectively a block size of ), relying solely on calls to the Level 2 BLAS (see F06 class again).
The only situation in which you need some awareness of the block size is when it affects the amount of workspace to be supplied to a particular method. This is discussed in [Length of work arrays].
Anderson E, Bai Z, Bischof C, Blackford S, Demmel J, Dongarra J J, Du Croz J J, Greenbaum A, Hammarling S, McKenney A and Sorensen D (1999) LAPACK Users' Guide (3rd Edition) SIAM, Philadelphia
Arioli M, Duff I S and de Rijk P P M (1989) On the augmented system approach to sparse least squares problems Numer. Math. 55 667–684
Demmel J W and Kahan W (1990) Accurate singular values of bidiagonal matrices SIAM J. Sci. Statist. Comput. 11 873–912
Golub G H and Van Loan C F (2012) Matrix Computations (4th Edition) Johns Hopkins University Press, Baltimore
Moler C B and Stewart G W (1973) An algorithm for generalized matrix eigenproblems SIAM J. Numer. Anal. 10 241–256
Parlett B N (1998) The Symmetric Eigenvalue Problem SIAM, Philadelphia
Stewart G W and Sun J-G (1990) Matrix Perturbation Theory Academic Press, London
Ward R C (1981) Balancing the generalized eigenvalue problem SIAM J. Sci. Stat. Comp. 2 141–152
Wilkinson J H (1965) The Algebraic Eigenvalue Problem Oxford University Press, Oxford
Wilkinson J H and Reinsch C (1971) Handbook for Automatic Computation II, Linear Algebra Springer–Verlag