The following method provides a structured approach to computing the eigenvalues of a matrix by solving its characteristic polynomial, a cubic equation of the form $c(t)=t^3 + e t^2 + f t + g$. The key steps include:
-
Transforming the polynomial into a depressed cubic using substitutions:
$$
cˉ(s)= s^3 + p s + q
$$
$$
t = s - \frac{e}{3}, \quad p = f - \frac{e^2}{3}, \quad q = g - \frac{e f}{3} + \frac{2 e^3}{27}
$$
-
Defining $h$ to determine the root nature:
- If $h > 0$ , one real root and two complex conjugate roots.
- If $h < 0$, three distinct real roots.
- If $h = 0$, special cases arise based on $p$ and $q$ .
-
Computing roots in terms of trigonometric functions when three real solutions exist:
$$
\theta = \operatorname{acos} \left( -q / \left( 2 \sqrt{-p^3 / 27} \right) \right) / 3
$$
$$
s_0, s_1, s_2 \text{ are then computed using } \cos \theta \text{ and } \sin \theta.
$$
-
Final conversion back to the original variable $t$ by adding $e/3$.
This method is particularly useful for finding eigenvalues of a 3×3 matrix, where the characteristic equation is a cubic polynomial.
🧠Implement a Python function to compute eigenvalues using this approach
https://gist.github.com/viadean/68d1de6c2daa57b616d72ef11ef3750b
The corrected implementation successfully computes the real eigenvalue of the cubic equation. In this case, the computed eigenvalue is approximately -3.47.
Computing eigenvectors based on the characteristic polynomial's roots and their multiplicities.
- Triple Root Case $(t - t_0)^3$:
- If all three eigenvalues are identical, the matrix $A - t_0$ is the zero matrix (rank 0).
- The eigenspace is 3-dimensional, with the standard basis vectors ${(1,0,0),(0,1,0),(0,0,1)}$.
- Distinct Eigenvalues Case $(t - t_0)(t - t_1)(t - t_2)$:
- Each $A−t_iI$ has rank 2, meaning the eigenspace is 1-dimensional for each eigenvalue.
- To find an eigenvector for $t_i$:
- Identify two linearly independent rows of $A−t_iI$.
- Compute the cross product of these rows to obtain the eigenvector.
- Eigenvectors of distinct eigenvalues are orthogonal, so for three eigenvalues:
- Compute eigenvectors for $t_0$ and $t_1$.
- The eigenvector for $t_2$ is the cross product of the eigenvectors of $t_0$ and $t_1$.
- Double Root Case $(t - t_0)^2 (t - t_1)$:
- The eigenvalue $t_0$ has multiplicity 2, forming a 2-dimensional eigenspace.
- The matrix $A−t_0I$ has rank 1, meaning one nonzero row exists (denoted $U$).
- Compute two orthogonal vectors $V_0,V_1$ perpendicular to $U$. These form the eigenvector basis for $t_0$.
- If $A$ is symmetric, the vector $U$ itself is an eigenvector for $t_1$.
🧠Implement a Python function to compute eigenvectors using this approach
https://gist.github.com/viadean/5083aa2a12a57346d9c0b8087ebef28c
The computed eigenvectors for the given matrix $A$ are:
- Eigenvalue $λ_1≈2.00$: Eigenvector $[0.707,0,−0.707]$
- Eigenvalue $λ_2≈0.63$: Eigenvector $[0.454,−0.766,0.454]$
There is no third eigenvector explicitly listed because the function identified only two distinct eigenvalues in the numerical computation.