Representation of a two-variable quadratic function

The quadratic function q : mathbf{R}^2 rightarrow mathbf{R}, with values

 q_1 (x) = 4x_1^2 + 2x_2^2 + 3 x_1x_2 + 4 x_1 + 5 x_2 + 2 ,

can be represented via a symmetric matrix, as

 q(x) = left(begin{array}{c} x_1  x_2  1 end{array}right)^T left(begin{array}{ccc} 4 & 3/2 & 2  3/2 & 2  & 5/2  2 & 5/2 & 2 end{array}right) left(begin{array}{c} x_1  x_2  1 end{array}right).

In short:

 q(x) = left( begin{array}{c} x hline  1 end{array} right)^T left( begin{array}{c|c} A & b hline b^T & c end{array} right)left( begin{array}{c} x  1 end{array} right) ,

where x=(x_1,x_2), and

 A = left( begin{array}{c|c} 4 & 3/2 hline 3/2 & 2 end{array} right) = A^T, ;; b = left( begin{array}{c} 2 hline 5/2 end{array}right), ;; c = 2.