Hello I would like to know if someone has an idea of how to compute the eigenvalues (in a closed form) of the following matrix in order to implement it for fast calculations.
The matrix is the following :
- the diagonal is {1, 2, 2, …, 2, 2, 1} (twos everywhere except first and last row)
- The super diagonal and sub diagonal are {-1, -1, …, -1}
I would like to know the eigenvalues whatever the dimension of the matrix.
I don’t even know if there exist a closed form for the eigenvalues of this problem but somehow i imagine that there are some geniuses out there that could find it.
Thanks to all in advance for any idea you could give !
NB the matrix for $n=4$ looks like: (where $n$ denotes the dimension of the matrix)
$$\left(\begin{array}{rrrr}1&-1&0&0\\ -1&2&-1&0\\ 0&-1&2&-1\\ 0&0&-1&1\end{array}\right)$$
Let us refer to this paper by Wen-Chyuan Yueh. The general form of the studied matrices is \begin{equation} A = \begin{pmatrix} -\alpha +b & c & 0 & 0 & \dots & 0 & 0 \\ a & b & c & 0 & \dots & 0 & 0 \\ 0 & a & b & c & \dots & 0 & 0 \\ \vdots & \vdots & \vdots & \vdots &\ddots & \vdots & \vdots\\ 0 & 0 & 0 & 0 & \dots & a & -\beta + b \end{pmatrix},\tag 1 \end{equation} where $\;a,b,c,\alpha,\beta\in \mathbb{C}, ac\neq 0.$
In your matrices $a=c=-1, b=2, \alpha=\beta=1.$
Theorem $4$ in the referenced paper gives explicit form of eigenvalues when $\alpha=\beta=\sqrt{ac}\neq 0,$ $$\lambda_k=b+2\sqrt{ac}\cos\frac{k\pi}{n},\quad n=1,2,3,\dots, n.$$
This is exactly what your matrices satisfy.