# $\langle Ax,x \rangle$ $\geq 0$, then $Ax=0$ iff $A^{t}x=0$

My friend asked me a question but I somehow stuck.

Prove that if $A$ is a real $n*n$ matrix and $\langle Ax,x \rangle$ $\geq 0$ for all $x$ in $R^{n}$, then $Ax=0$ iff $A^{t}x=0$

I found that this means $A$ is called positive-semidefinite, but can't find useful property to prove it. Someone help please.

If $x^TAx\geq 0,\forall x$, so is $x^TA^Tx=(x^TAx)^T$. We have: $$x^T(A+A^T)x\geq 0,\forall x$$ so $A+A^T$ is symmetric positive semi-definite. It has a square root, say $B$, i.e. $B$ is symmetric and $(A+A^T)=B^TB$. If $Ax=0$, we have: $$x^T(A+A^T)x=0\Rightarrow x^TB^TBx=0\Rightarrow \|Bx\|^2=0\Rightarrow Bx=0\Rightarrow (A+A^T)x=B^TBx=0$$ which means $A^Tx=0$ too since we already have $Ax=0$. The other way round is exactly the same argument.