Computational Error and Complexity in Science and Engineering

V. Lakshmikantham , S.K. Sen , in Mathematics in Science and Engineering, 2005

5.5.8 Eigenvalues and eigenvectors of a matrix

The eigenvalues and eigenvectors are defined for an n × n(singular or nonsingular) matrix A and not for an m × n rectangular matrix, where m ≠ n.. If A is nonsquare then we may append appropriate number of zero rows or zero columns to make it square before we talk about its eigenvalues and eigenvectors. If we find a scalar λ and an n × 1 vector x so that Ax = λx then λ is one of n possible eigenvalues and x is the corresponding eigenvector of A. The eigenvalue computation is identical with the problem of computing the roots of a polynomial equation while the eigenvector computation is identical with that of computing a solution vector x of the linear homogeneous equation (A − λI)x = 0 (null column vector), where I is the n × n unit matrix and the eigenvalue λ is known/computed. The eigenvalues will be computed iteratively while the eigenvectors are obtained in the process of this iteration or by actually solving the homogeneous equation noniteratively or iteratively.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/S0076539205800566

DECOMPOSING PROJECTIVE TRANSFORMATIONS

Ronald N. Goldman , in Graphics Gems III (IBM Version), 1992

Third Decomposition Algorithm — Perspective * Affine

If a projective transformation has a perspective factor, then it must be a singular matrix. This is easy to see because every perspective transformation M has an eyepoint E that is mapped to a singularity—that is, to the point with homogeneous coordinates (0, 0, 0, 0). Thus,

so the eyepointE is an eigenvector of the matrix M corresponding to the eigenvalue 0. Thus, M must be singular. We shall show that if L is nonsingular, then the converse is also true. That is, if M is a singular 4 × 4 matrix whose upper 3 × 3 submatrix L is nonsingular, then M can be factored into the product of a perspective projection and an affine transformation.

Suppose, then, that we have a singular 4 × 4 matrix

representing a projective transformation, and that the linear transformation L is nonsingular. Since M is singular, Det(M) = 0. Therefore, one of its eigenvalues is 0. Let E be a nonzero eigenvector corresponding to the eigenvalue 0. Since L is nonsingular, E cannot lie at infinity—that is, E ≠ (e 1, e 2, e 3, 0)—otherwise, L would also have a nonzero eigenvector corresponding to the eigenvalue 0. We will use E as the eyepoint of the perspective projection.

To complete the definition of the perspective transformation, we also need the perspective plane. Recall that by convention a point P is mapped by the projective transformation M to thepoint

Thus, points on the plane S defined by the linear equation

are not affected by the projective part of the transformation. Let R be the perspective projection defined by the eyepoint E and the perspective plane S, and let A be the affine transformation defined by the linear transformation L and the translation T.Then we shall show that

We can verify that this equation is valid by checking that it holds for all points. If P is in S, then P*R = P and P · N + d = 1, so

If P is not in S, then the line from the eyepoint E to the point P intersects the plane S in a unique point Q so

Therefore, because E is an eigenvector of M corresponding to the eigenvalue 0,

P M = { λ Q + ( 1 λ ) E } M = λ ( Q M ) = λ ( Q L + T ) / λ ( Q N + d ) = ( Q L + T ) = Q A = P ( R A ) .

The last equality holds because P lies on the line joining Q and E. Therefore, the perspective projection R maps P * to Q *.

Thus, we have succeeded in factoring a singular projective transformation M into the product of a perspective transformation R and an affine transformationA. The matrix for the perspective transformation R can be found explicitly from the eyepoint E and the plane S by the methods described in Goldman (1990), and the affine transformation A can be factored further into simple, geometrically meaningful, factors by the techniques described in Gem III.3. Thus, we have succeeded in decomposing a singular projective transformation into simple, geometrically meaningful factors.

Still, this factoring is not quite satisfactory, since in geometric modeling the perspective transformation comes last rather than first. Therefore, let us try to reverse the order of our factors.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780080507552500324

Systems of Linear Equations

Stephen Andrilli , David Hecker , in Elementary Linear Algebra (Fourth Edition), 2010

Using Row Reduction to Show That a Matrix Is Singular

As we have seen, not every square matrix has an inverse. For a singular matrix A, row reduction of [A| I n ] does not produce I n to the left of the augmentation bar. Now, the only way this can happen is if, during row reduction, we reach a column whose main diagonal entry and all entries below it are zero. In that case, there is no way to use a type (I) or type (III) operation to place a nonzero entry in the main diagonal position for that column. Hence, we cannot transform the leftmost columns into the identity matrix. This situation is illustrated in the following example:

Example 5

We attempt to find an inverse for the singular matrix

A = [ 4 2 8 1 2 0 4 1 1 4 2 0 3 1 6 2 ] .

Beginning with [A| I 4] and simplifying the first two columns, we obtain

Continuing on to the third column, we see that the (3,3) entry is zero. Thus, a type (I) operation cannot be used to make the pivot 1. Because the (4,3) entry is also zero, no type (III) operation (switching the pivot row with a row below it) can make the pivot nonzero. We conclude that there is no way to transform the first four columns into the identity matrix I 4 using the row reduction process, and so the original matrix A has no inverse.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780123747518000184

Linear Systems of Equations (Computer Science)

Victor Pan , in Encyclopedia of Physical Science and Technology (Third Edition), 2003

III.E Block Matrix Algorithms

Arithmetic operations with matrices can be performed the same as those with numbers, except that singular matrices cannot be inverted, and the communitive law no longer holds for multiplications (see Section II.D). If the coefficient matrix is represented in block matrix form, as in Eq. (3), then we may perform block Gaussian elimination operating with matrix blocks the same as with numbers and taking special care when divisions and/or pivoting are needed. The block version can be highly effective. For instance, we represent the linear system of Section II.A as follows [compare Eq. (3)]:

[ B 2 I 2 I 2 B 2 ] [ y z ] = [ c d ] , c = [ u 6 u 16 u 7 u 9 ] d = [ u 13 u 15 u 10 u 12 ] , B 2 = [ 4 1 1 4 ]

where I 2 is the 2   ×   2 identity matrix, and y, z are two-dimensional vectors of unknowns. Then block forward elimination transforms the extended matrix as follows:

[ B 2 I 2 c I 2 B 2 d ] [ B 2 I 2 c B 2 1 C 2 f ]

Here, C 2  = B 2  B 2 −1 and f  = d  B 2 −1 c. Block back substitution defines the solution vectors

z = C 2 1 f , y = B 2 1 ( c z ) = B 2 1 ( c C 2 1 f )

The recent development of computer technology greatly increased the already high popularity and importance of block matrix algorithms (and consequently, of matrix multiplication and inversion) for solving linear systems, because block matrix computations turned out to be particularly well suited and effective for implementation on modern computers and supercomputers.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B0122274105008619

LINEAR EQUATIONS

G.M. PHILLIPS , P.J. TAYLOR , in Theory and Applications of Numerical Analysis (Second Edition), 1996

Algorithm 9.5

Solve tridiagonal equations of the form (9.46) and (9.47) . There is no test for a zero pivot or singular matrix (see below).

β1: = b l

δ1: = d 1

for i : = 1 to n − 1

m i : = a i+ 1 i

 β i+ 1: = b i+ 1m i c i

 δ i+ 1: = d i+ lm i δ i

next i

x n : = δ n n

for i: = n − 1 down to 1

x i : = (δ i c i x i+ 1)/β i

next i

If A is positive definite we can be certain that the algorithm will not fail because of a zero pivot. In Problem 9.42, simple conditions on the elements a i , b i and c i are given which ensure that A is positive definite. These conditions hold for the tridiagonal matrix M in (6.36) for cubic splines. We shall also see in Chapter 14 that tridiagonal equations occur in numerical methods of solving boundary value problems and that in many such applications A is positive definite (see Problem 14.5).

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780125535601500100

Mathematical preliminaries

J.E. Akin , in Finite Element Analysis with Error Estimators, 2005

2.14 General matrix partitions

The above small example has led to the most general form of the algebraic system that results from satisfying the required integral form: a singular matrix system with more unknowns that equations. That is because we chose to apply the essential boundary conditions last and there is not a unique solution until that is done. The algebraic system can be written in a general matrix form that more clearly defines what must be done to reduce the system to a solvable form by utilizing essential boundary condition values. Note that the system degrees of freedom, D, and the full equations could always be rearranged in the following partitioned matrix form

(2.48) [ S u u S u k S k u S k k ] { D u D k } = { C u C k + P k }

where D u represents the unknown nodal parameters, and D k represents the known essential boundary values of the other parameters. The sub-matrices S uu and S kk are square, whereas Suk and Sku are rectangular, in general. In a finite element formulation all of the coefficients in the S and C matrices are known. The P k term represents that there are usually unknown generalized reactions associated with essential boundary conditions. This means that in general after the essential boundary conditions (D k ) are prescribed the remaining unknowns are D u and P k . Then the net number of unknowns corresponds to the number of equations, but they must be re-arranged before all the remaining unknowns can be computed.

Here, for simplicity, it has been assumed that the equations have been numbered in a manner that places the prescribed parameters (essential boundary conditions) at the end of the system equations. The above matrix relations can be rewritten as

S u u D u + S u k D k = C u S k u D u + S k k D k = C k + P k

so that the unknown nodal parameters are obtained by inverting the non-singular square matrix Suu in the top partitioned rows. That is,

D u = S u u 1 ( C u S u k D k ) ,

Most books on numerical analysis assume that you have reduced the system to the non-singular form given above where the essential conditions, D u , have already been moved to the right hand side. Many authors use examples with null conditions (D k is zero) so the solution is the simplest form, D u = S −1 uu C u . If desired, the values of the necessary reactions, P k , can now be determined from

P k = S k u D u + S k k D k C k

In nonlinear and time dependent applications the reactions can be found from similar calculations. In most applications the reaction data have physical meanings that are important in their own right, or useful in validating the solution. However, this part of the calculations is optional. If one formulates a finite element model that satisfies the essential boundary conditions in advance then the second row of the partitioned system S matrix is usually not generated and one can not recover reaction data.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780750667227500333

Volume 3

M. Zeaiter , D. Rutledge , in Comprehensive Chemometrics, 2009

3.04.2.2.1(v) D-optimal algorithm

To apply the D-optimal algorithm, 9 the scores obtained by singular value decomposition (SVD) were used instead of the raw spectra to avoid calculation problems with the near-singular matrix. The D-optimal algorithm used is based on the Federov algorithm with some modifications. The same results as that of K&S algorithm were found, as can be seen in Figure 1 .

Code 5 D-optimal selection algorithm

The comparison of the performance of PLS models after using different selection algorithms to define the calibration and test sets indicates that the random selection algorithm does not ensure a good representativity of the calibration set. K&S, D-optimal, and Duplex-on-X all gave better models (based on R 2, SEP, and bias) for the same optimal number of LVs (3), while nevertheless giving b-coefficient vectors that were not as noisy ( Figure 4 ). Ranking selection apparently gives an even better model but for five LVs, which, when examining the noise in the b-coefficient vector, most probably corresponds to overfitting. This is even more evident in the case of Duplex-on-y, where 7 is the optimal number of LVs. However, Duplex-on-y showed a better representativity of the calibration data set as the extreme boundaries were included in the calibration set to train the model.

Figure 4. Comparison of the PLS b-coefficients using the different subset selection methods. (a) Random selection; (b) Ranking selection; (c) K&S selection; (d) Duplex-on-X; (e) Duplex-on-y; (f) D-Optimal.

This comparison is based on the particular data set used in this example and of course the statistical results obtained will depend on the data set used. However, Table 1 clearly shows the advantage of using an optimal selection algorithm compared with random selection. Ranking selection has resulted in a model with better R 2 and SEP compared to random selection. Duplex selection applied to the y vector gives the best results, with better SEP and bias. Use of algorithms such as K&S and Duplex is interesting in the case of small data sets (less than 10 samples) for building and testing the model. This is mostly the case for data when standards cannot be prepared, for example, natural products, reaction kinetics, biological synthesis, and phenomena where the kinetics are too fast to collect samples or where, for safety reasons, it is impossible to collect lots of samples for reference measurements.

Pros/Cons

+ From the example given above, calibration data set selection based on optimality criteria improved the quality of PLS model predictions by improving the representativeness of the calibration data.

+ Using selection algorithm based on the 'y' reference value is advantageous to cover the wider range of 'y' values .

− When adopting this approach, there is a risk of selecting outliers if the data were not inspected a priori and potential outliers removed.

Table 1. Comparison of the PLS model statistics using different selection algorithm for a given number of calibration set (30) and test set (40) and a fixed number of LVs (LV   =   3)

LV SEP Bias R2
Random 3 0.67 −0.04 0.52
Ranking 3 0.62 −0.12 0.64
K&S 3 0.62 −0.7 0.78
Duplex-X 3 0.54 −0.02 0.76
Duplex-y 3 0.50 −0.02 0.77
D-optimal 3 0.65 0.2 0.68

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780444527011000740

Stability and Convergence of Iterative Solvers

Sandip Mazumder , in Numerical Methods for Partial Differential Equations, 2016

4.1 Eigenvalues and Condition Number

The stability and convergence of the iterative solution of a linear system is deeply rooted in the eigenvalues of the linear system under consideration. Therefore, we first discuss calculation of the eigenvalues and the implication of their magnitudes. The eigenvalues of a matrix [A] can be computed using the equation

(4.1) [ A ] [ q ] = λ [ q ] ,

where the scalar, λ, is the so-called eigenvalue, and [q] is the so-called eigenvector. The product of a square matrix and a vector in hyperdimensional space (or column matrix), as in the left-hand side of Eq. (4.1), will result in another vector. In general, this new vector may have no relation to the original vector. If, however, the result of the product is the original vector times some scalar quantity, then, the vector is the so-called eigenvector of the matrix [A], and the scalar premultiplier is known as the eigenvalue of [A]. It is easy to see that the eigenvalue represents a stretching factor. The nontrivial solution to Eq. (4.1) can be found if and only if

(4.2) det [ A ] λ [ I ] = 0 ,

where [I] is the identity matrix. Equation (4.2) represents a polynomial equation of degree K (i.e., the number of equations or unknowns), and is also known as the characteristic equation. The polynomial resulting from the left-hand side of Eq. (4.2) is also known as the characteristic polynomial of matrix [A]. In general, the roots – K of them – resulting from the solution of Eq. (4.2) may be complex numbers. In summary, a square matrix [A] of size K × K will have K eigenvalues, which may be real or complex.

The condition number of a square matrix [A], comprised of elements that are real only, is defined as the ratio of its largest to its smallest eigenvalue (by moduli), i.e.,

(4.3) κ A = λ max ( A ) λ min ( A ) .

Since the eigenvalues may be real or complex even for a matrix comprised of real numbers as its elements, as is always the case for coefficient matrices arising out of discretization of PDEs, the moduli of the eigenvalues must be used in the case when they are complex. Also, whether the eigenvalues are positive or negative does not affect the condition number, since the moduli are used in the definition.

Using the definitions provided by Eqs. (4.2) and (4.3), it follows that an identity matrix has a condition number equal to unity since all its eigenvalues are also equal to unity. In terms of iterative solution of a linear system, this is the best-case scenario, because if [ A ] = [ I ] , no iterations would be necessary to solve the linear system. Hence, a matrix with a condition number close to unity is known as a well-conditioned matrix. Such matrices are amenable to efficient iterative solution, as we shall see shortly. On the other hand, a matrix with a large condition number is known as an ill-conditioned matrix, and convergence for such a linear system may be difficult or elusive. A matrix with a condition number equal to infinity is known as a singular matrix . If the coefficient matrix is singular, the matrix is not invertible. For the particular scenario under consideration, i.e., solution of PDEs, the coefficient matrix is rarely singular. For practical problems, singular matrices can only arise due to programming errors, whereby one of the diagonal elements has been incorrectly assigned a zero value. From Eq. (4.3), a small condition number implies that the maximum and minimum eigenvalues must be fairly close to each other. In the numerical methods literature, this is often referred to as clustering of eigenvalues. A matrix whose eigenvalues are clustered is preferable for iterative solution over one whose eigenvalues are scattered. An example, illustrating the use of Eqs. (4.2) and (4.3), is presented next.

Example 4.1

In this example, we calculate the eigenvalues and condition numbers of two matrices considered at the beginning of Section 3.2, namely

[ A ] = 5 2 2 2 6 3 1 2 7 and [ C ] = 5 2 2 2 6 3 7 2 1

Using Eq. (4.2), we get

5 λ 2 2 2 6 λ 3 1 2 7 λ = 0 ,

or f ( λ ) = λ 3 + 6 λ 2 + 49 λ 242 = 0 . A plot of the cubic function is shown in the above figure. The three roots of the cubic equation are −6.701, 4.297, and 8.404, as indicated by the function changing sign three times. The condition number of [A] is κ ( A ) = 8.404 / 4.297 = 1.96 . In a similar manner, the eigenvalues of the matrix [C] can be determined, and they are −6.671, −1.314, and 7.985. The resulting condition number of [C] is

κ ( C ) = 7.985 / ( 1.314 ) = 6.07 .

In Section 3.2, the Jacobi method was used to solve the system [ A ] [ ϕ ] = [ 9 1 10 ] T , and convergence was attained. However, the same method resulted in divergence when attempting to solve [ C ] [ ϕ ] = [ 9 1 10 ] T , where the matrices [A] and [C] are as shown in Example 4.1. Earlier discussions insinuated that this change from convergence to divergence was caused by a change is some property of the coefficient matrix. Example 4.1 clearly shows that interchanging the two coefficients in the last row of the coefficient matrix drastically alters the condition number of the matrix. The second case, which has a much larger condition number, is the case where convergence could not be attained. Thus, it is fair to conclude that the condition number of the coefficient matrix has some relation to the convergence of an iterative solver used to solve the linear system of equations. The closer the condition number is to unity, the better the convergence, and vice versa. However, it is not clear what cut-off value of the condition number, if any, might cause divergence. Further, the condition number of the coefficient matrix is not sufficient to explain why the same system of equations may reach convergence with some iterative scheme and not with others since the condition number of the coefficient matrix is independent of the iterative scheme used to solve the system.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780128498941000044

Surface Green Function Matching

C. Trallero-Giner , ... F. García-Moliner , in Long Wave Polar Modes in Semiconductor Heterostructures, 1998

Case 1: Free surface

By convention the vacuum is on side 1. Then G 1 has only the electrical part, but in order to carry out a matching of the two unequal media we must formally put all the quantities together in the same matrix format spanning the M and E subspaces. Thus we define the full G 1 matrix as having three identically nil submatrices. These are the MM, ME and EM submatrices, so only the EE submatrix is nonvanishing and the form of G 1, as well as that of G 1 — surface projection — is

(4.65) | 0 0 0 * | ,

where the asterisk denotes that this element simply does not vanish.

A formal way of putting this into the analysis is to express G 1, G 1 etc, as, say, I E G 1 I E . Then all the algebraic operations pertaining to G 1, such as the inversion of G 1 , are carried out in the E subspace and then the result is cast in the large matrix format (4.65). Thus writing down G 1 1 does not imply inverting a singular matrix.

Now, an elementary excitation incident on the surface form side 2 has both, the M and E parts. Of these, only the E part propagates outside and the transfer matrix which propagates this amplitudes is

(4.66) I E G 1 ( z , 0 ) I E G 1 1 I E .

This is the canonical term to be employed in the general Surface Green Function Matching formulae of section 4 concerning side 1, while the quantities pertaining to side 2 involve G 2, G 2 and G 2 1 in the standard way, all four submatrices then being nonvanishing. One can now differentiate (4.66) with respect to z and carry out the Surface Green Function Matching programme in the usual way. In this process one encounters the standard linear differential form A ± which for side 1 takes again the form (4.65).

Then defining

(4.67) ± I E A ± I E ,

the matching formula for the full G s 1 is

(4.68) G s 1 = I E 1 ( + ) I E G 1 1 I E A 2 ( ) G 2 1 .

The formal prescription for the evaluation of a term like G 1 ( z , 0 ) G 1 1 G s is then

(4.69) I E G 1 ( z , 0 ) I E G 1 1 I E [ I E 1 ( + ) I E G 1 1 I E A 2 ( ) G 2 1 ] ,

which precisely prescribes all the terms and contributions surviving in the end. The full Surface Green Function Matching program can then be carried out with no ambiguity.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780080426945500050

Eigenvalues and Eigenvectors

William Ford , in Numerical Linear Algebra with Applications, 2015

5.6 Chapter Summary

Defining Eigenvalues and Their Associated Eigenvectors

λ is an eigenvalue of n  × n matrix A, and v    0 is an eigenvector if Av  =   λv; in other words, Av is parallel to v and either shrinks or contracts it. The relationship Av  =   λv is equivalent to (A    λI) v  =   0, and in order for there to be a nontrivial solution, we must have

det A λ I = 0 .

This is called the characteristic equation, and the polynomial

p λ = det A λ I

is the characteristic polynomial. The eigenvalues are the roots of the characteristic polynomial, and an eigenvector associated with an eigenvalue λ is a solution to the homogeneous system

A λ I v = 0 .

The process of finding the eigenvalues and associated eigenvectors would seem to be

Locate the roots λ1, λ2,…, λ n of p and find a nonzero solution to (A    λ iI) vi   =   0 for each λ i.

There is a serious problem with this approach. If p has degree five or more, the eigenvalues must be approximated using numerical techniques, since there is no analytical formula for roots of such polynomials. We will see in Chapter 10 that polynomial root finding can be difficult. A small change in a polynomial coefficient can cause large changes in its roots.

Selected Properties of Eigenvalues and Eigenvectors

A matrix with a 0 eigenvalue is singular, and every singular matrix has a 0 eigenvalue. If we can find the eigenvalues of A accurately, then det A  = Π i  =   1 n λ i . If we happen to need the determinant, this result can be useful.

Matrix Diagonalization

Square matrices A and B are similar if there exists an invertible matrix X such that B  = X   1 AX, and similar matrices have the same eigenvalues. The eigenvalues of A are the diagonal elements of B, and we are said to have diagonalized A. As we will see in later chapters, diagonalization is a primary tool for developing many results.

To diagonalize a matrix requires that we find n linearly independent eigenvectors. If the matrix has n distinct eigenvalues, then it has a basis of n eigenvectors. Form X by making its columns the eigenvectors, keeping the eigenvalues in the same order in the diagonal matrix. If a matrix is symmetric, it has n linearly independent eigenvectors, even in the presence of eigenvalues of multiplicity two or more. Furthermore, the matrix X is orthogonal. If a matrix does not have n linearly independent eigenvectors, it cannot be diagonalized.

If a matrix A is diagonalizable, then it is simple to compute powers of A, since

A k = X D k X 1 = X σ 1 k σ 2 k σ n k X 1 .

Applications

The applications of eigenvalues are vast, including such areas as the solution of differential equations, structural mechanics, and the study of vibrations, where they represent the natural frequencies of a system.

In electrical engineering, when a circuit contains resistors, inductors, and batteries, there results a system of first-order differential equations of the form dx/dt  = Ax  + b, and the eigenvalues of A are required for the solution.

A very interesting application of eigenvalues and eigenvectors is in the theory of ranking. The text provides a simple example of ranking teams in a tournament.

Using MATLAB to Compute Eigenvalues and Eigenvectors

The computation of eigenvalues or both eigenvalues and eigenvectors using MATLAB is straightforward. To compute just the eigenvalues, use the format

>>E   =   eig(A);

and to find the eigenvectors and a diagonal matrix of eigenvalues, use

>>   [V,D]   =   eig(A);

If A has distinct eigenvalues, then V   1 AV  = D. If A has n linearly independent eigenvectors, this is also true. If A is symmetric, then things are even nicer, since P T AP  = D, where P is orthogonal.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780123944351000053