# Determinant of an $n\times n$ matrix with 5's on the diagonal and 2's on the superdiagonal and subdiagonal [duplicate]

Possible Duplicate:
Special determinant formula for a specific matrix

How to find $\det A_n$ as a function of $n$?

$$A_n=\begin{pmatrix} 5&2 &0& 0 & \ldots & 0\\ 2& 5& 2& 0 & \ldots & 0\\ 0 &2& 5 &2 & \ldots & 0\\ \vdots & \vdots & \vdots & \vdots & \ddots & \vdots\\ 0 &0& 0& 0 & \ldots & 5\end{pmatrix}$$

I tried to develop Laplace and mathematical induction, but I don't know how to do it.

-

## marked as duplicate by Calvin Lin, Henry T. Horton, Brett Frankel, Brandon Carter, 5PM Jan 25 '13 at 4:20

Try using method of minors for n = 1, n = 2, n = 3, n= 4, you will find something. – mez Jan 24 '13 at 21:55
After you discover the pattern you can use induction then – mez Jan 24 '13 at 21:56
A note : if one expansion by minors fails, do not be discouraged. The solution I know to this requires more than just a single expansion by minors for the inductive step. – dinoboy Jan 24 '13 at 21:57
Exact same as this – Calvin Lin Jan 25 '13 at 3:20

Example: $$\left|\begin{matrix} 5&2&0&0\\ 2&5&2&0\\ 0&2&5&2\\ 0&0&2&5 \end{matrix}\right| =5\left|\begin{matrix} 5&2&0\\ 2&5&2\\ 0&2&5 \end{matrix}\right| -2\left|\begin{matrix} 2&2&0\\ 0&5&2\\ 0&2&5 \end{matrix}\right| =5\left|\begin{matrix} 5&2&0\\ 2&5&2\\ 0&2&5 \end{matrix}\right| -2^2\left|\begin{matrix} 5&2\\ 2&5 \end{matrix}\right|.$$ The first equality is obtained by Laplace expansion along the first row, while the second one is obtained by Laplace expansion along the first column. So you get a recurrence relation.
have $5(An-1) - 4(An-2) A1=5, A2=21, A3=85$ but the recurrence is so hard. – aiki93 Jan 24 '13 at 22:41
@aiki93 Have you looked at the webpage mentioned by ante.ceperic in the previous comment? The recurrence relation is $A_n = 5A_{n-1} - 4A_{n-2}$. Its characteristic equation is $x^2-5x+4=0$. Solve it to get two roots $y$ and $z$. The general solution is then $A_n = by^n + cz^n$, where $b$ and $c$ are some constants. Put $A_1=5,\,A_2=21$, you can determine $b$ and $c$. You do need to take a little work, but the recurrence relation is by no means hard to solve. – user1551 Jan 24 '13 at 23:11