In the proof of Schur product theorem based on the trace formula (see https://en.wikipedia.org/wiki/Schur_product_theorem), there is one point where it says that
$$A=N^{\frac{1}{2}}diag(a)M^\frac{1}{2}\neq 0 \Leftrightarrow a\neq0$$
I don't get this. Is it a consequence of some property? It doesn't depend on $N,M$?
Thanks
Hint: $N$ and $M$ are positive definite. So $$\mathrm{diag}(a) = N^{-1/2} A M^{-1/2}.$$