# Prove or disprove: If $x^T A x = 0$ for all $x$, then $A = 0$.

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?

• :what are you trying?
– M.H
Mar 15, 2013 at 16:29
• For such $A=(a_{ij})_{n\times n},$ diagonal entries are all $0:$ That $a_{jj}=0~(j=1,2,...,n)$ is evident by considering $x=(x_i)_{n\times 1}$ where $x_i=\begin{cases} 1,&\text{if$i=j$}\\ 0,&\text{otherwise}\\ \end{cases}.$ Mar 16, 2013 at 5:25

If $x ^t Ax = 0$ for every $x \in \mathbb R^n$ then the diagonal entries of $A$ are all zero by taking $x$ to be the column vector with the $i$-th component as $1$ and $0$ elsewhere, $\forall i = 1,2,\ldots, n$.

then choose your $x$ as follows

the column vector with the $i$-th and the $j$-th components as $1$ and $0$ elsewhere. Then try to ahow $A^t=-A$

• can I have the following counterexample? Say, if I choose x = (0,0)^T, then for any 2 x 2 matrix A with entries not equal to 0 , x^T A x = 0 . Hence the statement is false. Is my logic wrong ??? Mar 15, 2013 at 16:45
• Yes it's wrong. We need to find $A$ or some properties of $A$ so that $x^TAx=0$ for absolutely any $x$. Nov 24, 2017 at 15:15

It is not true, $A=\begin{pmatrix}0&1\\-1&0 \end{pmatrix}$ is a counterexample.

Take $x=e_i+e_j$, you can get $A_{ij}+A_{ji}=0$, which means $A^T+A=0$

• can I have the following counterexample? Say, if I choose x = (0,0)^T, then for any 2 x 2 matrix A with entries not equal to 0 , x^T A x = 0 . Hence the statement is false. Is my logic wrong ??? Mar 15, 2013 at 16:44
• Yes, it's wrong. You don't choose $x$, the statement in your problem is for any x. Mar 15, 2013 at 16:46
• It is wrong. Your counterexample has to satisfy that for all $x$, $x^TAx=0$, not only for $x=0$. Mar 15, 2013 at 16:46
• but in u guys method, u guys also choose x to be blablabla. Plus, if it doesnt hold one for particular vector $x$, then how can i hold for all $x$ ? Sorry, I know i m asking dumb questions but i just want to understand more Mar 15, 2013 at 16:51
• Since it holds for all $x$, it holds in particular for the $x$ that Shu has presented. This allows you to deduce the general form of $A$ satisfying the equation. Mar 15, 2013 at 16:54

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$$

Since $x^tAx=\langle x,Ax\rangle$ (the inner product), the question may be stated:

Is there a transformation that maps every vector to something orthogonal to itself?

What should come to mind is a rotation matrix that rotates $\mathbb{R}^2$ by 90 degrees, which Shu Xiao Li has presented.