Prove that an eigenvector is the maximum of a symmetric matrix Let $f : S^{n-1} \rightarrow \mathbb{R}, x \mapsto x^TAx$ ( A is a symmetric matrix), then an eigenvector $\xi$ of A is a local maximum of this function.
We are supposed to prove this in 6 steps and I got stuck somewhere.( I have to follow these steps, although it might be easier to prove this slightly different.)
(i) Express $S^{n-1}$ in terms of a function $g(x_1,...,x_n)=0$.
I did this by saying : $g(x_1,...,x_n) = x_1^2+...+x_n^2-1=0$.
(ii) Assume $\xi=e_n$. Then proof that there is a function $\gamma:B_{\epsilon}(0) \subset \mathbb{R}^{n-1} \rightarrow \mathbb{R} $ such that $ g(x_1,...,x_{n-1},\gamma(x_1,...,x_{n-1})=0$ and show that $D\gamma|_{x_1=0,...,x_{n-1}=0}=0$.
Well by implicit function theorem, we get at $(0,...,0,1)$ that $g(0,...,0,1)=0$ and $\partial_{x_n}g(0,...,0,1)=2$ this is invertible and therefore there exists such a curve $\gamma$ and by implicit differentiation we get that $D\gamma|_{x_1=0,...,x_{n-1}=0}=0$.
(iii) Look at the function $\bar{f}(x_1,...,x_{n-1})=f(x_1,...,x_n,\gamma(x_1,...,x_{n-1}))$ and prove that whenever $\bar{f}$ has a local maximum, then the same is true for $f$. 
Okay, this is pretty clear, since $\bar{f}$ and $f$ coincide on a local set and since the question of having a local extremum is only a local property, this is true.
(iv) Look at $f$ as a map $f:\mathbb{R}^n \rightarrow \mathbb{R}, x \mapsto x^T Ax$ and calculate $\nabla f|_{x=e_n}$. Well $\nabla f(e_n) = e_n^T A$
(v) And now I am supposed to show that $e_n$ is an eigenvector. 
I have no idea how to do this, but I think I missed something, since the answer to (iv) is not telling me much. Does anybody have an idea, where I am wrong? Also, I am not sure about the fact: Assume $\xi=e_n$, this should have at least some effect on the proof.
If something is unclear, please let me know. Does nobody have an idea or a hint/comment?(Maybe you are also wondering about something.)
 A: Outlined Method: Set $T:B_{\epsilon}(0) \subset \mathbb{R}^{n-1} \to \mathbb{R}^n$ to be given by $T(x) = (x, \gamma(x))$. Then you should find that $\bar{f} = f \circ T$ and therefore by the chain rule:
$$
\nabla \bar{f}(x) = \nabla f(T(x)) DT(x) = \\ \big( f_{x_1}(T(x)) + f_{x_n}(T(x))\gamma_{x_1}(x), \,...,\, f_{x_{n-1}}(T(x)) + f_{x_n}(T(x))\gamma_{x_n}(x) \big)\\
=\big(f_{x_1}(T(x)), ..., f_{x_{n-1}}(T(x)) \big) + f_{x_n}(T(x)) \nabla \gamma(x)
$$
When $x=0 \in \mathbb{R}^{n-1}$ then  $T(x) = e_n$ and you have
$$
\nabla \bar{f}(0) = \big(f_{x_1}(e_n), ..., f_{x_{n-1}}(e_n) \big)
$$
since $\nabla\gamma(0) =0$. You have started with the assumption that $\xi = e_n$ is an eigenvector of $A$, and if this is the case then $Ae_n = \kappa e_n$ and hence $\nabla \bar{f}(e_n) = 0$. This last equality follows since $\nabla f(e_n) = 2Ae_n$ and thus
$$
\nabla \bar{f}(0) =  2 \kappa \big( [e_n]_1, [e_n]_2, ..., [e_n]_{n-1}\big) = (0, 0, ..., 0)
$$ where I'm using the notation $[x]_i$ to mean the $i$th element of the vector $x$.
Therefore, if $e_n$ is an eigenvector of $A$, you find that $\nabla \bar{f}(0) = 0$ meaning that (from your step iii) $e_n$ is a local extreme point of $f$ restricted to the set $g=0$. 
Let's make a note here that you can't prove that $e_n$ is an eigenvector of $A$ using the previous steps, since all those steps would hold true regardless of your choice of symmetric $A$, and certainly $A$ needn't have $e_n$ as an eigenvector.
Lagrange Method: Let $g(x) = |x|^2 - 1$ and $f(x) = x^{T}Ax$ as you have above. Then 
$$ \nabla f(x) = 2 Ax$$
and 
$$ \nabla g(x) = 2x$$
Because of the theory of Lagrange multipliers, if $f$ were to have a local extrema on the constraint $g=0$, then there is some scalar $\lambda \in \mathbb{R}$ such that 
$$
\nabla f(x) = \lambda \nabla g(x)
$$
Equating these with what we've found above, if $x_0$ is any point which can satisfy this then
$$
2Ax_0 = 2\lambda x \implies Ax_0 = \lambda x_0
$$
In other words, the points in $S^{n-1}$ such that the Lagrange multiplier equation is satisfied are exactly the eigenvectors of $A$. Moreover, the value of the Lagrange multiplier will be the eigenvalue. Since a necessary condition for a maxima or minima is that it satisfy the Lagrange multiplier equation, and $f$ is continuous on the compact set $g=0$, it seems that the following statement is true: There exist eigenvectors $\xi_{\max}$ and $\xi_{\min}$ of $A$ which maximize and minimize $f(x)$ (respectively) subject to the constraint $g=0$.
Note! It is not true that every eigenvector is a maxima. Consider the following example
$$
A = \left(\begin{array}{cc}
2 & 0 \\
0 & 1
\end{array}
\right)
$$
Then $\xi_{\max} = (1 ~~ 0)^T$ and $\xi_{\min} = (0~~1)^{T}$. You can easily check that any $x \in S^1$ with $x \not\in \{\xi_{\max},\xi_{\min}\}$ will have $|f(\xi_{\max})|>|f(x)| >|f(\xi_{\min})|$.
