# Matrix Pythagorean Triples

A Pythagorean triple is a list of positive integers (abc) such that a2b2c2. Euclid knew how to find all Pythagorean triples: pick two positive integers m and n with m > n and let

a = m2n2, b = 2mnc = m2 + n2.

Now what if we look at matrices with integer entries such that A2B2C2? Are there any? Yes, here’s an example: How can you find matrix-valued Pythagorean triples? One way is to create diagonal matrices with Pythagorean triple integers. Take a list of n Pythagorean triples (aibici) and create diagonal matrices A, B, and C with the ai along the diagonal of A, bi along the diagonal of B, and ci along the diagonal of C.

But that seems cheap. We’re really not using any properties of matrix multiplication other than the fact that you can square a diagonal matrix by squaring its elements. One way to create more interesting matrix Pythagorean triples is to start with the diagonal matrices described above and conjugate them by some matrix Q with integer entries such that Q-1 also has integer entries. Here’s why that works: The example above was created by starting with the Pythagorean triples (3, 4, 5) and (5, 12, 13), creating diagonal matrices, and conjugating by This gives a way to create lots of matrix Pythagorean triples, but there may triples that this procedure leaves out.

## 9 thoughts on “Matrix Pythagorean Triples”

1. Jan Van lent

Your procedure is equivalent to applying the conjugation idea to construct matrices m and n and then putting them into Euclid’s formulas. The standard way of checking that Euclid’s formulas give a Pythagorean triple works for matrices, but only if we assume the matrices m and n commute. This is why the same Q has to be used to form both.

The standard correspondence for positive real number is symmetric positive definite matrix. Here this means choosing positive integers for the diagonal matrices to construct m and n where the diagonal elements also have to satisfy the inequality. It may be interesting to allow zeros and symmetric positive semi-definite matrices.

2. Small typo in “Now what if we look at matrices with integer entries such that A^2 + B^2 = C?” — should be C^2, right?

3. peteris.daugulis

Try to prove/disprove the matrix analogue of the Fermat’s Last theorem :)

4. JDS Purohit

so given integer pythagorean triplets, we can find infinitely many matrix pythagorean triplets.

now is there a reverse construction or relation?

5. Jan Van lent

It may be that for every matrix Pythagorean triple, the matrices A, B and C will commute (i.e., they will share a matrix of eigenvectors Q) and the corresponding eigenvalues will be standard Pythagorean triples.

6. Not all 2×2 matrix Pythagorean triples can be constructed as John describes. The following family of counterexamples is, regrettably, very boring. Take any matrix M, let (a,b,c) be an ordinary Pythagorean triple; then (aM)^2 + (bM)^2 = (cM)^2. This is true, in particular, even when M is not the result of conjugating a diagonal matrix with something in SL2(Z); for instance, take M = [1 1; 0 1] or, I think, [1 1; -1 1].

Here’s a marginally less boring sort-of-counterexample: take A = [1 0; 0 1] and B = [0 1; -1 0]; then A^2 + B^2 = 0 = 0^2. Perhaps that’s a cheaty counterexample because C is the zero matrix, in which case take C = [0 1; 0 0] instead.

Perhaps John’s construction yields all the possible *symmetric positive definite* matrix Pythagorean triples? I suspect not, but with little confidence.

7. Dr Hammer