TITLE: Determinant evaluation for matrix with $-1, 2, -1$ below/on/above diagonal
QUESTION [5 upvotes]: 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]$$

REPLY [6 votes]: 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.