# Finding an eigenvector for a specific eigenvalue of a symbolic matrix

The relevant matrix is $$M=\left( \begin{matrix} p^3+\frac{1}{\sqrt{3}}p^8 & p^1-ip^2 & p^4-ip^5 \\ p^1 +i p^2 & -p^3 + \frac{1}{\sqrt{3}}p^8 & p^6-ip^7\\ p^4+i p^5 & p^6+i p^7 & -\frac{2}{\sqrt{3}}p^8\end{matrix} \right)$$

{{p3 + p8/Sqrt[3], p1 - I p2,
p4 - I p5}, {p1 + I p2, -p3 + p8/Sqrt[3], p6 - I p7}, {p4 + I p5,
p6 + I p7, -((2 p8)/Sqrt[3])}}


using the Eigenvectors[] function returns only zero and an error "unable to find all eigenvectors". I have separately found the eigenvalues $$\mu_i$$ by solving the cubic characteristic polynomial. This was surely half of the difficulty of the problem. To find the corresponding eigenvector should simply be a problem of Gaussian elimination on $$(M-\mu_1I)\vec{v}=0$$

My question is, what is the most streamlined way to now find the eigenvector corresponding to a specific e-val, say $$\mu_1$$? (I haven't included the explicit expression for $$\mu_i$$ as they are lengthy and it seems to me the problem can be equally solved while keeping it abstract.)

• You could just use NullSpace[] on $\mathbf M-\mu_1\mathbf I$... in any event, "unable to find all eigenvectors" is usually a sign that you should be inspecting the result of JordanDecomposition[]. May 24, 2020 at 10:12
• I wasn't aware of this function. Nonetheless NullSpace gives me the empty set in my case. May 24, 2020 at 10:16
• "Well I had kept $\mu_1$ in abstract form initially." - indeed, that wouldn't work, since NullSpace[] is not intended to find a (set of) null vector(s) unless the input matrix is manifestly rank-deficient. May 24, 2020 at 11:27
• I get a (lengthy) output on Eigenvalues[mat] for your matrix in Mathematica 12.1 (and an even longer one for the EigenVectors May 24, 2020 at 12:33
• @J.M... Actually that message is indicative of a bug. There are three (generically) distinct eigenvalues, hence there should be three eigenvectors. Also the fact that NullSpace came up empty more or less explains (to me, at least) where the bug is. Or was-- I have not yet checked in version 12.1 as this machine only has 11.3 May 24, 2020 at 14:57

On Mathematica 12.1 I can get the Eigenvectors and Eigenvalues. I noticed each eigenvalue was 1/3 times some Root expression so I created some replacement rules to express the eigenvectors in terms of the $$\mu_i$$

m = {{p3 + p8/Sqrt[3], p1 - I p2,
p4 - I p5}, {p1 + I p2, -p3 + p8/Sqrt[3], p6 - I p7}, {p4 + I p5,
p6 + I p7, -((2 p8)/Sqrt[3])}};
eval = Eigenvalues[m];
rules = {eval[[1, 2]] :> 3 μ1, eval[[2, 2]] :> 3 μ2,
eval[[3, 2]] :> 3 μ3};
evec = Eigenvectors[m];
FullSimplify[evec /. rules]


$$\left( \begin{array}{ccc} \frac{(\text{p1}-i \text{p2}) \left(3 \text{\mu 1}+2 \sqrt{3} \text{p8}\right)+3 (\text{p4}-i \text{p5}) (\text{p6}+i \text{p7})}{3 (\text{p1}-i \text{p2}) (\text{p4}+i \text{p5})-(\text{p6}+i \text{p7}) \left(-3 \text{\mu 1}+3 \text{p3}+\sqrt{3} \text{p8}\right)} & \frac{3 \text{\mu 1}^2-3 \text{\mu 1} \text{p3}-2 \sqrt{3} \text{p3} \text{p8}-3 \text{p4}^2-3 \text{p5}^2-2 \text{p8}^2+\sqrt{3} \text{\mu 1} \text{p8}}{3 (\text{p1}-i \text{p2}) (\text{p4}+i \text{p5})-(\text{p6}+i \text{p7}) \left(-3 \text{\mu 1}+3 \text{p3}+\sqrt{3} \text{p8}\right)} & 1 \\ \frac{(\text{p1}-i \text{p2}) \left(3 \text{\mu 2}+2 \sqrt{3} \text{p8}\right)+3 (\text{p4}-i \text{p5}) (\text{p6}+i \text{p7})}{3 (\text{p1}-i \text{p2}) (\text{p4}+i \text{p5})-(\text{p6}+i \text{p7}) \left(-3 \text{\mu 2}+3 \text{p3}+\sqrt{3} \text{p8}\right)} & \frac{3 \text{\mu 2}^2-3 \text{\mu 2} \text{p3}-2 \sqrt{3} \text{p3} \text{p8}-3 \text{p4}^2-3 \text{p5}^2-2 \text{p8}^2+\sqrt{3} \text{\mu 2} \text{p8}}{3 (\text{p1}-i \text{p2}) (\text{p4}+i \text{p5})-(\text{p6}+i \text{p7}) \left(-3 \text{\mu 2}+3 \text{p3}+\sqrt{3} \text{p8}\right)} & 1 \\ \frac{(\text{p1}-i \text{p2}) \left(3 \text{\mu 3}+2 \sqrt{3} \text{p8}\right)+3 (\text{p4}-i \text{p5}) (\text{p6}+i \text{p7})}{3 (\text{p1}-i \text{p2}) (\text{p4}+i \text{p5})-(\text{p6}+i \text{p7}) \left(-3 \text{\mu 3}+3 \text{p3}+\sqrt{3} \text{p8}\right)} & \frac{3 \text{\mu 3}^2-3 \text{\mu 3} \text{p3}-2 \sqrt{3} \text{p3} \text{p8}-3 \text{p4}^2-3 \text{p5}^2-2 \text{p8}^2+\sqrt{3} \text{\mu 3} \text{p8}}{3 (\text{p1}-i \text{p2}) (\text{p4}+i \text{p5})-(\text{p6}+i \text{p7}) \left(-3 \text{\mu 3}+3 \text{p3}+\sqrt{3} \text{p8}\right)} & 1 \\ \end{array} \right)$$ Copy-able result below:

{{(3 (p4 - I p5) (p6 + I p7) + (p1 - I p2) (2 Sqrt[3] p8 +
3 μ1))/(
3 (p1 - I p2) (p4 + I p5) - (p6 + I p7) (3 p3 + Sqrt[3] p8 -
3 μ1)), (-3 p4^2 - 3 p5^2 - 2 Sqrt[3] p3 p8 - 2 p8^2 -
3 p3 μ1 + Sqrt[3] p8 μ1 + 3 μ1^2)/(
3 (p1 - I p2) (p4 + I p5) - (p6 + I p7) (3 p3 + Sqrt[3] p8 -
3 μ1)), 1}, {(
3 (p4 - I p5) (p6 + I p7) + (p1 - I p2) (2 Sqrt[3] p8 + 3 μ2))/(
3 (p1 - I p2) (p4 + I p5) - (p6 + I p7) (3 p3 + Sqrt[3] p8 -
3 μ2)), (-3 p4^2 - 3 p5^2 - 2 Sqrt[3] p3 p8 - 2 p8^2 -
3 p3 μ2 + Sqrt[3] p8 μ2 + 3 μ2^2)/(
3 (p1 - I p2) (p4 + I p5) - (p6 + I p7) (3 p3 + Sqrt[3] p8 -
3 μ2)), 1}, {(
3 (p4 - I p5) (p6 + I p7) + (p1 - I p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p2 p4 p7 - 54 p1 p5 p7 + 27 p3 p7^2 -
18 Sqrt[3] p1^2 p8 - 18 Sqrt[3] p2^2 p8 - 18 Sqrt[3] p3^2 p8 +
9 Sqrt[3] p4^2 p8 + 9 Sqrt[3] p5^2 p8 + 9 Sqrt[3] p6^2 p8 +
9 Sqrt[3] p7^2 p8 +
6 Sqrt[3]
p8^3 + (-9 p1^2 - 9 p2^2 - 9 p3^2 - 9 p4^2 - 9 p5^2 - 9 p6^2 -
9 p7^2 - 9 p8^2) #1 + #1^3 &, 3]}

• Thanks! Could you post the eigenvalues too please so I know which e-vector corresponds to which $\mu$? May 24, 2020 at 16:17