FINDING PYTHAGOREAN TRIPLE PRESERVING MATRICES

Leonard Palmer, Mangho Ahuja, and Mohan Tikoo

1. Introduction. When we multiply a Pythagorean triple with a 3 × 3 matrix we obtain another triple, but will it be Pythagorean? A problem posed in 1987 showed an example of a 3 × 3 matrix

A = ( \begin{matrix}2 & 1 & 2 \\ 1 & 2 & 2 \\ 2 & 2 & 3 \end{matrix} )

which converts a Pythagorean triple into a Pythagorean triple [1]. For example (3, 4, 5)A = (20, 21, 29), which is again a Pythagorean triple. Indeed one can verify that if (a, b, c)A = (d, e, f) and a^{2} + b^{2} = c^{2}, then d^{2} + e^{2} = f^{2}. In other words the matrix A “preserves” Pythagorean triples.

In this paper we will find matrices which “preserve” Pythagorean triples. To be specific, we will find necessary and sufficient conditions that a 3 × 3 matrix preserves Pythagorean triples. In the second paper we will discuss construction of matrices which play a prescribed role, i.e. given two Pythagorean triples, say X and Y, we construct a matrix A such that XA = Y.

2. Preliminary Definitions. We define a Pythagorean Triple (PT) as a triple (a, b, c) where a, b, and c are positive integers and c^{2} = a^{2} +b^{2}. If in addition, a, b, and c have no factor in common, the triple is called a Primitive Pythagorean Triple (PPT). By our definition both (3, 4, 5) and (4, 3, 5) are PPTs. To keep our analysis simple, it is necessary to distinguish between these two types. We will say (3, 4, 5) is of type A and (4, 3, 5) is of type B, i.e., a PPT (a, b, c) is of type A or type B according as a or b is an odd integer. Furthermore, we will denote them by PPTA and PPTB, respectively. A matrix that converts a PPT (of type A or B) into a PPT (of type A or B) will be called a Pythagorean Triple Preserving Matrix and will be denoted by PTPM. We note that the matrix A shown above converts a PPTA into a PPTB. The object of this paper is to find all PTPMs.

A long time ago, the Indian mathematician Brahmagupta (598-c665 AD) gave us the formula generating all PPTs. A triple (a, b, c) is a PPT if and only if (a, b, c) = (m^{2} − n^{2}, 2mn, m^{2} + n^{2}). The algebraic identity (m^{2} − n^{2})^{2} + (2mn)^{2} = (m^{2} + n^{2})^{2} shows that the triple satisfies the Pythagorean formula for every value of m and n. However, for (a, b, c) to be a PPT (see definition above), m and n must satisfy further conditions. These are listed as I–1 to I–4 below.

I–1. m and n are positive integers,

I–2. m > n,

I–3. gcd(m, n) = 1, and I–4. m + n ≡ 1 (mod 2).

For more details refer to [2, 3].

3. An Algebraic Identity. The centerpiece of our discussion is the following identity, presented here as a lemma.

\underline{Lemma 1}. Let r, s, t, u, m, n, M, and N be any real or complex numbers. Let

H = ( \begin{matrix}((r^{2} − t^{2}) − (s^{2} − u^{2}))/2 & rs − tu & ((r^{2} − t^{2}) + (s^{2} − u^{2}))/2 \\ rt − su & ru + st & rt + su \\ ((r^{2} + t^{2}) − (s^{2} + u^{2}))/2 & rs + tu & ((r^{2} + t^{2}) + (s^{2} + u^{2}))/2 \end{matrix} ) .

Then

(m^{2} − n^{2}, 2mn, m^{2} + n^{2})H = (M^{2} − N^{2}, 2MN, M^{2} + N^{2})  (i)

where M = mr + nt and N = ms + nu.

The proof of this identity is long and tedious but it is fairly routine and is therefore left to the reader. However, a few comments about this lemma are necessary. First, we note that equation (i) is an algebraic identity and no specific conditions on the nature of m and n or r, s, t, and u are imposed. Secondly, it shows that the matrix H converts a triple (m^{2} − n^{2}, 2mn, m^{2} + n^{2}) into a triple (M^{2} −N^{2}, 2MN, M^{2} +N^{2}). Lastly, the equations M = mr +nt, and N = ms+nu can be conveniently expressed as a matrix equation

(m, n) ( \begin{matrix}r & s \\ t & u \end{matrix} ) = (M, N).  (ii)

We know that the triple (m^{2} −n^{2}, 2mn, m^{2} +n^{2}) satisfies the Pythagorean formula, but is not a PPT (according to our definition) unless the pair (m, n) satisfies the conditions listed in I–1 to I–4 above. When this triple is multiplied by the matrix H, we obtain another triple (M^{2} − N^{2}, 2MN, M^{2} + N^{2}). Even if the pair (m, n) satisfies the conditions I–1 to I–4, the pair (M, N) may not, and hence will not be a PPT, unless suitable conditions on r, s, t, and u are imposed. Each of the conditions I–1 to I–4 on m and n will in turn impose restrictions on the variables r, s, t, and u. Discussion of this topic follows.

4. Finding Necessary Conditions on r, s, t, and u so that H is a PTPM. From equation (ii) we have

(m, n) ( \begin{matrix}r & s \\ t & u \end{matrix} ) = (M, N),

i.e., M = mr + nt and N = ms + nu.

Condition I–1 requires that M and N are positive integers. We know that m and n are positive integers. Thus, M and N will be positive integers if r and s are positive integers and |t| ≤ r and |u| ≤ s.

Condition I–2 requires that M > N. Again, M = mr + nt, N = ms + nu, and m > n. To obtain M > N, we need mr + nt > ms + nu or m(r − s) > n(u − t), i.e., we must have r − s ≥ u − t > 0. Adding s + t to both sides of the inequality, we have r + t ≥ s + u ≥ 0.

Condition I–3 requires that gcd(M, N) = 1. The authors posed this as a problem in the College Mathematics Journal [4].

\underline{Problem}. Given

(m, n) ( \begin{matrix}r & s \\ t & u \end{matrix} ) = (M, N),

find the necessary and sufficient conditions such that gcd(M, N) = 1, whenever gcd(m, n) = 1.

The solution is that

Δ = det ( \begin{matrix}r & s \\ t & u \end{matrix} ) = ±1.

However, if (m, n) satisfies the conditions listed in I–1 to I–4, the condition Δ = ±1 is not necessary. For example consider the matrix

( \begin{matrix}2 & 1 \\ 0 & 1 \end{matrix} ) .

It is not difficult to verify that if (m, n) satisfies I–1 to I–4, and

(m, n) ( \begin{matrix}2 & 1 \\ 0 & 1 \end{matrix} ) = (M, N),

then gcd(M, N) = 1. Yet the matrix shown has determinant 2. Thus, the condition Δ = ±1 is a sufficient condition, but by no means a necessary condition if the pair (m, n) satisfies conditions I–1 to I–4.

Condition I–4 requires that M + N ≡ 1 (mod 2). Now M + N = mr + nt + ms+nu = m(r+s)+n(t+u). If both r+s and t+u satisfy the conditions r+s ≡ 1 (mod 2) and t + u ≡ 1 (mod 2), then M + N = m + n ≡ 1 (mod 2).

We may summarize as follows. If the pair (m, n) satisfies the conditions I–1 to I–4 and

(m, n) ( \begin{matrix}r & s \\ t & u \end{matrix} ) = (M, N),

then the pair (M, N) will also satisfy the conditions I–1 to I–4 if the following four conditions are satisfied.

R–1. r, s, t, and u are integers, where r and s are positive, but t and u can be negative so long as r + t ≥ 0 and s + u ≥ 0 R–2. r + t ≥ s + u ≥ 0 R–3. Δ = ru − st = ±1 R–4. r + s ≡ 1 (mod 2) and t + u ≡ 1 (mod 2).

If the pair (m, n) satisfies I–1 to I–4 and r, s, t, and u satisfy R–1 to R–4, then the pair (M, N) obtained from the equation

(m, n) ( \begin{matrix}r & s \\ t & u \end{matrix} ) = (M, N)

will also satisfy I–1 to I–4. Consequently, the triple (M^{2} − N^{2}, 2MN, M^{2} + N^{2}) will be a PPT and the 3 × 3 matrix H will be a PTPM.

5. Converse. We now consider the converse statement that every PTPM must be of type H. We will show that if A is a 3×3 matrix and A converts a Pythagorean triple (m^{2}−n^{2}, 2mn, m^{2}+n^{2}) into a Pythagorean triple (M^{2}−N^{2}, 2MN, M^{2}+N^{2}), then A must be of the form H for some values of r, s, t, and u.

\underline{Proof of the converse}. Let

A = ( \begin{matrix}α_{1} & α_{2} & α_{3} \\ β_{1} & β_{2} & β_{3} \\ γ_{1} & γ_{2} & γ_{3} \end{matrix} )

and let us assume that A converts a Pythagorean triple into a Pythagorean triple, i.e.,

(m^{2} − n^{2}, 2mn, m^{2} + n^{2}) ( \begin{matrix}α_{1} & α_{2} & α_{3} \\ β_{1} & β_{2} & β_{3} \\ γ_{1} & γ_{2} & γ_{3} \end{matrix} ) = (M^{2} − N^{2}, 2MN, M^{2} + N^{2}).

Then

M^{2} − N^{2} = (m^{2} − n^{2})α_{1} + (2mn)β_{1} + (m^{2} + n^{2})γ_{1}  (iii)
2MN = (m^{2} − n^{2})α_{2} + (2mn)β_{2} + (m^{2} + n^{2})γ_{2}  (iv)
M^{2} + N^{2} = (m^{2} − n^{2})α_{3} + (2mn)β_{3} + (m^{2} + n^{2})γ_{3}.  (v)

Solving for M^{2} and N^{2} we get,

(vi)

M^{2} = m^{2} (\frac{α_{1} + α_{3} + γ_{1} + γ_{3}}{2} ) + mn(β_{1} + β_{3}) + n^{2} (\frac{γ_{1} + γ_{3} − (α_{1} + α_{3})}{2})

(vii)

N^{2} = m^{2} (\frac{α_{3} − α_{1} + γ_{3} − γ_{1}}{2} ) + mn(β_{3} − β_{1}) + n^{2} (\frac{γ_{3} − γ_{1} − (α_{3} − α_{1})}{2}) .

Let

\begin{matrix}r^{2} = (\frac{α_{1} + α_{3} + γ_{1} + γ_{3}}{2} ) , s^{2} = (\frac{α_{3} − α_{1} + γ_{3} − γ_{1}}{2} ) , \\ t^{2} = (\frac{γ_{1} + γ_{3} − (α_{1} + α_{3})}{2}) , and u^{2} = (\frac{γ_{3} − γ_{1} − (α_{3} − α_{1})}{2}) . \end{matrix}

Since the expressions on the right side of the equations (vi) and (vii) are perfect squares, the quantities r^{2}, s^{2}, t^{2}, and u^{2} are all positive. We now have M^{2} = m^{2}r^{2} + mn(β_{1} + β_{3}) + n^{2}t^{2} and N^{2} = m^{2}s^{2} + mn(β_{3} − β_{1}) + n^{2}u^{2}. Since the right side of the above two equations is a perfect square, for every choice of the pair (m, n) we have (β_{1} + β_{3})^{2} = 4r^{2}t^{2} and (β_{3} − β_{1})^{2} = 4s^{2}u^{2}. We will choose the signs of r, s, t, and u as follows. Let r and s be positive, but t will have the same sign as β_{1} + β_{3}, and u will have the same sign as β_{3} − β_{1}. Then β_{1} + β_{3} = 2rt and β_{3} − β_{1} = 2su, that is β_{1} = rt − su, and β_{3} = rt + su. Also, it follows that M^{2} = m^{2}r^{2} + 2mnrt + n^{2}t^{2}, i.e., M = mr + nt and N^{2} = m^{2}s^{2} + 2mnsu + n^{2}u^{2}, i.e., N = ms + nu.

Multiplying these values of M and N we get MN = m^{2}rs+mn(ru+st)+n^{2}tu. On comparing this with the value of MN from equation (iv), we get α_{2} + γ_{2} = 2rs, γ_{2} −α_{2} = 2tu, and β_{2} = ru+st. This yields γ_{2} = rs+tu and α_{2} = rs−tu. Now we will solve for the remaining elements of the matrix A. We have γ_{1} + γ_{3} = r^{2} + t^{2}, γ_{3} − γ_{1} = s^{2} + u^{2}, α_{1} + α_{3} = r^{2} − t^{2}, and α_{3} − α_{1} = s^{2} − u^{2}. From these equations we get

\begin{matrix}α_{1} = \frac{(r^{2} − t^{2}) − (s^{2} − u^{2})}{2}, α_{3} = \frac{(r^{2} − t^{2}) + (s^{2} − u^{2})}{2}, \\ γ_{1} = \frac{(r^{2} + t^{2}) − (s^{2} + u^{2})}{2}, and γ_{3} = \frac{(r^{2} + t^{2}) + (s^{2} + u^{2})}{2}. \end{matrix}

Putting it all together, the matrix A is given by

A = ( \begin{matrix}((r^{2} − t^{2}) − (s^{2} − u^{2}))/2 & rs − tu & ((r^{2} − t^{2}) + (s^{2} − u^{2}))/2 \\ rt − su & ru + st & rt + su \\ ((r^{2} + t^{2}) − (s^{2} + u^{2}))/2 & rs + tu & ((r^{2} + t^{2}) + (s^{2} + u^{2}))/2 \end{matrix} ) .

This concludes the proof.

The statement and the converse together give the following theorem.

\underline{Theorem 1}. A 3 × 3 matrix is a PTPM if and only if it is of the type H.

6. Conclusion. In this paper we have shown that all matrices which are PTPMs, i.e., preserve Pythagorean triples, must have the form H. Under the conditions listed in R–1 to R–4, the matrix H will convert a Pythagorean triple of type A into a Pythagorean triple of type A. These conditions are not necessary but are sufficient. In the second paper we will show how to construct Pythagorean Triple Preserving Matrices (PTPMs). We will also show how one can design a matrix which is not only a PTPM but converts a given PPT into another given PPT.

\underline{References}

1. Problem M-2, proposed by Steven Blasberg, The AMATYC Review, 9 (1987), 69.

2. D. M. Burton, Elementary Number Theory, Allyn and Bacon, Inc. Boston, MA, 1976.

3. L. E. Dickson, Theory of Numbers, Vol. II, Chelsea Pub. Co., New York, 1971.

4. Problem 454, proposed by Leonard Palmer, Mangho Ahuja, and Mohan Tikoo, The College Mathematics Journal, 23 (1992), 251.

Leonard Palmer Department of Mathematics Southeast Missouri State University Cape Girardeau, MO 63701

Mangho Ahuja Department of Mathematics Southeast Missouri State University Cape Girardeau, MO 63701 email: mahuja@semovm.semo.edu

Mohan Tikoo Department of Mathematics Southeast Missouri State University Cape Girardeau, MO 63701 email: mtikoo@semovm.semo.edu