Show that the maximum of f on the unit sphere is a real eigenvalue of A Let $A$ be a matrix such that $A = A^t$. Define $f(x)$ : $\mathbb{R}^n \to \mathbb{R}$ by $f(x) = \langle \mathbf{Ax},\mathbf{x}\rangle$. We can use the compactness of the unit sphere $S^{n-1}$ in $\mathbb{R}^n$ to show that f attains its maximum in some point $a \in S^{n-1}$. Now I am required to show that there exists $\lambda \in \mathbb{R}$ such that $Aa = \lambda a$ with $\lambda = f(a)$. How do I show this? I figured that if $f$ attains its maximum at $a$, then grad($f(a)$) has to be equal to zero but this gives nothing useful.
Any help would be much appreciated
 A: To find the gradient of $f(x)=\langle Ax,x\rangle$ without getting confused by vector calculus identities,  write it out in terms of the entries $a_{ij}$:
$$f(x)=\sum_{i,j} a_{ij}x_ix_j$$
The derivative with respect to  $x_k$ is
$$ \sum_{i } a_{ik}x_i  +\sum_{j } a_{kj}x_j $$
which by symmetry of $A$ simplifies to
$$ 2 \sum_{i } a_{ik}x_i   $$
Returning to the vector form, you'll now recognize $\nabla f(x)$ as $2Ax$.
The Lagrange multiplier theorem says that $\nabla f$ is normal to the surface  at the critical points. The normal vector being $x$ itself, we conclude with $Ax=\lambda x$. 
A: There is a pure Linear Algebra solution --- no derivatives, gradients, Lagrange multipliers needed:
Since $A$ is symmetric, (there is a theorem that says that) ${\bf R}^n$ has an orthonormal basis consisting of eigenvectors of $A$. Let $x_1,x_2,\dots,x_n$ be such a basis, with corresponding eigenvalues $\lambda_1,\lambda_2,\dots,\lambda_n$. Show that if $x=c_1x_1+\cdots+c_nx_n$, then $x^tAx=\lambda_1c_1^2+\cdots+\lambda_nc_n^2$. 
Now assume $\lambda_1\ge\lambda_j$ for all $j$. Then $$x^tAx=\lambda_1c_1^2+\cdots+\lambda_nc_n^2\le\lambda_1c_1^2+\cdots+\lambda_1c_n^2=\lambda_1(c_1^2+\cdots+c_n^2)=\lambda_1$$ and $x_1^tAx_1=\lambda_1$. 
