I am following this lecture notes (page 10), Using eigenvectors to find the maximum and minimum values. I am having a difficult time understanding how matrix A was derived.
Find the maximum and minimum values of
$Q(X) = x^2 + y^2 + 2z^2 -2xy +4xz+4yz$
subject to the constraint
$x^2 +y^2 +z^2 = 1 $
Matrix of Q is $$ A= \begin{bmatrix} 1 & -1 & 2 \\ -1 & 1 & 2 \\ 2 & 2 & 2 \end{bmatrix} $$