# Real zeroes of the determinant of a tridiagonal matrix

Let $$\epsilon_1,\ldots,\epsilon_n$$ be a sequence of signs and $$M(t)$$ be the tridiagonal matrix whose diagonal entries are $$\epsilon_1 t,\ldots, \epsilon_n t$$ and off-diagonal entries equal to $$1$$. Is it true that the number of real zeroes of $$P(t)=\det M(t)$$ is equal to the absolute value of $$\epsilon_1+\dots+\epsilon_n$$?

I checked this numerically on various cases, tried to apply the Sturm algorithm but couldn't prove it. Thanks for any help!

For $$\epsilon_1=\epsilon_2=-1$$ and $$\epsilon_3=\epsilon_4=\epsilon_5=1$$ you get the counterexample $$\operatorname{det}M(t)=t(t - 1)^2(t + 1)^2$$.
Another example, with simple real roots, is $$\epsilon_1=\epsilon_5=-1$$ and $$\epsilon_2=\epsilon_3=\epsilon_4=1$$ with $$\operatorname{det}M(t)=(t - 1)t(t + 1)(t^2 + 1)$$.
• Thanks for this perfect answer, do you have an example with $n$ even? I am specially interested in the case when the sequence is palindromic, that is $\epsilon_k=\epsilon_{n+1-k}$. Jun 2 at 21:17
• @JulienMarché Yes, for $\epsilon_1,\ldots,\epsilon_8=-1, -1, 1, 1, 1, 1, -1, -1$ we have $\operatorname{det}M(t)= (t - 1)(t + 1)(t^3 - t - 1)(t^3 - t + 1)$. Jun 2 at 21:33