Prove that if the expectation value of an operator in any state is 1, the operator is Identity I want to prove that if $ \langle \psi | A | \psi \rangle  = 1$ for all $ \psi ,$ then $A=I .$
Let's write $A$ and $\psi$ in the same basis. 
$$
\begin{alignat}{7}
\left\langle \psi \middle| A \middle| \psi \right\rangle & ~=~ && \left( \sum_w \alpha_w^* \langle w | \right)  \left(\sum_{pq} \gamma_{pq} |p\rangle \langle q| \right) \left(\sum_v \alpha_v | v \rangle \right) \\[5px]
& ~=~ && \sum_{wvpq} \alpha_w^* \gamma_{pq} \alpha_v \langle w | p \rangle \langle q | v \rangle \\[5px]
& ~=~ && \sum_{wv} \alpha_w^* \gamma_{wv} \alpha_v
\end{alignat}
$$
which is equal to $1 .$
We know that the $\alpha$'s can be anything, and we need to prove that the $\gamma$'s where $w = v$ are $1$ and when $w \neq v$ is $0 .$
How do I proceed?
 A: We have the freedom to expand $A$ in its eigenbasis, then 
\begin{equation}
A = \sum_{\alpha} \vert\alpha\rangle \langle \alpha\vert A\vert\alpha\rangle \langle \alpha\vert = \sum_{\alpha} \vert\alpha\rangle  \langle \alpha\vert = 1,
\end{equation}
where in the second equality we used that by assumption $\langle \alpha\vert A\vert\alpha\rangle=1$.
A: Loewe's proof is very slick but assumes that $A$ can be diagonalized. 
Here is a proof with no such restriction. 
First, setting $B=A-I$ the statements becomes
$$
\langle \psi, B \psi \rangle=0 ,\ \ \forall \parallel \psi \parallel=1 \Rightarrow B = 0.
$$
By going to a basis, reasoning as the OP, one obtains
$$
\sum_{i,j} \psi_i^\ast \psi_j B_{i,j} =0
$$
from which one obtains that the hermitian part of $B$ must be zero. I.e., the statements holds if $B$ (and hence $A$) is hermitian. Loewe's proves it for the more general case for which $A$ can be diagonalized. 
For full generality the trick is to realize that we also have information on the off-diagonal elements of $B$ via the polarization identity.
Define
$$
q(\psi) = \langle \psi, B\psi \rangle
$$
then
$$
\langle \phi, B \psi \rangle = \frac{1}{4} \sum_{n=0}^3 i^n q(\phi + i^n \psi)
$$
but by assumption $q(\xi)=0$ for all $\xi$, hence  $\langle \phi, B \psi \rangle =0$ for all $\phi,\psi$, hence $B=0$. 
