<s>[INST] Is there a fast way to prove a tridiagonal matrix is positive definite? I' m trying to prove that 
$$A=\begin{pmatrix}
 4 & 2 & 0 & 0 & 0 \\
 2 & 5 & 2 & 0 & 0 \\
 0 & 2 & 5 & 2 & 0 \\
 0 & 0 & 2 & 5 & 2 \\
 0 & 0 & 0 & 2 & 5 \\  
 \end{pmatrix}$$ 
admits a Cholesky decomposition.
$A$ is symmetric, so it admits a Cholesky decomposition iff it is positive definite. The only methods I know for checking this are:


*

*$X^tAX > 0, \quad \forall X \in \mathbb{K}^n- \{0\}$.

*If $\lambda$ is an eigenvalue of $A$, then $\lambda>0.$


I have failed to prove it using 1 and 2 is taking me so much time. Is there any easier way to do this, given that $A$ is tridiagonal?
 [/INST] It is well-known that the eigenvalues of
$$
S=\begin{bmatrix} 0&1&0&0&0\\ 1&0&1&0&0\\ 0&1&0&1&0\\ 0&0&1&0&1\\ 0&0&0&1&0
\end{bmatrix}
$$
are 
$$
2\cos\frac{k\pi}{n+1},\ \ \ k=1,\ldots,n.
$$
So the eigenvalues of $4I+2S$ are 
$$
4+4\cos\frac{k\pi}{6}>0,\ \ \ k=1,\ldots,5.
$$
Being symmetric, this tells us that $$4I+4S=\begin{bmatrix} 4&2&0&0&0\\ 2&4&2&0&0\\ 0&2&4&2&0\\ 0&0&2&4&2\\ 0&0&0&2&4
\end{bmatrix}$$
is positive definite. Now $A$ is also positive definite, as $A=B+4I+2S$, where 
$$
B=\begin{bmatrix} 0&0&0&0&0\\ 0&1&0&0&0\\ 0&0&1&0&0\\ 0&0&0&1&0\\ 0&0&0&0&1\end{bmatrix}
$$
is positive semi definite. 
</s>