3
$\begingroup$

When I want to calculate eigenvectors of the following matrix in Mathematica the only answer it gives me is zero vector, anybody knows how to fix this? here's my matrix : \begin{equation} X=\left(\begin{array}{cccc} 0 & 1 & 0 & 0&0&0\\ 1 & 0 & \sqrt{2} & 0&0&0\\ 0 & \sqrt{2} & 0 & \sqrt{3}&0&0\\ 0 & 0 & \sqrt{3} & 0& \sqrt{4} &0\\0&0&0&\sqrt{4} &0&\sqrt{5} \\ 0&0&0&0&\sqrt{5} &0 \end{array}\right) \end{equation} heres the code:

X = {{0, 1, 0, 0, 0, 0},
   {1, 0, Sqrt[2], 0, 0, 0},
   {0, Sqrt[2], 0, Sqrt[3], 0, 0},
   {0, 0, Sqrt[3], 0, Sqrt[4], 0},
   {0, 0, 0, Sqrt[4], 0, Sqrt[5]},
   {0, 0, 0, 0, Sqrt[5], 0}
   };
Eigenvectors[X]

The point is I don't want to find them numerically I want analytical expression for eigenvectors.

$\endgroup$
  • $\begingroup$ This is a Golub-Kahan tridiagonal matrix, and the problem of finding its eigenvalues and eigenvectors is equivalent to performing the SVD on a bidiagonal matrix of half the size. $\endgroup$ – J. M. will be back soon Aug 12 at 9:23
  • $\begingroup$ You can use ToRadicals to make Mathematica expand the Root objects into normal-looking numbers. $\endgroup$ – Sjoerd Smit Aug 12 at 10:26
7
$\begingroup$

the only answer it gives me is zero vector

It works for me. Please post exact code you used and show the output. Not just Latex. And give which version you used. You might have made a mistake in the input.

On V12:

mat = {{0, 1, 0, 0, 0, 0},
   {1, 0, Sqrt[2], 0, 0, 0},
   {0, Sqrt[2], 0, Sqrt[3], 0, 0},
   {0, 0, Sqrt[3], 0, Sqrt[4], 0},
   {0, 0, 0, Sqrt[4], 0, Sqrt[5]},
   {0, 0, 0, 0, Sqrt[5], 0}
   };

Mathematica graphics

Eigenvectors[mat];
MatrixForm[% // N]

Mathematica graphics

Update

OP wants solution to be analytical solution and not numerical.

Mathematica gives answer using Roots objects.

Using

SetSystemOptions[
  "TypesetOptions" -> "NumericalApproximationForms" -> False];
Eigenvectors[mat]

Gives

Mathematica graphics

TO obtain numerical values, the command N can be applied to the above.

$\endgroup$
  • $\begingroup$ The point is I dont want to find the mnumerically i want their analytical expression. $\endgroup$ – Jason Jul 30 at 10:57
  • 1
    $\begingroup$ The point is I dont want to find the mnumerically i want their analytical expression First, this was not what your question was about. You said you got zero as answer. So I do not know how this "numerical vs. analytical" now became the "point" of the question. But if you do not want numerical, you can remove //N. Answer will be in terms of Root objects though. I do not think there is a way to obtain analytical solution to roots of polynomials of order 6. So mathematica gives answer using Root objects. I'll add the code now.. $\endgroup$ – Nasser Jul 30 at 11:04
  • $\begingroup$ @ Nasser yes you are right I wasn't considering the fact that it could be solved numerically, my mistake, anyway thanks a lot that worked $\endgroup$ – Jason Jul 30 at 12:48
3
$\begingroup$

Since you didn't post any code, it's hard to know what you did wrong. Please always post your code!

When in doubt if mathematica is correct about what it's doing, do it by hand..this of course really only works when the question in hand is small like yours.

matA = {{0, 1, 0, 0, 0, 0}, {1, 0, Sqrt[2], 0, 0, 0}, {0, Sqrt[2], 0, Sqrt[3], 0, 0}, {0, 0, Sqrt[3], 0, Sqrt[4], 0}, {0, 0, 0, Sqrt[4],0, Sqrt[5]}, {0, 0, 0, 0, Sqrt[5], 0}};

poly = Det[matA - IdentityMatrix[6] \[Lambda]]

$$\lambda ^6-15 \lambda ^4+45 \lambda ^2-15$$

sol = Solve[poly == 0 , \[Lambda]];

eigen = matA - IdentityMatrix[6] \[Lambda] /. sol[[1]]

Using RowReduce we can find one of our vectors.

sol2 = RowReduce[eigen]
sol2[[All, 6]] // MatrixForm

pic

The Last column being our first vector. The last element is a zero...this should be a one...an artifact of RowReduce I'm not sure why it does that. Regardless, a lot of work when one probably just used Eigenvectors[] the function incorrectly.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.