Evaluate determinant of an $n \times n$ matrix, help

I need help with this problem:

$D_{n}= \begin{vmatrix} 1 & 1 & 0 & \cdots & 0 & 0 & 0 \\ 1 & 1 & 1 & \cdots & 0 & 0 & 0 \\ 0 & 1 & 1 & \cdots & 0 & 0 & 0 \\ \vdots & \vdots & \vdots & \ddots & \vdots & \vdots & \vdots \\ 0 & 0 & 0 & \cdots & 1& 1 & 1 \\ 0 & 0 & 0 & \cdots & 0& 1 & 1 \end{vmatrix}$

I can't get it to squared form. It is obvious that fourth row is needed. How to find fourth row, or is there other methods?

Thanks for replies.

• Do you not see the pattern? You have $1$'s on the main diagonal and the diagonals immediately above and below that, everything else $0$. The fourth row is $[0,0,1,1,1,0,\ldots,0]$. – Robert Israel May 21 '15 at 21:49
• I am not sure that you understand the meaning of the dots. – Yves Daoust May 21 '15 at 21:57
• Hint: cofactor expand along the top row. After this, and another cofactor expansion of one of the smaller resulting matrices, you should get an expression for $D_n$ in terms of $D_{n-1}$ and $D_{n-2}$. You will then need to solve this recurrence relation – Mike Earnest May 21 '15 at 21:58

It is a special case of a tridiagonal matrix. If you denote this determinant $D_n$, developing it along the last row, you can prove the recurrence relation: $$D_n=D_{n-1}-D_{n-2}$$ The initialisation is $D_1=1$, $D_2=0$. You can easily establish that
$$\begin{cases} D_n=1&\text{if}\enspace n\equiv 0,1 \pmod6\\ D_n=0&\text{if}\enspace n\equiv 2,5 \\ D_n=-1&\text{if}\enspace n\equiv 3,4 \end{cases}$$
$$\begin{vmatrix} 1&1&0&0\\ 1&1&1&0\\ 0&1&1&1\\ 0&0&1&1\\ \end{vmatrix}$$ would be an example for your problem, using gaussian elimination it is easy to get it to the unit matrix, which has 1 as determinant.
• This is the case $n=4$. The case $n=5$ would be $$\pmatrix{1 & 1 & 0 & 0 & 0\cr 1 & 1 & 1 & 0 & 0\cr 0 & 1 & 1 & 1 & 0\cr 0 & 0 & 1 & 1 & 1\cr 0 & 0 & 0 & 1 & 1\cr}$$ – Robert Israel May 21 '15 at 21:58