Stationary points of $ \dfrac{1}{2} \|A-xx^T\|^2_F $.
If $A$ is an $n \times n$ matrix and $x$ is an $n \times 1$ vector. How do I get the stationary points? I know that I am supposed to find the gradient and equate it to $0$, but how do I do that for a vectorized equation? I can solve this when $n = 1$, but not for a general case.
We have $$\frac{1}{2}\|A-xx^T\|^2_F = \frac{1}{2}\text{trace}( (A-xx^T)^T(A-xx^T)) = \frac{1}{2}\|A\|^2_F - \frac{1}{2}x^T(A+A^T)x+\frac{1}{2}(\|x\|^2)^2. $$
This gives the gradient of $\frac{1}{2}\|A-xx^T\|^2_F$ as $$ -(A+A^T)x + 2\|x\|^2x. $$
And the stationary points are the $x$ which satisfy $$(A+A^T)x = 2\|x\|^2x.$$
$x = 0$ is clearly a stationary point.
Let $A+A^T = \sum_{i=1}^n \lambda_i u_iu_i^T$ be the spectral decomposition of $A+A^T$ where $u_i$'s form an orthonormal basis.
Clearly a stationary point $x \neq 0$ is an eigenvector of $A+A^T$ with eigenvector $2\|x\|^2$. So, $x = cu$ for some $u$ where $u$ is a unit norm eigenvector corresponding to (say)the eigenvalue $\lambda_i$ and $c \neq 0$. We must have $\lambda_i = 2\|x\|^2 = 2c^2$. Which is only possible if $\lambda_i >0$, in which case we have $c = \sqrt{\frac{\lambda_i}{2}}$ and $x = \sqrt{\frac{\lambda_i}{2}}u$.
So the stationary points are $0$ and all vectors of the form : $\sqrt{\frac{\lambda_i}{2}} u$, where $\lambda_i > 0$ is a positive eigenvalue of $A+A^T$ and $u$ a corresponding eigenvector with unit norm.
If $A+A^T$ does not have any positive eigenvalues $0$ is the only stationary point.