# Determinant tridiagonal matrix [duplicate]

Can anybody help me out with getting an expression of the values of $\lambda$ for a matrix $A$ for which $det(A-\lambda I)$ equals the determinant of a matrix with on the main diagonal $-\lambda$, on the diagonal above the main diagonal $\dfrac{1}{2}$ and on the diagonal under the main diagonal $\frac{1}{2} \lambda$.

## marked as duplicate by Jean-Claude Arbaut, user147263, hardmath, Mark Viola, user223391 Nov 17 '15 at 5:11

• You mean $\det \begin{bmatrix} -\lambda & 1/2 & & & \\ 1/2\lambda &- \lambda & 1/2 & & \\ & 1/2 \lambda & \ddots & \ddots && \\ & & \ddots & &\end{bmatrix}$ ? – flawr Nov 15 '15 at 20:08
• Yes, but -$\lambda$ on the main diagonal instead of $\lambda$ – Roos Jansen Nov 15 '15 at 20:09

The determinant of such tridiagonal matrices of order $n$ are computed with the linear recurrence of order $2$: $$D_n=-\lambda D_{n-1}-\frac\lambda4 D_{n-2}$$ and the initial conditions $\; D_0=1,\enspace D_1=\lambda$.

How to find a closed formula for $D_n$ :

We look for basic solutions that are geometric progressions $r^n\ (r\ne 0)$; this leads to $$r^n=-\lambda r^{n-1}-\frac\lambda4 r^{n-2}\iff r^2=-\lambda r-\frac\lambda4.$$ So the possible values of $r$ are the roots $r_1,r_2$ of the characteristic equation: $$r^2+\lambda r+\frac\lambda4=0.$$ The general solution is a linear combination of the basic solutions: $\;\alpha r_1^n+\beta r_2^n$, where $\alpha, \beta$ are determined by the initial conditions.

• Thanks for you answer! How can I derivate an explicit expression for $\lambda$ from this? – Roos Jansen Nov 15 '15 at 20:12
• You have to solve for a linear recurrence of order $2$. Do you know about linear differential equations of order? – Bernard Nov 15 '15 at 20:14
• Hm, no, it doesn't ring a bell. – Roos Jansen Nov 15 '15 at 20:17
• O.K., I'll add some details. – Bernard Nov 15 '15 at 20:19
• That would be nice, thanks! – Roos Jansen Nov 15 '15 at 20:27

The determinant of the tridiagonal matrix can be expressed by the recurrence (link): $$f_n = -\lambda f_{n-1} -\frac{1}{4}\lambda f_{n-2} \quad (*)$$ and the initial values $f_0=1$, $f_{-1}= 0$.

For $\lambda = 0$ the determinant vanishes. Otherwise:

So $f_1 = -\lambda$, $f_2 = \lambda^2 - \frac{1}{4} \lambda$, $f_3 = -\lambda^3 + \frac{1}{4} \lambda^2+\frac{1}{4}\lambda^2=-\lambda^3+\frac{1}{2}\lambda^2$ and so on.

Solving the recurrence relation:

This is a homogenous linear recurrence relation with characteristic polynomial $$p(t) = t^2 + \lambda t + \lambda/4 \\$$ with roots $$0 = (t + \lambda/2)^2 + (\lambda -\lambda^2)/4 \iff \\ t_{1,2} = \frac{\pm \sqrt{\lambda(\lambda-1)}-\lambda}{2}$$

Case two roots:

For $\lambda \ne 1$ this leads to solutions $$f_n = \frac{1}{2^n} \left( c_1 \left(\sqrt{\lambda(\lambda-1)}-\lambda\right)^n + c_2 \left(-\sqrt{\lambda(\lambda-1)}-\lambda\right)^n \right)$$ Inserting $f_0$ and $f_1$ gives $$1=c_1+c_2 \\ -\lambda = c_1 t_1 + c_2 t_2 = c_1(t_1-t_2)+ t_2$$ thus $$c_1 = \frac{t_2+\lambda}{t_2-t_1} \quad\quad c_2 = \frac{t_1+\lambda}{t_1-t_2}$$ We have \begin{align} t_2 + \lambda &= \frac{-\sqrt{\lambda(\lambda-1)}-\lambda}{2} + \lambda = \frac{-\sqrt{\lambda(\lambda-1)}+\lambda}{2} \\ t_2 - t_1 &= \frac{-\sqrt{\lambda(\lambda-1)}-\lambda}{2} - \frac{\sqrt{\lambda(\lambda-1)}-\lambda}{2} = -\sqrt{\lambda(\lambda-1)} \end{align} so \begin{align} c_1 &= -\frac{-\sqrt{\lambda(\lambda-1)}+\lambda}{2\sqrt{\lambda(\lambda-1)}} = \frac{1}{2} - \frac{1}{2}\sqrt{\frac{\lambda}{\lambda-1}} \\ c_2 &= \frac{1}{2} + \frac{1}{2}\sqrt{\frac{\lambda}{\lambda-1}} \end{align}

Case one root:

For $\lambda = 1$ we have only one root $$t = -\frac{1}{2}$$ and try $$f_n = \left(-\frac{1}{2}\right)^n (c_3 + c_4 n)$$ Inserting $f_0 = 1$ gives $c_3 = 1$ and $f_1= -\lambda = -1$ gives $c_4 = 1$.

Result:

This results in the determinant value $$f_n = \begin{cases} 0 & ; \lambda = 0 \\ \left(-\frac{1}{2}\right)^n \left[ 1 + n \right] & ; \lambda = 1 \\ \frac{1}{2^{n+1}} \left[ \left(1 - \sqrt{\frac{\lambda}{\lambda-1}}\right) \left(\sqrt{\lambda(\lambda-1)}-\lambda\right)^n + \\ \left(1 + \sqrt{\frac{\lambda}{\lambda-1}}\right) \left(-\sqrt{\lambda(\lambda-1)}-\lambda\right)^n \right] & ; \text{else} \\ \end{cases}$$

Test:

The $f_n$ were calculated via the recursive equation $(*)$, $g(n)$ and $h(n)$ are cases of the result forumula above. Both evaluations should match.

Two roots, $n = 3$:

(%i) [f3,expand(radcan(g(3)))];
2        2
L     3  L     3
(%o)                       [-- - L , -- - L ]
2        2


One root, $n = 3$:

(%i) [ev(f3,L=1),expand(radcan(h(3)))];
1    1
(%o)                           [- -, - -]
2    2


Two roots, $n=8$:

(%i) [f8,expand(radcan(g(8)))];
7       6      5    4           7       6      5    4
8   7 L    15 L    5 L    L     8   7 L    15 L    5 L    L
(%o) [L  - ---- + ----- - ---- + ---, L  - ---- + ----- - ---- + ---]
4      16      32    256        4      16      32    256


One root, $n = 8$:

(%i) [ev(f8,L=1),expand(radcan(h(8)))];
9    9
(%o)                           [---, ---]
256  256

• I think your expression for $f_{n}$ in the beginning isn't correct? (see above) – Roos Jansen Nov 15 '15 at 20:58
• Because the product of the off-diagonal elements is equal to $-\dfrac{\lambda}{4}$ instead of $-\dfrac{\lambda^2}{4}$ – Roos Jansen Nov 15 '15 at 21:06
• @mvw: I think the first line of your computation for $a_n$ should be $a_n\lambda^n = -a_{n-1} \lambda^n - \frac{1}{4} a_{n-2} \lambda^{n\color{red}{-1}}.$ – Bernard Nov 15 '15 at 21:22
• I'm curious! I'm also working on it, but don't have the answer yet. – Roos Jansen Nov 15 '15 at 21:51