An elegant proof for a claim about orthogonal and positive-definite matrices Let $P$ be a real $n \times n$ symmetric positive-semidefinite matrix.
Suppose that $\langle O,P \rangle = \langle I,P \rangle$ for some orthogonal matrix $O$. Here $\langle , \rangle$ is the Euclidean (Frobenius) inner product. The assumption is equivalent to $\text{tr}(O^TP)=\text{tr}(P)$.
Then $OP=P$ holds. Since we can replace $O$ with $O^T$ the claim is equivalent to the seemingly surprising assertion $\text{tr}(OP)=\text{tr}(P) \implies OP=P$.

I have a proof, and I wonder whether there are other shorter proofs.
  Is there a proof which does not require diagonalizing $P$?


Here is my proof: By orthogonally diagonalizing $P$, we can reduce to the case where $P=\Sigma$ is diagonal, with non-negative entries $\sigma_i$.
The assumption implies $\sum_i \sigma_i O_{ii}=\sum_i \sigma_i$ where the sums run over all the indices $i$ where $\sigma_i \neq 0$. Since $|O_{ii}| \le 1$ this forces $O_{ii}=1$ for all these $i$. A direct check then implies that $O\Sigma=\Sigma$:
Indeed, $O\Sigma=\Sigma$ is equivalent to $O_{ij}\sigma_j=\Sigma_{ij}$.
If  $\sigma_j=0$, then $\Sigma_{ij}=0$ so equality holds. If $\sigma_j \neq 0$, then $O_{jj}=1$ so equality holds for $i=j$. For $i \neq j$,  $\Sigma_{ij}=0$ (since $\Sigma$ is diagonal) and , and $O_{ij}=0$, since whenever $O_{jj}=1$, all the rest of the entries in the $j$-th column of $O$ are zero. (Since $O$ is orthogonal). 

The following proof does diagonalize $P$, but not in matrix form.
Let $\{v_1,\ldots,v_n\}$ be an orthonormal eigenbasis of $P$ and $Pv_i=\lambda_iv_i$ for each $i$. Then
$$
\langle P,I\rangle
= \langle P,O\rangle = \sum_i\langle Pv_i,Ov_i\rangle
\le \sum_i\|Pv_i\|\|Ov_i\|
= \sum_i\lambda_i
= \operatorname{tr}(P)
= \langle P,I\rangle.
$$
Therefore $\langle Pv_i,Ov_i\rangle=\|Pv_i\|\|Ov_i\|$ for each $i$. Since $Pv_i=\lambda v_i$ and $Ov_i$ is a unit vector, we have $\langle v_i,Ov_i\rangle=1$ and in turn $Ov_i=v_i$ whenever $\lambda_i>0$. Hence $OP$ and $P$ agree on $\{v_1,\ldots,v_n\}$, meaning that $OP=P$.
