[latexpage]
The quadratic function \( q: \mathbb{R}^2 \rightarrow \mathbb{R} \), with values
\[ q(x) = 4x_1^2 + 2x_2 ^2 +3x_1 x_2 +4x_1 + 5x_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( \renewcommand{\arraystretch}{1.2} \begin{array}{c@{\hspace{0.5em}}|@{\hspace{0.5em}}c} A & b \\ \hline b^T & c \end{array} \right) \left(\begin{array}{l} x \\ 1 \end{array}\right), \]
where \( x \) is the vector \(\left(\begin{array}{c} x_1 \\ x_2 \end{array}\right)\), and
\[ A = \left(\begin{array}{c|c} 4 & 3/2 \\ \hline 3/2 & 2 \end{array}\right) = A^T, \quad b = \left(\begin{array}{c} 2\\ \hline 5/2 \end{array}\right), \quad c=2. \]