title | description |
---|---|
Eigenvalue Eigenvector Problems |
undefined |
type: TabExercise
xp:
key: edebfb1a2c
type: NormalExercise
xp:
key: 5cac61dd4f
@instructions
-
The definition of an eigenvalue is
$\mathbf{A}\mathbf{x} = \lambda \mathbf{x}$ -
Rearrange to give
$(\mathbf{A}-\lambda\mathbf{I})\mathbf{x}=\mathbf{0}$ -
For any non-trivial solution
$(\mathbf{A}-\lambda\mathbf{I})$ must be non-invertible (this indicates that the determinent is 0). -
Thus,
$\det{(\mathbf{A}-\lambda\mathbf{I})}=0$ . The determinent generates the Characteristic Polynomial of the matrix.
Once you have solved this problem then you can compute the eigenvectors.
As the Characteristic Polynomial is a
Lets find eigenvectors and eigenvalues for the matrix:
To find the eigenvalues we need to solve the problem: $$ \left| \begin{array}{cc} 1-\lambda & 2 \ 3 & 2-\lambda \end{array} \right|=0 $$
or
@hint
@pre_exercise_code
import numpy as np
@sample_code
A = np.array([[1,2],[3,2]])
print( np.linalg.eigvals(A) )
@solution
A = np.array([[1,2],[3,2]])
print( np.linalg.eigvals(A) )
@sct
Ex().check_object('A').has_equal_value()
success_msg('Great job!')