Corollary:
If $n \times 1$ vector $y \sim N(0, I)$ and then $n \times n$ matrix A is symmetric and idempotent and of rank $m$. Then $$ y'Ay \sim \chi ^2 (m).$$
How can I prove this corollary?
Corollary:
If $n \times 1$ vector $y \sim N(0, I)$ and then $n \times n$ matrix A is symmetric and idempotent and of rank $m$. Then $$ y'Ay \sim \chi ^2 (m).$$
How can I prove this corollary?
An idempotent matrix is diagonalizable.
I think you also need $A$ to be symmetric. If this is the case, the spectral theorem implies we can write $A$ as $BDB^\top$, where $B$ is orthogonal, and where $D$ is diagonal with diagonal entries either $1$ or $0$ (since $A$ is idempotent). Since $A$ has rank $m$, there are $m$ ones.
By rotational invariance of the Gaussian distribution, $z:=B^\top y \sim N(0,I)$ as well. So $y^\top A y = z^\top D z$ is the sum of $m$ squares of standard Gaussian random variables, which is $\chi^2(m)$.
I don't think the result holds when $A$ is not symmetric. Consider $A=\begin{bmatrix}1&-1\\0&0\end{bmatrix}$. It is idempotent with rank $m=1$. However, $y^\top A y = y_1^2 - y_1 y_2$ which is not $\chi^2(1)$.