Symbolic Math Toolbox    

Eigenvalue Trajectories

This example applies several numeric, symbolic, and graphic techniques to study the behavior of matrix eigenvalues as a parameter in the matrix is varied. This particular setting involves numerical analysis and perturbation theory, but the techniques illustrated are more widely applicable.

In this example, we consider a 3-by-3 matrix A whose eigenvalues are 1, 2, 3. First, we perturb A by another matrix E and parameter . As t increases from 0 to 10-6, the eigenvalues , , change to , , .

This, in turn, means that for some value of , the perturbed matrix has a double eigenvalue .

Let's find the value of t, called , where this happens.

The starting point is a MATLAB test example, known as gallery(3).

This is an example of a matrix whose eigenvalues are sensitive to the effects of roundoff errors introduced during their computation. The actual computed eigenvalues may vary from one machine to another, but on a typical workstation, the statements

produce

Of course, the example was created so that its eigenvalues are actually 1, 2, and 3. Note that three or four digits have been lost to roundoff. This can be easily verified with the toolbox. The statements

produce

Are the eigenvalues sensitive to the perturbations caused by roundoff error because they are "close together"? Ordinarily, the values 1, 2, and 3 would be regarded as "well separated." But, in this case, the separation should be viewed on the scale of the original matrix. If A were replaced by A/1000, the eigenvalues, which would be .001, .002, .003, would "seem" to be closer together.

But eigenvalue sensitivity is more subtle than just "closeness." With a carefully chosen perturbation of the matrix, it is possible to make two of its eigenvalues coalesce into an actual double root that is extremely sensitive to roundoff and other errors.

One good perturbation direction can be obtained from the outer product of the left and right eigenvectors associated with the most sensitive eigenvalue. The following statement creates

the perturbation matrix

The perturbation can now be expressed in terms of a single, scalar parameter t. The statements

replace A with the symbolic representation of its perturbation:

Computing the characteristic polynomial of this new A

gives

Prettyprinting

shows more clearly that p is a cubic in x whose coefficients vary linearly with t.

It turns out that when t is varied over a very small interval, from 0 to 1.0e-6, the desired double root appears. This can best be seen graphically. The first figure shows plots of p, considered as a function of x, for three different values of t: t = 0, t = 0.5e-6, and t = 1.0e-6. For each value, the eigenvalues are computed numerically and also plotted:

The bottom subplot shows the unperturbed polynomial, with its three roots at 1, 2, and 3. The middle subplot shows the first two roots approaching each other. In the top subplot, these two roots have become complex and only one real root remains.

The next statements compute and display the actual eigenvalues

showing that e(2) and e(3) form a complex conjugate pair:

Next, the symbolic representations of the three eigenvalues are evaluated at many values of t

to produce a plot of their trajectories.

Above t = 0.8e-6, the graphs of two of the eigenvalues intersect, while below t = 0.8e-6, two real roots become a complex conjugate pair. What is the precise value of t that marks this transition? Let denote this value of t.

One way to find the exact value of involves polynomial discriminants. The discriminant of a quadratic polynomial is the familiar quantity under the square root sign in the quadratic formula. When it is negative, the two roots are complex.

There is no discrim function in the toolbox, but there is one in Maple and it can be accessed through the toolbox's maple function. The statement

provides a brief explanation. Use these commands

to show the generic quadratic's discriminant, b2 - 4ac:

The discriminant for the perturbed cubic characteristic polynomial is obtained, using

which produces

The quantity is one of the four roots of this quartic. Let's find a numeric value for .

Of the four solutions, we know that

is the transition point

because it is closest to our previous estimate.

A more generally applicable method for finding is based on the fact that, at a double root, both the function and its derivative must vanish. This results in two polynomial equations to be solved for two unknowns. The statement

solves the pair of algebraic equations p = 0 and dp/dx = 0 and produces

Find now by

which reveals that the second element of sol.t is the desired value of :

Therefore, the second element of sol.x

is the double eigenvalue

Let's verify that this value of does indeed produce a double eigenvalue at . To achieve this, substitute for t in the perturbed matrix and find the eigenvalues of . That is,

confirms that is a double eigenvalue of for t = 7.8379e-07.


  Singular Value Decomposition Solving Equations