Find the determinant of the following matrix, and for which value of $x$ is it invertible; $$\begin{pmatrix} x & 1 & 0 & 0 & 0 & \ldots & 0 & 0 \\ 0 & x & 1 & 0 & 0 & \ldots & 0 & 0 \\ 0 & 0 & x & 1 & 0 & \ldots & 0 & 0 \\ \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots \\ \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots \\ \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots & \ldots \\ 0 & 0 & 0 & 0 & 0 & \ldots & x & 1 \\ 1 & 0 & 0 & 0 & 0 & \ldots & 0 & x \end{pmatrix}$$
![]()
Now I don't really know how to procees as I get find a suitable row operations that will simplify the process so I thought I would look at cases, maybe see a pattern.
$\mathbf{2 \times 2}$
$\begin{bmatrix}x & 1\\1 & x\end{bmatrix}$
This has determinant; $x^2-1$
$\mathbf{3 \times 3}$
$\begin{bmatrix}x & 1 & 0\\0 & x & 1\\1 & 0 & x\end{bmatrix}$
This has determinant $x^3+1$
So is that the pattern?
determinant is $x^n-1$ if $n$ is even,
determinant is $x^n+1$ if $n$ is odd??