Is it possible to analytically evaluate the eigenvectors and eigenvalues of the following $n \times n$ tridiagonal matrix


$$
 \mathcal{T}^{a}\_n(p,q) = \begin{pmatrix}
 0 & q & 0 & 0 &\cdots & 0 & 0 & 0 \\\
 p & 0 & q & 0 &\cdots & 0 & 0 & 0 \\\
 0 & p & 0 & q &\cdots & 0 & 0 & 0 \\\
 \vdots & \vdots & \vdots & \vdots & \ddots & \vdots & \vdots& \vdots \\\
 0 & 0 & 0 & 0 &\cdots & p & 0 & q \\\
 0 & 0 & 0 & 0 & \cdots & 0 & p & 0
 \end{pmatrix} 
$$


where $p>0$ and $q > 0$?


Furthermore, is it possible to do the same for the following tridiagonal circulant matrix?


$$
 \mathcal{T}^{b}\_n(p,q) = \begin{pmatrix}
 0 & q & 0 & 0 &\cdots & 0 & 0 & p \\\
 p & 0 & q & 0 &\cdots & 0 & 0 & 0 \\\
 0 & p & 0 & q &\cdots & 0 & 0 & 0 \\\
 \vdots & \vdots & \vdots & \vdots & \ddots & \vdots & \vdots& \vdots \\\
 0 & 0 & 0 & 0 &\cdots & p & 0 & q \\\
 q & 0 & 0 & 0 & \cdots & 0 & p & 0
 \end{pmatrix} 
$$



Eigenvectors and eigenvalues of a tridiagonal Toeplitz matrix
Here is the calculation of the spectrum of the first matrix, which I write $pJ+qK$ with $K=J^T$. Define $D={\rm diag}(1,a,a^2,\ldots,a^{n-1})$. Then $D^{-1}JD=a^{-1}J$ and $D^{-1}KD=aK$. Thus, taking $a=\sqrt{p/q}$, one sees that you matrix is similar to $\sqrt{pq}(J+K)$. Its eigenvalues are $\sqrt{pq}$ times those of $J+K$. The spectrum of the latter matrix is made of numbers $2\cos\frac{k\pi}{n+1}$ for $k=1,\ldots,n$.


The second case is easy too. Eigenvectors are $n$-periodic solutions of the recursion $qu\_{j+1}+pu\_{j-1}=\lambda u\_j$. This means that some power of $\omega=\exp\frac{2i\pi}n$ is a root of the characteristic equation $qr^2+p=\lambda r$. Whence the spectrum $\lambda\_1,\ldots,\lambda\_n$
$$\lambda\_j=p\omega^{-j}+q\omega^j.$$


