# recurrence or closed formula for determinant

Consider the following matrix

$$$$A_{n} := \begin{bmatrix} a_{1} & -p & \dots & 0 &\dots &0 \\ -q & a_{2} & -p &0 & \dots & 0 \\ 0 & -q & a_{3} &-p & ~... & 0 \\ 0 & 0 &-q &a_{4} &-p & 0 \\ 0 &\vdots & \ddots & -q & a_{n-1} & -p \\ 0 &0 &0 &\dots &-q &a_{n} \end{bmatrix}$$$$

where $$a_{j},p,q \in \mathbb{R}$$, $$a_{j} \neq 0$$ for all $$j = 1,2,...,n$$ and $$n \in \mathbb{N}$$. We have

$$\det A_{n} = \frac{1}{x_{n}} \det A_{n-1} - pq \det A_{n-2}.$$

Now consider the vector $$b := (q,0,..,0,p)^{t} \in \mathbb{R}^{r-1}$$ and define $$[A_{n}]_{i}$$ to be the matrix obtained from $$A_{n}$$ except that I replace the i-th column of $$A_{n}$$ with $$b$$ for $$i=1,...,n$$. Define for simplicity

$$$$D_{k,n} := \begin{bmatrix} a_{k} & -p & \dots & 0 &\dots &0 \\ -q & a_{k+1} & -p &0 & \dots & 0 \\ 0 & -q & a_{k+2} &-p & ~... & 0 \\ 0 & 0 &-q &a_{k+3} &-p & 0 \\ 0 &\vdots & \ddots & -q & a_{n-1} & -p \\ 0 &0 &0 &\dots &-q &a_{n} \end{bmatrix}$$$$ where $$k,n \in \mathbb{N}$$, $$k \leq n$$.

Now for example for $$i = 1$$ I would get after expanding by the first column

\begin{align} \det([A_{n}]_{1}) &= \begin{vmatrix} q & -p \\ 0 & a_2 & -p \\ 0 &-q & a_3 & -p \\ & & \ddots & \ddots & -p \\ & & & -q & a_{n-2} & -p \\ & & & & -q & a_{n-1} & -p \\ p& & & & & -q & a_n \end{vmatrix} &= q \cdot \det(D_{2,n}) + p^{n} \end{align}

For $$i = 2$$ I have also compute the determinant after expanding by the second column. I get

\begin{align} \det([A_{n}]_{2}) &= \begin{vmatrix} a_1 & q \\ -q & 0 & -p \\ 0 & 0 & a_3 & -p \\ & & \ddots & \ddots & -p \\ & & & -q & a_{n-2} & -p \\ & & & & -q & a_{n-1} & -p \\ & p& & & & -q & a_n \end{vmatrix} &= q^{2} \cdot \det(D_{3,n}) + a_1p^{n-1} \end{align}

Up to this point I thought I have the following formula

$$\det([A_{n}]_{i}) = q^{i} \cdot \det(D_{i+1,n}) + a_1 ... a_{i-1}p^{n-i+1}$$

But then I compute $$\det([A_{n}]_{3})$$ and after expanding by the third column I get

$$\det([A_{n}]_{3}) = q^{3} \cdot \det(D_{4,n}) + a_1 a_2 p^{n-2} - p^{n-1}q$$

So my first thought is not correct. My question is, wether there is a closed formula for $$\det([A_{n}]_{i})$$. Or maybe a recurrence equation? I Hope someone can help me. Thanks!

• This answer to the almost identical question that you asked earlier gives you a recurrence for the determinant and a link to more general results for a tridiagonal matrix.
– amd
Oct 12, 2018 at 20:46
• I don't understand what you mean. Where can I find the link? Oct 13, 2018 at 9:11
• The word “recurrence” in the first sentence is a link.
– amd
Oct 13, 2018 at 20:44
• there is no link Oct 14, 2018 at 11:36
• Sure, there is. It links to en.m.wikipedia.org/wiki/Tridiagonal_matrix#Determinant.
– amd
Oct 16, 2018 at 0:44