November 3, 2015

This notebook demonstrates finding the characteristic polynomial, eigenvalues, and corresponding eigenspaces of a square matrix.

First, we define the matrix.

A={{7,2},{-4,1}}

Now we can calculate the characteristic polynomial. 
If your curious, you can get the λ from the Typesetting pane in the Writing Assitant Palette.

CharacteristicPolynomial[A,λ]

Let’s solve the characteristic equation to find the eigenvalues. 

Notice the == in the command below. 
Mathematica uses = to define the variable on the left side to be equal to the expression on the right side, like we did in defining the matrix A above, so that whenever Mathematica sees the variable, it will replace it with the expression on the right side.
The == indicates that we are asserting both sides of the equation are equal, not that we are defining the left side to be equal to the right side.

Solve[CharacteristicPolynomial[A,λ] == 0]

Now we find the basis for nul(A - 3*I) to find an eigenvalue corresponding to λ=3

B1 = A - 3*IdentityMatrix[2]

NullSpace[B1]

And now we find the null space of A - 5*I to find an eigenvalue corresponding to λ=5

B2 = A- 5*IdentityMatrix[2]

NullSpace[B2]