If $x$ and $y$ are two linearly independent column $n$-vectors how can I find all the eigenvalues of $xx^{T}-yy^{T}$ If $x$ and $y$ are two linearly independent column $n$-vectors where $n\geq2$ .find all the eigenvalues of $xx^{T}-yy^{T}$
I know that because the matrix $xx^T-yy^T$ has rank $2$. So $n-2$ of the eigenvalues are $0$, and the other two eigenvectors have to lie in the column space of $xx^T-yy^T$, which is $\text{span}\{x,y\}$.
I supposed $z = \alpha x + \beta y$ is an eigenvector of $xx^T-yy^T$ for some constants $\alpha$ and $\beta$ ,but I can’t find $\alpha$ and $\beta$ such that $(xx^T-yy^T)z = \lambda z$
 A: Every step you did is correct and in the right direction. What is left is to compute $\alpha$ and $\beta$. To do so we just plug $z$ in and see what comes out
$$
(xx^T-yy^T)z = \lambda z \\
(xx^T-yy^T)z = \left(\alpha\lVert x \rVert^2 + \beta \langle x,y \rangle\right)x + \left(- \beta \lVert y \rVert^2 - \alpha \langle x,y \rangle \right)y
$$
where $\langle x,y \rangle = x^Ty = y^Tx$ is the scalar product and $\lVert x \rVert^2 = x^Tx$ norm. If we want $z$ to be eigenvector the following must hold
$$
\lambda \alpha = \alpha\lVert x \rVert^2 + \beta \langle x,y \rangle \\
\lambda \beta = -\beta \lVert y \rVert^2 - \alpha \langle x,y \rangle
$$
The first equation come from comparing the $x$ component, the second from $y$. There is an easy special case for $\langle x,y \rangle = 0$. For $\langle x,y \rangle \neq 0$ we can eliminate $\lambda$ and get a quadradic equation in $t = \alpha/\beta$. Solving this equation, we get two possible values of $t$ and consequently two eigenvalues.
Please note that any nonzero multiple of eigenvector is also eigenvector which is why only the ratio $\alpha/\beta$ is needed, not the specific values of $\alpha$ and $\beta$.
A: Using the identity
\begin{align*}
\lambda^n\det(\lambda I_{(m)} - AB) = \lambda^m\det(\lambda I_{(n)} - BA)
\end{align*}
for $A \in F^{m \times n}$ and $B \in F^{n \times m}$,
we can calculate the characteristic polynomial of $xx^T - yy^T$ by setting $A = (x, y) \in F^{n \times 2}$ and $B = (x^T, -y^T)^T \in F^{2 \times n}$ directly as:
\begin{align*}
\varphi(\lambda) &= \det(\lambda I_{(n)} - (xx^T - yy^T)) = 
\lambda^{n - 2}\det\left(\lambda I_{(2)} - \begin{pmatrix} x^T \\ -y^T \end{pmatrix}\begin{pmatrix} x & y \end{pmatrix}\right) \\
&= 
\lambda^{n - 2}\begin{vmatrix}
\lambda - x^Tx & -x^Ty \\
y^Tx & \lambda + y^Ty
\end{vmatrix} \\
&= \lambda^{n - 2}[(\lambda - x^Tx)(\lambda + y^Ty) + (x^Ty)^2] \\
&= 
\lambda^{n - 2}(\lambda^2 - (x^Tx - y^Ty)\lambda - (x^Txy^Ty - (x^Ty)^2))
\end{align*}
Since $x$ and $y$ are linearly independent, by Cauchy-Schwarz inequality $(x^Tx)(y^Ty) > (x^Ty)^2$ (that is, the equality of C-S inequality cannot hold), whence the determinant $\Delta$ of the quadratic equation $\lambda^2 - (x^Tx - y^Ty)\lambda - (x^Txy^Ty - (x^Ty)^2) = 0$ equals to
\begin{align*}
\Delta = (x^Tx - y^Ty)^2 + 4(\|x\|^2\|y\|^2 - (x^Ty)^2) > 0.
\end{align*}
Hence the two non-zero eigenvalues are two distinct real numbers
\begin{align*}
\lambda_1 = \frac{y^Ty - x^Tx + \sqrt{\Delta}}{2}, \quad 
\lambda_2 = \frac{y^Ty - x^Tx - \sqrt{\Delta}}{2}.
\end{align*}
