Critical points of function $f(x):=\frac{}{|x|^2}$ are eigenvectors of $A$ I'm stuck on the following problem:
"Show that the critical points $\bar{x}$ of the function $f:\mathbb{R}^n-\{0\}\to\mathbb{R}, f(x):=\frac{<Ax,x>}{|x|^2}$ are eigenvectors of the symmetric matrix $A$ of eigenvalue $A\bar{x}/|\bar{x}|^2$."
Being a bit rusty on linear algebra, I don't know how to proceed;
so I'd like to have just an hint about how to get started.
 A: Sketch of Proof: First of all, you should really be considering the restriction of $f$ to the unit sphere.  That is, 
$$
f:\{x \in \Bbb R^n : \|x\| = 1\}, \qquad f(x) = \langle x,Ax \rangle
$$
(I suppose we could talk about the induced function on $\Bbb {RP}^{n-1}$, though).
Second, you're missing some information here: presumably, $A$ is meant to be a symmetric matrix (check the problem statement).  If that's the case, then the spectral theorem lets you write $A = U\Lambda U^T$
where $\Lambda$ is a diagonal matrix with eigenvalues $\lambda_i$ on the diagonal, and $U$ is some orthogonal matrix.  With the substitution (change of coordinates) $y = Ux$, we can think of this function as
$$
f:\{y \in \Bbb R^n : \|x\| = 1\}, \qquad
f(y) = \langle y, \Lambda y \rangle = \lambda_1 y_1^2 + \cdots + \lambda_n y_n^2
$$
A typical approach from here is to use Lagrange multipliers.
A: If $\bar x\in\mathbb{R}^n\setminus\{0\}$ is a critical point of $f(x)=\frac{\langle Ax,x\rangle}{\lvert x\rvert^2}$, then we have, for every $y\in\mathbb{R}^n$,
\begin{align*}
0 & =\left.\frac{d}{dt}\right|_{t=0} \frac{\langle A(\bar x +ty),\bar x + ty\rangle}{\lvert \bar x + ty\rvert^2} \\
& = \left.\frac{d}{dt}\right|_{t=0} \frac{\langle A\bar x,\bar x\rangle + 2 t\langle A\bar x, y\rangle + t^2 \langle Ay,y\rangle}{\lvert \bar x \rvert^2 + 2t \langle \bar x,y\rangle + t^2 \lvert y \rvert^2}\\
& = \frac{2\langle A\bar x, y\rangle \lvert \bar x\rvert^2 - 2\langle \bar x,y\rangle\langle A\bar x,\bar x\rangle}{\lvert \bar x \rvert^4}.
\end{align*}
Thus, we have
$$
\langle A\bar x , y\rangle = \frac{\langle A \bar x,\bar x\rangle}{\lvert \bar x\rvert^2}\langle \bar x,y\rangle
$$
for all $y\in\mathbb{R}^n$, which implies that
$$
A\bar x = \frac{\langle A \bar x,\bar x\rangle}{\lvert \bar x\rvert^2} \bar x.
$$
