I was working through a proof of a lemma that lets us determine whether a Hessian is positive definite for Mardens' Vector Calculus, page 175
Basically the lemma is if $B= \begin{bmatrix} a & b \\ b & c \\ \end{bmatrix}$ and the Hessian of $\vec h$ is such that $H(\vec h)= \frac1{2} \begin{bmatrix} h_1,h_2 \end{bmatrix}\ B \begin{bmatrix} h_1\\h_2 \end{bmatrix} $ then $H(\vec h)$ is positive-definite if and only if $a>0$ and det $B=(ac-b^2) \ >0$
In the proof, I get to $$\frac1{2}(ah_1^2 +2bh_1h_2+ch^2_2)$$ but after that I don't understand how we can complete the square. I know how to complete the square of two variable when there isn't a multiple of both variables in the equation like there is here(e.g. $h_1h_2$).
The book completes the square to $$H(\vec h)= \frac1{2}a(h_1 + \frac{b}{a}h_2)^2 +\frac1{2}(c-\frac{b^2}{a})h_2^2.$$
How do you complete the square in cases like these? Thanks