Let $A$ be an $n \times n$ real symmmetric matrix. Find the critical points of the function $\langle Av,v\rangle$ restricted to the unit sphere in $\mathbb{R}^n$.
I would think you just use Lagrange multipliers, and $\nabla\langle Av,v\rangle=2Ax$, since $A$ is symmetric. But this only gives the possible locations for the local max/min. So the gradient is zero at these points, but doesn't necessarily include all points were the gradient is zero. Is there something I'm missing here?
Since we are dealing here with a symmetric $n\times n$ real matrix $A$, we can use the spectral theorem. So, we know that there are $n$ eigenvectors $v_1,\ldots,v_n$ of $A$ such that $(v_1,\ldots,v_n)$ is an orthogonal basis of $\mathbb{R}^n$. Therefore, after a change of variables, the fuction that we are dealing with here is just$$(x_1,x_2,\ldots,x_n)\mapsto\lambda_1{x_1}^2+\lambda_2{x_2}^2+\cdots+\lambda_n{x_n}^2$$ restricted to the unit sphere, where, for each $j\in\{1,2,\ldots,n\}$, $A.v_j=\lambda_jv_j$. The gradient of this map is$$(x_1,x_2,\ldots,x_n)\mapsto2(\lambda_1x_1,\lambda_2x_2,\ldots,\lambda_nx_n)$$and, within the unit sphere, this is $0$ if and only if $(x_1,x_2,\ldots,x_n)$ is an eigenvector (of $A$) with eigenvalue $0$.
So, going back to the original problem, if $E_0=\{v\in\mathbb{R}^n\,|\,A.v=0\}$, then the set of critical points of your function is $E_0\cap S^{n-1}$.
Added note: Please take into account the remark provided by skyking below.