TITLE: Criteria for $3 \times 3$ matrix to positive definite
QUESTION [5 upvotes]: Here it is said that a $2\times 2$ matrix $A$ is positive definite if and only if $tr(A) >0$ and $det(A)>0$. This will not work if $A$ is $3\times 3$. But is there any way to enforce the positive definiteness of the matrix $A$ via the trace and determinant of $A$, if $A$ is of size $3\times 3$?

REPLY [2 votes]: No, positive definiteness of a (symmetric) $3 \times 3$ matrix $A$ cannot be determined using $\det A$ and $\operatorname{tr} A$ alone.
(Counter)example The diagonal matrix $$\pmatrix{-\frac{1}{2}\\&-\frac{1}{2}\\&&4}$$ has the same trace ($3$) and determinant ($1$) as the (positive definite) $3 \times 3$ identity matrix but is not positive definite.

In any case we can generalize the criterion for a $2 \times 2$ matrix to $3 \times 3$---in fact $n \times n$---matrices.
Denote the eigenvalues $A$ by $\lambda, \mu, \nu$; since $A$ is symmetric, all $3$ are real. The characteristic polynomial of $A$ is
$$p_A(t) = t^3 - (\lambda + \mu + \nu) t^2 + (\mu \nu + \nu \lambda + \lambda \mu) t - \lambda \mu \nu,$$
or, more compactly,
$$p_A(t) = t^3 - \operatorname{tr} A \cdot t^2 + \sigma_2(A) t - \det A ,$$
where $\sigma_2(A) := \mu \nu + \nu \lambda + \lambda \mu$, i.e., the second elementary symmetric polynomial in the eigenvalues of $A$. So, if $\operatorname{tr} A, \sigma_2(A), \det A > 0$, Descartes' Rule of Signs implies that the (again, real) roots $\lambda, \mu, \nu$ of $p_A$ are positive, equivalently that $A$ is positive definite. Conversely, if $A$ is positive definite, $\sigma_2(A) = \mu \nu + \nu \lambda + \lambda \mu > 0$. Thus,
$$\boxed{\textrm{$A$ is positive definite} \qquad \textrm{iff} \qquad
\left\{\begin{array}{r}
 \operatorname{tr} A  > 0 \\
          \sigma_2(A) > 0 \\
\operatorname{det} A > 0
\end{array}\right.} .$$
The same reasoning immediately yields a generalization to (symmetric) matrices of arbitrary size:
$$\boxed{\textrm{$A$ is positive definite} \qquad \textrm{iff} \qquad (\sigma_k(A) = 0 \qquad \textrm{for all } k \in \{1, \ldots, n\})} ,$$
where $\sigma_k(A)$ is the $i$th elementary symmetric polynomial in the eigenvalues $\lambda_1, \ldots, \lambda_n$ of $A$, $$\sigma_k(A) := \sum_{1 \leq i_1 < \cdots i_k \leq n} \lambda_{i_1} \cdots \lambda_{i_k} .$$ Notice that $\sigma_1 = \operatorname{tr}$ and $\sigma_n = \operatorname{det}$, so this statement specializes to the result for $n = 2$ given in the question statement.
Remark We have the identity $\sigma_2 = \operatorname{tr} \circ \operatorname{Adj}$, where $\operatorname{Adj} A$ denotes the adjugate (a.k.a., confusingly, the classical adjoint) of $A$. We can also express $\sigma(A)$ in terms of traces of $A, A^2$:
$$\sigma_2(A) = \frac{1}{2}\left[(\operatorname{tr} A)^2 - \operatorname{tr} (A^2)\right].$$