Info Linear Algebra I

Section E01, E'00

Exercise 1
Exercise 2 Exercise 3 Exercise 4 Exercise 5

Back to Maple Exercises

Maple Exercise No 5
EIGENVALUES & EIGENVECTORS


A. Relevant Maple Commands

There are tow fundamental tools for solving eigenvalue-eigenvector problems in linalg package - the commands eigenvals and eigenvects. The first one returns a sequence of the eigenvalues; the second one returns a sequence of lists, each list having three members: the eigenvalue, the algebraic multiplicity of that eigenvalue, and a set of the eigenvectors associated with that eigenvector.

There is an interesting feature of both of these commands. Maple uses the RootOf data structure for expressing algebraic numbers. Both commands take an optional parameter, radical, which forces the return to be in terms of radicals and not the RootOf structure. But this parameter cannot accomplish what is unobtainable. A 10 x 10 matrix will l most likely have its eigenvalues expressed by a RootOf structure, and urging Maple to express the eigenvalues in radicals would not necessarily be successful.

For example, to find the eigenvalues and eigenvectors of the matrix

A=[.]

one can do the following:

> with(linalg):
> A := matrix(3,3,[11,-4,-2,2,2,-2,4,-2,5]);
> qe := eigenvals(A);
> q := eigenvects(A);

For this matrix, Maple is able to find the integer eigenvalues without resort to either floating point arithmetic or use of the RootOf data structure. In qe, there is the sequence of three eigenvalues. In q, there is a sequence of 3 lists. The first list contains the eigenvalue 6, the algebraic multiplicity 1, and a set containing the one eigenvector v1 = (0,1,-2). Each of the other two lists in q has a similar structure.

If eigenvectors are obtained in terms of the RootOf notation, they can be recalculated with the use of the optional parameter radical forced the command to return its results in terms of radicals:

> eigenvects(A, radical);

Numerically, eigenvalues and eigenvectors can be evaluated using the standard command evalf(")

To access the eigenvalues and eigenvectors from q, one uses the following "selection" syntax:

> x1 := q[1][1];
> x2 := q[2][1];
> x3 := q[3][1];
> v1 := q[1][3][1];
> v1 := q[2][3][1];
> v1 := q[3][3][1];

The eigenvalues x1, x2, x3 are the first members of each of the three lists in the sequence q. The eigenvectors v1, v2, v3 are each in a set that is the third member of each of the three lists in q. Each eigenvector is the first member in the set that contains them.

The eigenvalues and eigenvectors could be computed "by hand" with Maple. The command charpoly yields the characteristic polynomial equivalent to det(A - xIn):

> charpoly(A, x);

Of course, we can recover the eigenvalues of A by solving the characteristic polynomial for x:

> solve(cp = 0, x);

B. Maple Exercises

1. For each of the matrices

A=..., B=..., C=...
  1. find the characteristic polynomial and its roots;
  2. find the eigenvalues and eigenvectors by use of appropriate Maple commands;
  3. calculate 2lam1 - 3lam2 and 4x1 + 5x2, where lam1 and lam2 are the first and second eigenvalues, x1 and x2 are the first and second eigenvectors.

2. Invent a matrix Q of a big size (larger than 5), insert its entries and calculate its eigenvalues and eigenvectors. Choose Q such a way to obtain eigenvectors in RootOf form; recalculate the result in terms of radicals.

[ Back on the Top ]

[ Back to COURSE MAPLE EXERCISES ]

[ Exercise 1 | Exercise 2 | Exercise 3 | Exercise 4 | Exercise 5 ]

[ Course Information | Home Work Assignments | Mini Projects | Maple Exercises | What's New? ]

[WPI HomePage] Department of Mathematical Sciences Back to Vadim Yakovlev's Professional Page


vadim@wpi.edu
Last modified: Mon, June 5, 2000