Overview:
- Given a matrix the function eigvals() returns the eigen values of the matrix.
- When a matrix is multiplied by a vector if the result is scalar times of that vector, the vector is known as eigenvector. The scalar value is known as eigenvalue.
- The eigenvectors and eigenvalues exist only for square matrices.
Example:
# Example Python program that finds the eigenvalues of a matrix # Control the printing format of floating point numbers # Create a matrix # Find the eigen values of the matrix |
Output:
The matrix: [[-25 -20 -15] [-10 -5 0] [ 5 10 15]] Eigen values of the matrix: [-30.00 0.00 15.00] |