# Recursive computation of determinant of Toeplitz tridiagonal matrix

Let a matrix be a tridiagonal matrix of size $$n \times n$$, with elements equal to $$2$$ on the main diagonal, elements equal to $$1$$ directly above the main diagonal, elements equal to $$3$$ directly below the main diagonal, and with zeros in all other elements: $$\begin{bmatrix} 2 & 1 & & & & \\ 3 & 2 & 1 & & & \\ & 3 & 2 & 1 & & \\ & & 3 & 2 & \ddots & \\ & & & \ddots & \ddots & 1\\ & & & & 3 & 2 \end{bmatrix}$$ Express the determinant $$A (n)$$ using the determinants $$A (n-2)$$ and $$A (n-1)$$.

Could you explain me how this task is supposed to be done?

• Hint. Use Laplace expansion with respect to the first row. There are two terms: one is immediately seen to be $2 \cdot \det(A(n-1))$, the other will involve $\det(A(n-2))$ with a coefficient. Commented Feb 18, 2022 at 15:45
• thank you very much Commented Feb 18, 2022 at 15:58
• @AndreasCaranti I was going to post this as an answer to que question. You did indeed answer it. Commented Feb 18, 2022 at 15:58
• @OlivierRoche could you post as answer? Commented Feb 18, 2022 at 16:16
• Related Commented Feb 18, 2022 at 22:37

Use Laplace expansion with respect to the first row we have

\begin{aligned} A_{n} &= \det\begin{bmatrix} 2 & 1 & 0 & \cdots & 0 \\ 3 & 2 & 1 & \cdots & 0 \\ 0 & 3 & \ddots & \ddots & \vdots \\ \vdots& \vdots & \ddots & \ddots & 1 \\ 0 & 0 & \cdots & 3 & 2 \end{bmatrix} \\ &=2A_{n-1} - \det\begin{bmatrix} 3 & 1 & \cdots & 0 \\ 0 & 2 & \cdots & 0 \\ \vdots& \vdots & \ddots &\vdots \\ 0 & 0 & \cdots & 2 \end{bmatrix} \\ &=2A_{n-1}-3A_{n-2}.\\ \end{aligned}

The following is more of a long comment than an answer per se.

Using SymPy:

from sympy import *

def f(i,j):
if   i - j ==  1:
return 3
elif i - j ==  0:
return 2
elif i - j == -1:
return 1
else:
return 0

def T(n):
return Matrix(n, n, lambda i,j: f(i,j))

print([ T(n).det() for n in range(1,11) ])


which outputs

[2, 1, -4, -11, -10, 13, 56, 73, -22, -263]


which, according to OEIS, are the generalized Gaussian Fibonacci integers (A088137).

• Who wants to submit this information to OEIS? Commented Feb 18, 2022 at 22:50