Recursive computation of determinant of Toeplitz tridiagonal matrix

192 Views Asked by At

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?

2

There are 2 best solutions below

0
On BEST ANSWER

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}$$

1
On

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).