# Prove x'Ax and x'Bx are independent when AB = 0 -- Multivariate Normal Distribution / Linear Regression

I understand that the quadratic form of a Normal variable follows chi-square distribution:

if$$x \sim N(\mu,I_p)$$ then $$x'Ax \sim\chi^2(p,\delta)$$ where $$\delta = \mu'\Sigma\mu$$ is the non-central parameter.

However, as is shown below, I don't know how to prove the independency of these two quadratic form, namely $$x'Ax$$ and $$x'Bx$$.

I actually have a quite simple idea:

Suppose the rank of $$A$$ is $$r$$, I want to show that $$x'Ax$$ can be expressed with $$Y_1,Y_2,...,Y_r$$ and $$x'Bx$$ with $$Y_{r+1},...,Y_n$$, which supports the independency of two quadratic.

Firstly, we need to discuss the situation where $$r=n$$. In this case, condition $$AB=0$$ directly tells us $$B$$ must be a $$0_{n\times n}$$ matrix because $$A$$ is a full rank matrix. Hence $$A,B$$ are independent. Similarly, we can prove this when $$r=n$$.

For the following discussion, I will assume $$0< r< n$$.

1. Since $$A$$ is a symmetric matrix, we can decompose it into the form: $$A = P'\Lambda P$$ where: $$\Lambda = \begin{bmatrix} D_r & 0 \\ 0 &0 \end{bmatrix}, D_r = diag(\lambda_1,\lambda_2,...,\lambda_r)$$

2. Let's denote $$P'BP = H = \begin{bmatrix}H_{11} & H_{12} \\H_{21} & H_{22}\end{bmatrix}$$ , where $$H_{11}$$ is an $$r \times r$$ matrix. Recall: $$AB=P'\begin{bmatrix} D_r & 0 \\ 0 &0 \end{bmatrix} P B= 0$$ $$P$$ is an orthogonal vector, so we can add a $$P'P = I_n$$ to the tail of it: $$AB=P'\begin{bmatrix} D_r & 0 \\ 0 &0 \end{bmatrix} P B P'P= P'\begin{bmatrix} D_r & 0 \\ 0 &0 \end{bmatrix} \begin{bmatrix}H_{11} & H_{12} \\H_{21} & H_{22}\end{bmatrix}P=0$$ which yeilds: $$D_rH_{11} = D_rH_{12} = 0$$ note $$H_{12} = H_{21} = 0$$ because $$B$$ is a symmetric matrix.
In general, the discussion in part 2 gives us: $$P'BP = H = \begin{bmatrix}0 & 0 \\ 0 & H_{22}\end{bmatrix}$$

3. Finally, let's take a look at $$x'Ax$$ and $$x'Bx$$:
$$(1)~ x'Ax = y'P'APy = \Sigma_{i=1}^{r}\lambda_i y_i^2$$
$$(2) ~x'Bx = y'P'BPy = y'Hy = (y_{r+1},...,y_n)H_{22}(y_{r+1},...,y_n)'$$
And this proves the question.