A matrix $A \in \mathbb{R}^{n \times n}$ is called completely positive if there exists an entrywise nonnegative matrix $B \in \mathbb{R}^{n \times r}$ such that $A = BB^{T}$.
All eigenvalues of $A$ are real and nonnegative.



> 
> My question is when will a completely positive matrix have all positive eigenvalues?
> 
> 
> 


The only completely positive matrix I know so far have zero eigenvalues is
\begin{equation}
A =
\begin{pmatrix}
41 & 43 & 80 & 56 & 50 \\
43 & 62 & 89 & 78 & 51 \\
80 & 89 & 162 & 120 & 93 \\
56 & 78 & 120 & 104 & 62 \\
50 & 51 & 93 & 62 & 65
\end{pmatrix} .
\end{equation}
So probably that the case completely positive matrix has zero eigevalues are rare. But I could not find any documment on this.


**Update:** due to @Robert Israel answer.


Usually, we do not know $B$ in general and indeed the composition may not unique. Therefore the condition depends only in $A$ would be easier to verify.
For example with
\begin{equation}
A = \begin{pmatrix}
18 & 9 & 9 \\ 9 & 18 & 9 \\ 9 & 9 & 18
\end{pmatrix}
\end{equation}
there are at least three decompose satisfies $B \geq 0$. In particular
\begin{equation}
B\_{1} = \begin{pmatrix}
4 & 1 & 1 \\ 1 & 4 & 1 \\ 1 & 1 & 4
\end{pmatrix} , \quad B\_{2} = \begin{pmatrix}
3 & 3 & 0 & 0 \\ 3 & 0 & 3 & 0 \\ 3 & 0 & 0 & 3
\end{pmatrix} , \quad B\_{3} = \begin{pmatrix}
3 & 3 & 0 \\ 3 & 0 & 3 \\ 0 & 3 & 3
\end{pmatrix} .
\end{equation}



Completely positive matrix with positive eigenvalue
It will have all positive eigenvalues iff $0$ is not an eigenvalue, i.e. iff it is nonsingular, and (if $B$ is also $n \times n$) this is equivalent to $B$ being nonsingular.


EDIT: You are right about the completely positive matrices with $0$ as an eigenvalue being "rare": they form a closed nowhere dense set in the completely positive matrices.


EDIT: Closed because determinant is a continuous function, so $\{A: \det(A)=0\}$ is closed.


Nowhere dense: Given $A = BB^T$ where $B$ is $n \times r$, consider $C(t) = [(1-t)B | tI]$ (i.e. the $n \times (r+n)$ matrix constructed by adjoining the columns of $(1-t) B$ and $tI$, where $I$ is the $n \times n$ identity matrix. Then for $0 \le t \le 1$, $A(t) = C(t) C(t)^T$ is a completely positive matrix; $A(0) = A$ and $A(1) = I$. Now $\det A(t)$ is a polynomial in $t$ and not identically $0$, so it is nonzero for almost all $t$. In particular, there are nonsingular completely positive matrices $A(t)$ arbitrarily close to $A$.


