TITLE: Prove or disprove: If $x^T A x = 0 $ for all $x$, then $ A = 0 $.
QUESTION [5 upvotes]: Let $A$ be a square matrix and $x$ be a vector. Now consider the statement:
If $x^T A x = 0 $ for any $x$, then $A = 0$.
Is the above statement true or false?
How would you prove it?

REPLY [2 votes]: furthermore to the disproves of the fellers up, I would like to mention that if the question was in the complex field, the statement was true.
in other words:
$x^*Ax=0 \, \forall x \in C^n  \Leftrightarrow A=0 $
proof:
$\Leftarrow$ this direction is immediate
$\Rightarrow$
since the left side is zero for all x, lets choose few x's to show how A must be zero as well

$x_1=e_k \Rightarrow x^*Ax=e^T_kAe_k=A_{kk} \Rightarrow A_{kk}=0 \, \forall k$
$x_2=e_k+e_m \Rightarrow x^*Ax= (e^T_k+e^T_m)A(e_k+e_m)=A_{kk}+A_{km}+A_{mk}+A_{mm} $

since $A_{kk}=A_{mm}=0$ we get $\Rightarrow A_{km}=-A_{mk} \, \forall k\ne m$

$x_3=e_k+ie_m \Rightarrow x^*Ax= (e^T_k-ie^T_m)A(e_k+ie_m)=A_{kk}+iA_{km}-iA_{mk}+A_{mm} $

$\Rightarrow A_{km}=A_{mk} \, \forall k\ne m$
from $x_2,x_3$ we get that $A_{km}=-A_{km}$ where this can only valid if $A_{km}=0 \, \forall k\ne m$
therefore $A=0 \,\blacksquare$