Derivation of a formula for the quadratic form of a matrix

55 Views Asked by At

Reading through Seber's Linear Regression Analysis, I came across the following formula for the quadratic form of a matrix:

Suppose $\textbf X$ was a $n \times 1$ vector of random variables, suppose $\theta$ was the expected value vector of $X$, suppose $A$ was $n \times n$ and symmetric. Then the following equation holds:

$\textbf{X'AX} = (\textbf {X} - \theta)'\textbf{A}(\textbf{X}-\theta )+ 2\theta'\textbf{A}(\textbf{X}-\theta) + \theta ' \textbf{A} \theta $

Where is this formula coming from? I think the factor 2 stems from the symmetry but I keep getting stuck somewhere in my reasoning. I already tried expressing each of the matrix multiplications as a sum but unfortunately I don't get the desired factor of 2 before the second term.

1

There are 1 best solutions below

1
On

It might help if you copy out the target expression you're trying to prove correctly. It should be $$ \mathbf{X}'\mathbf{AX}=(\mathbf{X}-\theta)'\mathbf{A}(\mathbf{X}-\theta)+2\theta'\color{red}{\mathbf{A}(\mathbf{X}-\theta)}+\theta'\mathbf{A}\theta\ , $$ but you're right about the symmetry of $\ \mathbf{A}$'s being responsible for the factor of $2$ in the term $\ 2\theta'\mathbf{AX}\ .$ If you expand the right side of the above equation by distribution the multiplications across the subtractions, two of the terms you get from the expansion of $\ (\mathbf{X}-\theta)'\mathbf{A}(\mathbf{X}-\theta)\ $ should be $\ {-}\mathbf{X}'\mathbf{A}\theta\ $ and $\ {-}\theta'\mathbf{A}\mathbf{X}\ .$ But, because $\ \mathbf{A}\ $ is symmetric, these two quantities are equal, and therefore $\ {-}\mathbf{X}'\mathbf{A}\theta-\theta'\mathbf{AX}=-2\theta'\mathbf{AX}\ .$