How to prove consicely the matrix form of a quadratic form of two variables?

41 Views Asked by At

Let ${\bf x}=(x,y)\in\mathbb{R}^2$, $\forall i \in\mathbb{N}, 0 \leq i \leq 5$, let $m_i\in\mathbb{R}$ and let \begin{equation} M({\bf x}) = m_0 + m_1 x + m_2 y + m_3 x^2 + m_4 x y + m_5 y^2 \end{equation} denote a general quadratic function of two variables over the real numbers.

Let ${\bf c}=(c_x,c_y)\in\mathbb{R}^2$, and let $\nabla M({\bf c})$ and $\nabla^2 M({\bf c})$ denote the gradient vector and Hessian matrix respectively of $M$ at ${\bf c}$.

Furthemore, let ${\bf \bar{x}}=[x \ y]$ and ${\bf \bar{c}}=[c_x \ c_y]$ (coordinates expressed as vectors). I can show algebraically, via substitution and simplification that

$M({\bf x}) = M({\bf c}) + \nabla M({\bf c}) ({\bf \bar{x}} - {\bf \bar{c}})^T + \frac{1}{2} \big[ ({\bf \bar{x}} - {\bf \bar{c}}) \nabla^2 M({\bf c}) ({\bf \bar{x}} - {\bf \bar{c}})^T \big]$

However the derivation for the above is rather long and messy, in the end all the terms involving $c_x$ and $c_y$ cancel out leaving the original function $M({\bf x})$. Can anyone suggest a concise way to derive this?

One could pretend that the above is just the Taylor series of $M({\bf x})$ at ${\bf c}$ where all the higher order terms must be $0$ because of the quadratic nature of $M({\bf x})$ but that seems like an overkill and not a good argument, or at least just an intuitive argument but not correct formally speaking.

Any suggestions?

Thank you in advance

1

There are 1 best solutions below

1
On

Not a complete solution but how I'd tackle it.

Notation: I use the more traditional column vectors, and avoid all the bold and overbar embroidery.

Firstly, I think it is easier to write $h:=x-c$ so that we are trying to prove $$ M(c+h)=M(c) + \nabla M(c)h+ \frac{1}{2}h^T \nabla^2 M(c) h. \tag{*} $$

Secondly, note that $\nabla(f+g)=\nabla f +\nabla g$ and $\nabla^2 (f+g)=\nabla^2 f+\nabla^2 g$.

Now the given function is of the form $M(x)=M_0(x)+M_1(x)+M_2(x)$ where $M_0(x)=m_0$, $M_1(x)=m^T x$ where $m^T=(m_1,m_2)$, and $M_2(x)=\frac{1}{2}x^T A x$ where $A=\begin{pmatrix} 2 m_3 & m_4\\m_4 & 2 m_5\end{pmatrix}$ is symmetric.

We now only need to check that $(*)$ hold for each piece: the constant $M_0$, the linear $M_1$ and the quadratic $M_2$. All are easy, and the first two are completely trivial.

For $M_2$ we have $$ (c+h)^T A (c+h) = c^T A c + 2 c^T A h + h^T A h $$ by the symmetry of $A$. To complete check that $$ \nabla M_2(c)= 2 c^T A\ \ \text{ and }\ \ \nabla^2 M_2(c)=A. $$