The identity $(A-\lambda I)(A-\mu I)=xx^T$ for a symmetric matrix A. If $A$ is a symmetric matrix with exactly 3 distinct eigenvalues $\lambda, \mu$ and $\rho$, where $\rho$ is simple eigenvalue and $x$ is its eigenvector, then under which conditions the matrix identity from the title is valid?
It should hold if $A$ is non-negative and $\rho$ is the largest eigenvalue, but it seems that some modification can hold in other cases.
 A: Consider the eigenvalue decomposition, then 
\begin{align}(A-\lambda I)(A-\mu I)&=Q\begin{bmatrix} \rho-\lambda & & \\ & 0 & \\ & & \mu-\lambda \end{bmatrix} \begin{bmatrix} \rho-\mu & & \\ & \lambda - \mu & \\ & & 0\end{bmatrix} Q^T \\
&=Q\begin{bmatrix} (\rho-\lambda)(\rho-\mu) & & \\ &0 & \\ & & 0\end{bmatrix} Q^T  \\
&= (\rho-\mu)(\rho-\mu)q_1q_1^T\end{align}
We require $(\rho - \mu)(\rho - \mu) > 0$, hence $\rho$ is either the largest or the smallest eigenvalue.
A: Yes. You can verify it by noticing that
$$
(A-\mu I)(A-\lambda I) = (A-\lambda I)(A-\mu I)
$$
and that, if $\{y,v_1,v_2,\dots,v_{n-1}\}$ is an orthonormal basis of eigenvectors, where $x$ is associated to $\rho$, and $v_i$ are associated to either $\lambda$ or $\mu$, then
$$
(A-\lambda I)(A-\mu I)v_i = (A-\mu I)(A-\lambda I)v_i =  0,
$$
$$
 (A-\lambda I)(A-\mu I)y = (\rho - \lambda)(\rho-\mu)y.
$$
If now $x= \sqrt{(\rho - \lambda)(\rho-\mu)} y$, then $(A-\lambda I)(A-\mu I) = xx^T$.
NOTICE: This holds even if $(\rho - \lambda)(\rho-\mu)<0$, only $A$ will not be positive semidefinite
