Spectrum of a three-dimensional matrix with zero row sums (source code)

= Spectrum of a three-dimensional matrix with zero row sums

Consider
$$
B=\begin{pmatrix}-(a+b)&a&b\\c&-(c+d)&d\\e&f&-(e+f)\end{pmatrix}.
$$
Its row sums vanish, so $(1,1,1)^T$ is an <eigenvector> for the <zero eigenvalue>. Its <characteristic polynomial> is
$$
\det(\lambda I-B)=\lambda(\lambda^2+S\lambda+T),\qquad S=a+b+c+d+e+f,
$$
with sum of <principal minors> of order two
$$
T=ad+bc+bd+ae+af+bf+ce+cf+de.
$$
The other <eigenvalues> are $(-S\pm\sqrt{S^2-4T})/2$. No symmetry is required for this formula; <positive diagonal symmetrization of a matrix> is a sufficient condition for real roots.