Here is a question I heared from others:


Given four distinct positive real numbers $a\_1,a\_2,a\_3,a\_4$ and set $$a:=\sqrt{\sum\_{1\leq i\leq 4}a\_i^2}$$
$A=(x\_{i,j})\_{1\leq i\leq3,1\leq j\leq4}$ is a $3\times4$-matrix specified by $$ x\_{i,j}=a\_i\delta\_{i,j}+a\_j\delta\_{4,j}-\frac{1}{a^2}(a\_i^2+a\_4^2)a\_j $$
where $\delta\_{i,j}$ is the Kronecker symbol or visually
$$ A=\begin{pmatrix}a\_1 &0&0&a\_4\\ 0&a\_2&0&a\_4\\0&0&a\_3&a\_4\end{pmatrix}-\frac{1}{a^2}
\begin{pmatrix} 
a\_1(a\_1^2+a\_4^2) & a\_2(a\_1^2+a\_4^2) & a\_3(a\_1^2+a\_4^2) & a\_4(a\_1^2+a\_4^2)\\
a\_1(a\_2^2+a\_4^2) & a\_2(a\_2^2+a\_4^2) & a\_3(a\_2^2+a\_4^2) & a\_4(a\_2^2+a\_4^2)\\
a\_1(a\_3^2+a\_4^2) & a\_2(a\_3^2+a\_4^2) & a\_3(a\_3^2+a\_4^2) & a\_4(a\_3^2+a\_4^2)\\
\end{pmatrix} $$


**The question is to show that the $3\times3$-matrix $B=AA^T$ admits three distinct eigenvalues**.($A^T$ is the transpose of $A$)


What I am curious about is how many methods can be utilized to show a matrix has different eigenvalues?


As for this question my idea is to calculate the characteristic polynomial $f$ of $B$ along with $f'$ which is a quadratic polynomial via Sagemath and show that neither of roots of $f'$ belongs to $f$. Or equivalently to calculate the resultant $R(f,f')$ of $f$ and $f'$ and show that $R(f,f')$ doesn't vanish for any distinct positive $a\_i$'s.


But the difficulties are both ways involve hideous calculation which I don't think I can write down by hand. So I'm wondering if there is a tricky way to get to that point? (e.g. an algebraic-geometry method?)



How to show a $3\times3$ matrix has three distinct eigenvalues?
To answer on methods applicable here (and elaborate on comments I made). The most promising is to use a surprisingly little-known theorem that says that the discriminant $D$ of a symmetric $n\times n$ matrix $A=(a\_{ij})$ with eigenvalues $\lambda\_1,\dots,\lambda\_n$, i.e.
$$ D\_A=\prod\_{1\leq i<j\leq n} (\lambda\_i-\lambda\_j)^2,$$
is a sum of squares in the ring $\mathbb{R}[a\_{11},a\_{12},\dots,a\_{nn}]$ (notice that $D\_A$ is nonnegative, as all $\lambda\_k$ are real).
This has been proved independently by a number of authors, e.g. in a [paper](https://onlinelibrary.wiley.com/doi/abs/10.1002/%28SICI%291097-0312%28199811/12%2951%3A11/12%3C1387%3A%3AAID-CPA6%3E3.0.CO%3B2-0#) by P.Lax.


An explicit formula for such an expression for $n=3$ may be found in Sect. 4 of B.Parlett's
[paper](https://doi.org/10.1016/S0024-3795(02)00335-X).


This is a rather surprising result for everyone familiar with the fact that most nonnegative multivariate polynomials are not sums of squares (this topic has history going back to a famous paper by Hilbert from 1888).


