# Determinant evaluation for matrix with $-1, 2, -1$ below/on/above diagonal [duplicate]

What is the trick for evaluating the determinant of this matrix?

$$\begin{bmatrix} 2 & -1 \\ -1 & 2 & -1 \\ & -1 & 2 & -1 \\ && -1 & 2 & -1 \\ &&& -1 & 2 & -1 \\ &&&& -1 & 2 \end{bmatrix}$$

$$%Commenting out original picture ![enter image description here][1]$$

## marked as duplicate by Daniel FischerFeb 15 '15 at 9:17

• This is not just any tridiagonal matrix, it's a very special one. I think we can find a basis of eigenvectors analytically. The $j$th component of eigenvector $m$ is something like $\sin(m \pi j/N)$. Knowing the eigenvalues, we get the determinant. – littleO Feb 15 '15 at 2:44
let $f_n$ be the the determinant of the $n \times n$ tridiagonal matrix with diagonal elements all equal to $2$ and the sub and super diagonal has $-1$ on them. then by expanding the determinant by the first row, you get the recursive relation $$f_n = 2f_{n-1} - f_{n-2},\quad f_1 = 2,\ f_2 = 3.$$ you can verify that $$f_n = n+1$$ is in fact the solution.