<s>[INST] 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$
 [/INST] 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*}
</s>