Is there a way to calculate the eigenvalues of $xx^T+yy^T$? As the title shows, is there a way to calculate the eigenvalues of $A\equiv \vec x\vec x^T+\vec y \vec y^T$, where $\vec x$ and $\vec y$ are two linearly independent vectors in $\mathbb{R}^n$(don't have to be unit vector).
Here're some of my thoughts. We can see that $A$ is of rank 2 since it can be seen as a map from $\mathbb{R}^n$ to $\mathbb{R}^n$ and there are only two linearly independent vectors in its range. So we may set the eigenvectors of $A$ as $a\vec x+b\vec y$, where $a$ and $b$ are two real numbers, then we have chances to get the eigenvalues by solving $$A(a\vec x+b\vec y) =\lambda (a\vec x+b\vec y)\tag{1}.$$
For example, if $\vec{x}=\frac{1}{\sqrt{2}}\left( \begin{array}{c}
 1\\
 1\\
\end{array} \right) , \vec{y}=\left( \begin{array}{c}
 1\\
 0\\
\end{array} \right) $, we can solve eq(1) to get the eigenvalues $1\pm \frac{1}{\sqrt 2}$. But eq(1) only have two equations while with 3 parameters $a,b,\lambda$.
So my question is: is there a way to calculate the eigenvalues of $xx^T+yy^T$, such as a formula related to $\vec x$ and $\vec y$ that I don't know?
 A: Your idea is fine. You  may write your product in the following way:
$$ (xx^T + y y^T) \pmatrix{x & y}\pmatrix{a\\b} =\pmatrix{x & y}\pmatrix{x^T \\ y^T} \pmatrix{x & y} \pmatrix{ a\\b}$$
which then becomes $$\pmatrix{x & y}\pmatrix{x^T x & x^T y \\ y^Tx &y^T y} \pmatrix{ a\\b}.$$
In the (sub-)basis $(x,y)$ the problem thus reduces to finding the eigenvalues of $$\pmatrix{x^T x & x^T y \\ y^Tx &y^T y}.$$
The vectors $x$ and $y$ need not be independent, in which case zero may appear as an eigenvalue.
More generally if $A = \sum_i x_i \ell_i^T$ then in the vector space spanned by the $(x_j)$'s the action of $A$ reduces to the matrix: $A_{ij}= \ell_i^T(x_j)$ which you then have to treat. Again the $(x_j)$'s (and the $(\ell_i)$'s need not be linearly independent.
A: $
\def\a{\alpha}\def\b{\beta}\def\g{\gamma}\def\l{\lambda}
\def\c#1{\color{red}{#1}}
\def\m#1{\left[\begin{array}{r}#1\end{array}\right]}
$Define the variables
$$\eqalign{
Z &= \m{x&y},\qquad &c=\m{a\\b} \\
A &= ZZ^T,\qquad &w=Zc \;=\;  ax+by \\
}$$
Consider the eigenvalue equation
$$\eqalign{
Z^TZc &= \l c \\
}$$
Multiplying by $Z$ recovers the original eigenvalue equation
$$\eqalign{
ZZ^T\c{Zc} &= \l\c{Zc} \\
A\c{w} &= \l\c{w} \\
}$$
If we define further variables
$$\eqalign{
Z^TZ &= \m{\a&\g\\ \g&\b},\quad
\a=x^Tx,\quad\b=y^Ty,\quad\g=x^Ty \\
}$$
Then the eigenvalues of $Z^TZ$ can be calculated
as the roots of a simple quadratic equation
$$\eqalign{
&\det(Z^TZ-\l I) 
  \;=\; \l^2-(\a+\b)\l+(\a\b-\g^2) \;=\; 0 \\
&\l_{\pm} = \frac{(\a+\b)\pm\sqrt{(\a-\b)^2+4\g^2}}{2} \\
}$$
