Preface
This is a tutorial made solely for the purpose of education and it was designed for students taking Applied Math 0340. It is primarily for students who have some experience using Mathematica. If you have never used Mathematica before and would like to learn more of the basics for this computer algebra system, it is strongly recommended looking at the APMA 0330 tutorial. As a friendly reminder, don'r forget to clear variables in use and/or the kernel.
Finally, the commands in this tutorial are all written in bold black font, while Mathematica output is in regular fonts. This means that you can copy and paste all comamnds into Mathematica, change the parameters and run them. You, as the user, are free to use the scripts to your needs for learning how to use the Mathematica program, and have the right to distribute this tutorial and refer to this tutorial as long as this tutorial is accredited appropriately.
Return to computing page for the second course APMA0340
Return to Mathematica tutorial for the first course APMA0330
Return to Mathematica tutorial for the second course APMA0340
Return to the main page for the course APMA0340
Return to the main page for the course APMA0330
Return to Part I of the course APMA0340
Eigenvalues and Eigenvectors
If A is a square \( n \times n \) matrix and v is an \( n \times 1 \) column vector, then the product \( {\bf A}\,{\bf v} \) is defined and is another \( n \times 1 \) column vector. It is important in many applications to determine whether there exist nonzero column vectors v such that the product vector \( {\bf A}\,{\bf v} \) is a constant multiple (which we denote as λ) of v.
If a homogeneous equation
Eigensystem[B] gives a list {values, vectors} of the eigenvalues and eigenvectors of the square matrix B.
Therefore, we know that the matrix A has one double eigenvalue \( \lambda = 1, \) and one simple eigenvalue \( \lambda = 0 \) (which indicates that matrix A is singular). Next, we find eigenvectors
So Mathematica provides us only one eigenvector \( \xi = \left[ 1,0,0 \right] \) corresponding to the eigenvalue \( \lambda =1 \) (therefore, it is defective) and one eigenvector v = <-1,1,0> corresponding eigenvalue \( \lambda = 0. \) To check this, we introduce the matrix B1:
which means that B1 has one simple eigenvalue \( \lambda = 1 \) and one double eigenvalue \( \lambda =0. \) Then we check that \( \xi \) is the eigenvector of the matrix A:
Then we check that v is the eigenvector corresponding to \( \lambda = 0: \)
To find the generalized eigenvector corresponding to \( \lambda = 1, \) we use the following Mathematica command
This gives us another generalized eigenvector \( \xi_2 = \left[ 0,-1,-1 \right] \) corresponding to the eigenvalue \( \lambda = 1 \) (which you can multiply by any constant). To check it, we calculate:
but the first power of B1 does not annihilate it:
The characteristic polynomial can be found either with Mathematica's command
CharacteristicPolynomial or directly.
CharacteristicPolynomial[A, lambda]
This can be obtained manually as follows:
Two matrices A and B are called similar if there exists a nonsingular matrix S such that \( {\bf A} = {\bf S}\,{\bf B}\,{\bf S}^{-1} .\) Similar matrices always has the same eigenvalues, but their eigenvectors could be different. Let us consider an example of two matrices, one of them is a diagonal one, and another is similar to it:
S = {{2, -1, 3}, {1, 3, -3}, {-5, -4, 1}}
B = Inverse[S].A.S
Therefore, these two similar matrices share the same eigenvalues, but they have distinct eigenvectors.
Return to Mathematica page
Return to the main page (APMA0330)
Return to the Part 1 Matrix Algebra
Return to the Part 2 Linear Systems of Equations
Return to the Part 3 Linear Systems of Ordinary Differential Equations
Return to the Part 4 Non-linear Systems of Ordinary Differential Equations
Return to the Part 5 Numerical Methods
Return to the Part 6 Fourier Series
Return to the Part 7 Partial Differential Equations