Eigenvalues and eigenvectors play a vital role in understanding the
behavior of differential equations in the neighborhood of an equilibrium.
In this lab you will explore
the geometrical relationship between eigenvalues, eigenvectors,
and the determinant.
To get started, launch Matlab and type in the following command:
Matlab will prompt you to type in a matrix. At the prompt type:
[3 3; 1 2]
This command will store the matrix in the Matlab procedure eigshow. Note how to enter matrices in Matlab: type the first row (separating entries either by a space or by a comma), then a semi-colon, then the next row, etc.
A window should appear with a white unit circle in the center. By holding down any mouse button and moving the mouse, you can move the yellow radius around the circle. As you do this a blue vector will appear that traces out an ellipse. Think of the yellow line as a unit vector, v. Matlab is plotting the image of that vector, Av, in blue.
Recall that an eigenvector of a matrix A is any non-zero vector u such that where is a scalar called the eigenvalue. Geometrically, this says u is an eigenvector of a matrix if its image under A is a scalar multiple of itself. Note on your screen that Matlab shows in the lower left hand corner the unit vector v in yellow, and in the lower right hand corner the image of the vector, Av, in blue.
The area of an ellipse is where a is the length of its semi-major axis, and b is the length of its semi-minor axis. For our ellipse, the semi-major axis will be the longest image vector, and the semi-minor axis will be the shortest image vector. In the upper right hand corner of the Figure window, Matlab displays the norm of the vector Av. When this number is largest, you have approximately found a semi-major axis; when it is smallest, you have found a semi-minor axis.
This page is brief summary of some Matlab commands for matrices and vectors. Although none of these commands are required to do this lab, you are expected to know them for future labs.
|v = [3; 2]||assigns|
|A = [1 6; 5 -2]||assigns|
|Solve for the vector x such that Ax = v.|
|l = eig(A)||Computes the eigenvalues of matrix A|
|and stores the result in vector l.|
|[V, D] = eig(A)||Computes the eigenvalues and eigenvectors for a|
|matrix A, puts the eigenvectors into the columns|
|of matrix V and puts the corresponding eigenvalues|
|into the diagonal entries of matrix D.|
|det(A)||Computes the determinant of A.|
|trace(A)||Computes the trace of A.|
|null(A)||Computes the null space of A.|
|rank(A)||Computes the number of linearly independent|
|rows of A.|