# Quick way of finding the eigenvalues and eigenvectors of the matrix $A=\operatorname{tridiag}_n(-1,\alpha,-1)$

Matrix $A=\operatorname{tridiag}_n(-1,\alpha,-1)$ has the eigenvalue:

$\lambda_i=\alpha-2\cos(i\theta),$ $i=1,\dots,n$

and the corresponding eigenvectors are:

$v_i=\left(\sin(i\theta)，\sin(2i\theta),\dots,\sin(ni\theta)\right)^T$

I found a very complicated method that can be briefly described as follows.

1. Assume $f_n$ is the determinant of the $n\times n$ matrix $A$.
2. Prove $f_n=|A-\lambda I|=(\alpha -\lambda)f_{n-1}-f_{n-2}$ with $f_0=1, f_1 = \alpha-\lambda$.
3. Find the solution of this difference equation and then use Vieta's formula and Euler formula to obtain the final solutions of eigenvalues.

With all these brute force computations, we still have to continue another huge computation for eigenvectors.

So, I am wondering if there is a neat and and clean way to solve this problem rather than messy computation as above. Thanks for any suggestion.

I assume $\theta = \frac{\pi }{{n + 1}}$, otherwise the expression you gave for the eigenvalues would be wrong.
To the best of my knowledge, the process you described is the "standard" way to compute the eigenvalues of $A$.
Now, as $A$ has $n$ distinct eigenvalues, we know it has $n$ linearly independent eigenvectors. Remember that the components of $v$, $v_k$, in $(A-\lambda I)v=0$, for a pair $(\lambda,v)$ satisfy the following second order linear difference equation: $$\tag{1} - {v_{k - 1}} + \left( {2 - \lambda } \right){v_k} - {v_{k + 1}} = 0,k = 1, \ldots ,n$$ with $v_0=v_{n+1}=0$.
The general solution of $(1)$, that you should have found while determining the eigenvalues is: $$\tag{2} {v_k} = {c_1}({e^{i\pi j/\left( {n + 1} \right)}})^k + {c_2}({e^{ - i\pi j/\left( {n + 1} \right)}})^k$$ and the fact that $v_0=v_{n+1}=0$ leads us to conclude that $c_2=-c_1$. Thus, $${v_k} = {c_1}\left( {{e^{i\pi jk/\left( {n + 1} \right)}} - {e^{ - i\pi jk/\left( {n + 1} \right)}}} \right) = 2i{c_1}\frac{{{e^{i\pi jk/\left( {n + 1} \right)}} - {e^{ - i\pi jk/\left( {n + 1} \right)}}}}{{2i}} = 2i{c_1}\sin \left( {\frac{{jk\pi }}{{n + 1}}} \right).$$ Now, if we take $c_1=\frac{1}{2i}$, we get the following eigenvector, $v^j$, associated with the eigenvalue $\lambda_j$: $${v^j} = \left[ {\begin{array}{*{20}{c}}{\sin \left( {\frac{{1j\pi }}{{n + 1}}} \right)}\\{\sin \left( {\frac{{2j\pi }}{{n + 1}}} \right)}\\ \vdots \\{\sin \left( {\frac{{nj\pi }}{{n + 1}}} \right)}\end{array}} \right].$$
So, as you see, it was rather easy to find the eigenvectors of $A$. The bulk of the work is computing the eigenvalues.