[Math] How to construct a $4 \times 4$ symmetric, positive definite matrix with integer eigenvalues

eigenvalues-eigenvectorsintegerslinear algebramatricespositive definite

As part of my master thesis I'm trying to construct (or find) some $4 \times 4$ symmetric, positive (semi-)definite matrices with integer components, and integer eigenvalues. The reason for the integer conditions is purely aesthetical, since typesetting the matrix and many analytical calculations look nicer with integer scalars.

I'm aware of answers such as https://math.stackexchange.com/a/1377275/245055, but the problem is that this does not produce a symmetric matrix.

Any guidance will be greatly appreciated, as I would very much prefer not having to search for this by brute force or via code (which might potentially produce false positives due to numerical precision issues).

Best Answer

You can use the trick from this paper to find orthogonal matrices with rational entries: $(S-I)^{-1}(S+I)$, where $S$ is skew-symmetric with integer entries. Then you can use these for similarity transforms of diagonal matrices $D$ with integer entries, and multiply by the determinants to get back to integers; all together:

$$ \det(S+I)^2(S+I)^{-1}(S-I)D(S-I)^{-1}(S+I) $$

where $S$ is skew-symmetric, $D$ is diagonal and both have integer entries.

Related Question