Solution (source code)

= Solution

A unit lower triangular $L$ is invertible. For $x\ne0$, $y=L^Tx\ne0$, so an <LDL decomposition> with positive diagonal $D$ gives
$$
x^TAx=(L^Tx)^TD(L^Tx)=\sum_i d_i y_i^2>0.
$$
Also $A=LDL^T$ is symmetric. Hence $A$ is a <positive-definite matrix>.

For the specified <matrix>, comparing entries successively gives $d_1=1$, $l_{21}=-1$, $l_{31}=2$, $d_2=3-l_{21}^2d_1=2$, and
$$
l_{32}=\frac{1-l_{31}l_{21}d_1}{d_2}=\frac32,\qquad d_3=3-l_{31}^2d_1-l_{32}^2d_2=-\frac{11}{2}.
$$
Thus
$$
\boxed{L=\begin{pmatrix}1&0&0\\-1&1&0\\2&3/2&1\end{pmatrix},\qquad D=\operatorname{diag}(1,2,-11/2).}
$$
The last pivot is negative, so this particular factorization is outside the positive-diagonal case proved above. Indeed $x=(-2,0,1)^T$ has $x^TAx=-1$, and $\det A=-11$. \b[There is no positive-diagonal LDL factorization for the printed <matrix>.] The unrestricted LDL decomposition above is nevertheless valid.