I would like to understand why if $P$ is positive semidefinite, then $x^{\text{T}}Px=0$ if and only if $Px=0$. How can I prove this? I can say that $x'Px=x'M'Mx$, where $M$ is the square root of $P$, then the norm $Mx=0$. How can I arrive to $Px=0$? And how to understand with intuition this?
Thanks.
Extra: If the matrix was positive definite, would it be the same?
(I’m assuming that we’re talking about finite vector spaces over the real numbers)
If P is diagonal, then the result is clear:
If P = $\begin{pmatrix} a_{1} & 0 & 0 & \cdots & 0 \\ 0 & a_{2} & 0 & \cdots & 0 \\ & & \ddots & & \\ 0 & \cdots &0& a_{k} & \cdots\\ &&\ddots\\ 0 & 0 & \cdots & 0 & 0 \end{pmatrix}$ with $a_i > 0$, then if $x = \begin{pmatrix} x_1 \\ \cdots \\ x_n \end{pmatrix}$ we have: $x^tPx = a_1x_1^2 + \cdots +a_kx_k^2 = 0$ implies that $x_1 = x_2 = \cdots = x_k = 0$, since all of the $a_i$ are strictly positive. And in this case it is clear that $x \in ker(P)$.
If P is not diagonal, then it must be congruent to a diagonal matrix like the one considered in the first case, say $P = M^t D M$ where $M \in GL_n(\Bbb{R})$ and $D$ is a positive semidefinite diagonal matrix. Thus we have $x^t P x = (Mx)^t D (Mx)$, and hence $x^tPx = 0 \implies Mx \in ker(D) $ by the previous case. But $D= (M^t)^{-1}P(M)^{-1}$ so we get that $ 0=D(Mx) = (M^t)^{-1}Px \implies Px = 0$ because $(M^t)^{-1}$ is invertibile.
EDIT: the theorem I implicitly used to say that P is congruent to a diagonal matrix is Sylverster’s Theorem
EDIT2: P is an n by n matrix