This notebook contains an excerpt from the Python Programming and Numerical Methods - A Guide for Engineers and Scientists, the content is also available at Berkeley Python Numerical Methods.

The copyright of the book belongs to Elsevier. We also have this interactive book online for a better learning experience. The code is released under the MIT license. If you find this content useful, please consider supporting the work on Elsevier or Amazon!

# Summary¶

1. Eigenvalues and eigenvectors help us to understand the characteristics of the linear transformation.

2. Eigenvectors of a matrix are the vectors that only be scaled length without rotation after the matrix transformation, the eigenvalues are the factors of the scale.

3. We can use power method to get the largest eigenvalue and corresponding eigenvector of a matrix.

4. The inverse power method can help us to get the smallest eigenvalue and corresponding eigenvector of a matrix.

5. The shifted power method can get all the other eigenvectors/eigenvectors of a matrix.

6. The preferred method to get all the eigenvalues is the QR method.

# Problems¶

1. Write down the characteristic equation for matrix $$A = \begin{bmatrix} 3 & 2\\ 5 & 3\\ \end{bmatrix}$$.

2. Using the above characteristic equation to solve for eigenvalues and eigenvectors for matrix $$A$$.

3. Using the first eigenvector that derived from problem 2 to verify that $$Ax = \lambda{x}$$.

4. Get the largest eigenvalue and eigenvector for matrix $$A = \begin{bmatrix} 2 & 1 & 2\\ 1 & 3 & 2\\ 2 & 4 & 1\\ \end{bmatrix}$$ using the power method. You can start with initial vector [1, 1, 1], see what you will get after 8 iterations.

5. Using the inverse power method to get the smallest eigenvalue and eigenvector for the matrix in problem 4. See how many iterations do you need for it to converge to the smallest eigenvalue.

6. Do a QR decomposition for matrix $$A$$ in problem 4, and verify that $$A=QR$$ and $$Q$$ is an orthogonal matrix.

7. Use the QR method to get all the eigenvalues for matrix $$A$$ in problem 4.

8. Get the eigenvalues and eigenvectors for the matrix $$A$$ in problem 4 using the Python built-in function.