Example of copositive matrix but neither positive semidefinite nor elementwise nonnegative? An $n \times n$ real symmetric matrix $A$ is said to be copositive if $\mathbf{x}^{\top}A\mathbf{x} \geq 0$ for all $\mathbf{x}\in\mathbb{R}^{n}$ such that $\mathbf{x} \geq 0$.
I wonder whether the copositive matrix is also positive semidefinite or elementwise nonnegative. I think it is not true since positive semidefinite requires $\mathbf{x}^{\top}A\mathbf{x} \geq 0$ for all $\mathbf{x}\neq 0$. Could anyone give me an example that is a copositive matrix but neither positive semidefinite nor elementwise nonnegative? Thanks.
 A: For $2 \times 2$ matrices, there is no such example. Let $A = \begin{bmatrix}a & b \\ b & c\end{bmatrix}$; taking $\mathbf x = (1,0)$ and $\mathbf x = (0,1)$ in $\mathbf x^{\mathsf T}\!A\mathbf x$ shows that $a,c \ge 0$. Then, taking $\mathbf x = (t,1)$ gives a quadratic $at^2+2bt+c$ which is either always nonnegative (in which case the matrix is positive semidefinite), minimized at $t < 0$ (in which case $-\frac ba < 0$ means $b>0$), or linear (in which case we must have $b \ge 0$ to avoid $2bt+c$ becoming negative for large $t$).
For larger matrices, we can find example just based on the fact that the sum of two copositive matrices is also copositive. So, for example,
$$
   \begin{bmatrix}1 & -1 & 0 \\ -1 & 1 & 0 \\ 0 & 0 & 0\end{bmatrix} + \begin{bmatrix}0 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 0 \end{bmatrix} = \begin{bmatrix}1 & -1 & 0 \\ -1 & 1 & 1 \\ 0 & 1 & 0\end{bmatrix}
$$
is copositive, because it is the sum of a positive semidefinite matrix and an elementwise nonnegative matrix. However, you can see that it's not positive semidefinite (because of the bottom right $2 \times 2$ submatrix) and has negative entries.
