How is this derivation obtained? It seems like it is possible to do so from first principles for using the series definition for quadratic form, but that seems tedious. Is there a faster way to manipulate such forms?
1 Answer
$\begingroup$
$\endgroup$
1
Assuming $\mathsf X$ and $\mathsf \theta$ to be vectors, and $\mathsf A$ to be symmetric, \begin{align}\mathsf{ X^T A X=(X-\theta+\theta)^T A (X-\theta+\theta)\\ =(X-\theta)^T A (X-\theta)+\theta^T A (X-\theta)+\theta^T A\theta+(X-\theta)^T A \theta\\ =(X-\theta)^T A (X-\theta)+2\theta^T A (X-\theta)+\theta^T A\theta}\end{align} since $$\mathsf{ \theta^T A (X-\theta)=[\theta^T A (X-\theta)]^T=(X-\theta)^T A \theta }$$
-
$\begingroup$ Just to be clear, since I took some time to go from line 1 to line 2.\begin{align}\mathsf{ X^T A X=(X-\theta+\theta)^T A (X-\theta+\theta)\\ =(X-\theta)^T A (X-\theta+\theta) + (\theta)^T A (X-\theta+\theta) \\ =(X-\theta)^T A (X-\theta) + (X-\theta)^T A (\theta) + (\theta)^T A (X-\theta) + (\theta)^T A (\theta) \\ =(X-\theta)^T A (X-\theta)+\theta^T A (X-\theta)+\theta^T A\theta+(X-\theta)^T A \theta\\ =(X-\theta)^T A (X-\theta)+2\theta^T A (X-\theta)+\theta^T A\theta} \end{align} $\endgroup$– shemCommented Mar 6, 2021 at 15:55