I am trying to work through some problems to find the minimizer and minimum value of a function. The book I am using doesn't have a clear cut example and I can't seem to find a good example online anywhere, so I have no idea where to begin. The function I am trying to do this for is $$ 3x^{2} + 3xy + 3y^{2} - 2x - 2y + 4 $$
The only thing I can find is that we have to rewrite the equation in the following compact matrix notation $$ p(\textbf{x}) = \textbf{x}^{T}K\textbf{x} - 2\textbf{x}^{T}\textbf{f} + c $$ where $K = (k_{ij})$ is a symmetric $n \times n$ matrix, $\textbf{f}$ is a constant vector, and $c$ is a constant scalar. However, it doesn't really explain how to come up with those values. I'm guessing that in the problem I am trying to work through that $c = 4$ and that $\textbf{x} = [x, y]^{T}$, but I have no idea how to determine $K$ and $\textbf{f}$.
If someone could show me how to find $K$ and $\textbf{f}$ I would greatly appreciate it.