Showing $\operatorname{diag}(x)-xx'$ is positive definite on the tangent space of the unit simplex. Let $x$ be in the unit simplex (i.e. $\sum_i x_i = 1, x_i \geq 0$ ).
I want to show that $\operatorname{diag}(x) - xx'$ is positive definite on the tangent space of the simplex. That is, $z'[\operatorname{diag}(x)-xx']z\geq 0$ (with equality only for $z=0$) for all $z$ such that $\sum_i z_i =0$.
By $\operatorname{diag}(x)$, I mean the diagonal matrix D with $x$ along the diagonal (i.e. $D_{ii} = x_i$ and $D_{ij}=0$ for $i\neq j$).
I am not sure if this result is true but it seems to be presupposed in something I was reading and I have been unable to disprove it by example in matlab.
I believe this comes down to showing that $\sum_i z_i^2 x_i - (\sum_i z_i x_i)^2 \geq 0$ for $x$ in the simplex and $z$ in the tangent space.
 A: This is not true. Let $x$ be an $n$-vector and let $P=\operatorname{diag}(x)-xx^\ast$. When $x=(1,0)^\top$, we have $P=0$. Hence $P$ is zero (and cannot possibly be positive definite) on every subspace of $\mathbb R^2$.
However, the following statements are true:

*

*$P$ is positive semidefinite (and in particular it is PSD on $e^\perp$).

*$P$ is positive definite on $e^\perp$ if and only if $x>0$ entrywise.

Let $y_i=\sqrt{x_i}z_i$. By Cauchy-Schwarz inequality,
$$
\left|\sum_ix_iz_i\right|^2
=\left|\sum_i\sqrt{x_i}y_i\right|^2
=\left|\langle\sqrt{x},y\rangle\right|^2
\le\left\|\sqrt{x}\right\|^2\left\|y\right\|^2
=\sum_ix_i|z_i|^2.\tag{1}
$$
Hence $P$ is always positive semidefinite. This proves statement $1$.
When $x>0$, since every $z\in e^\perp\setminus$ is not parallel to $e$, $y$ is not parallel $\sqrt{x}$. Hence strict inequality holds in $(1)$ and $P$ is positive definite on $e^\perp$.
When some $x_i$ is zero, we may assume without loss of generality that $x_i\ne0$ for all $i\le k$ and $x_i=0$ for all $i>k$. Let $z=\sum_{i=1}^ke_i-ke_{k+1}=(1,\ldots,1,-k,0,\ldots,0)^\top$. Then $0\ne z\in e^\perp$ but $y=\sqrt{x}$. Hence equality holds in $(1)$ and $P$ is not positive definite on $e^\perp$. This proves statement 2.
Alternatively, you may prove the two statements above by using matrix congruence. Let
$$
A=\pmatrix{1&x^\ast\\ x&\operatorname{diag}(x)}.
$$
Since $e^\ast x=1$, $A$ is congruent to
$$
\pmatrix{1&-e^\ast\\ 0&I}\pmatrix{1&x^\ast\\ x&\operatorname{diag}(x)}\pmatrix{1&0\\ -e&I}=\pmatrix{0&0\\ 0&\operatorname{diag}(x)}\tag{2}
$$
and also to
$$
\pmatrix{1&0\\ -x&I}\pmatrix{1&x^\ast\\ x&\operatorname{diag}(x)}\pmatrix{1&-x^\ast\\ 0&I}=\pmatrix{1&0\\ 0&P}.\tag{3}
$$
Since the RHS of $(1)$ is PSD, so is the RHS of $(2)$. Hence $P$ is PSD. Moreover, since $Pe=0$, $P$ is positive definite on $e^\perp$ if and only if $\operatorname{rank}(P)=n-1$. However, as the RHSs of $(1)$ and $(2)$ are both congruent to $A$, $\operatorname{rank}(P)$ is equal to $\operatorname{rank}(\operatorname{diag}(x))-1$. Therefore $\operatorname{rank}(P)=n-1$ if and only if $\operatorname{diag}(x)$ has rank $n$, i.e. iff every $x_i$ is positive.
