Let A be a 3 by 3 matrix $$\begin{pmatrix} 1 & -2 & -1\\ -2 & 1 & 1 \\ -1 & 1 & 4 \end{pmatrix}$$
Then we have a real-number vector $\vec{ z }= \left( \begin{array}{c} z_1 \\ z_2 \\ z_3 \end{array} \right)$ such that $$\vec{z}^{ \mathrm{ T } }\vec{z} = 1$$ $$z_1+z_2+z_3=1$$
What is the range of $\vec{z}^{ \mathrm{ T } }A\vec{z} $?
I have found that $A$'s eigenvalues are -1,2, and 5 and eigenvectors are $\left( \begin{array}{c} 1 \\ 1 \\ 0 \end{array} \right)$$\left( \begin{array}{c} 1 \\ -1 \\ 1 \end{array} \right)$$\left( \begin{array}{c} -1 \\ 1 \\ 2 \end{array} \right)$ for each.
Can anyone help me?
If we eliminate $z_3$ by replacing it with $1-z_1-z_2$, you want to find the minimum and maximum of $$\{z^TAz + b^Tz + c : zQz+q^Tz = 0\}$$
with $$A=\begin{pmatrix}7 & 2 \\ 2 & 3\end{pmatrix}, \; b=\begin{pmatrix}-10\\-6\end{pmatrix}, \; c=4, \; Q=\begin{pmatrix}2 & 1 \\ 1 & 2\end{pmatrix}, \; q=\begin{pmatrix}-2\\ -2\end{pmatrix}.$$
Via the Lagrangian we find that an extremum must satisfy $2Az+b+\lambda(2 Qz + q)=0$ and $z^TQz+q^Tz = 0$, but I do not see an easy solution. The problem is now in a format that allows for this numerical procedure.
Instead I will go on and eliminate $z_2$ to get an unconstrained problem in $z_1$. The constraint is $2z_2^2+(2z_1-2)z_2+(2z_1^2-2z_1)=0$, so $z_2=\frac{1}{2}(1-z_1) \pm \sqrt{\frac{1}{4}-\frac{3}{4}z_1^2+\frac{1}{2}z_1}$. Plugging this into the objective function no longer gives a nice expression. Numerical analysis shows that the positive branch has a maximum of $41/9$ at $z_1=-1/3$ and a minimum of $\approx-0.53$ at $z_1\approx 0.538$ while the negative branch has a maximum of $\approx 4.92$ at $z_1 \approx -0.29$ and a minimum of $1$ at $z_1=1$.
So the range is approximately $-0.53$ to $4.92$.