Pythagorean triangles and simplices

Ancient Greek mathematics had whole numbers, that show up in counting and in the ratios of lengths of strings on a lyre whose sounds go nicely together, so naturally started out doing what it could with those. In geometry it was clearly possible to repeat a length any whole number of times to obtain a length that was a multiple of the one you started with; and, given that, it turns out to be quite easy to likewise subdivide a length into any (positive) whole number of equal pieces. By combining these, one can get a vast diversity of lengths from a given length; indeed, given any two distinct lengths it's posssible to scale and evenly subdivide any other length to obtain one whose length lies between those two distinct lengths, no matter how close together they may be. That, at least, means that scaling and subdividing one given length can get you arbitrarily close to any other. Two lengths are said to be rationally commensurate if scaling and subdividing one can deliver the other. A question naturally arises: are all lengths rationally commensurate ? Does getting arbitrarily close mean that you can necessarily get exact ?

As we'll shortly see, Pythagoras' theorem shows that some triangles have sides whose lengths are not rationally commensurate. That then opens up the question of which right-angle triangles' sides do have rationally commensurate lengths, which I'll explore in detail.

An awkward example

Let's start by looking (as the greeks did) at an isosceles right-angle triangle – that is, one whose two perpendicular sides are of equal length. The squares on those two equal sides are equal and Pythagoras then tells us that the square on the hypotenuse has area equal to their sum, hence to twice either of them.

Let S be the length of either perpendicular side of our isosceles right-angle triangle and consider any length L rationally commensurate with it. Being rationally commensurate means that subdividing S into some whole number q of equal parts and then repeating one of those parts some whole number p of times will give us L. If the length of each of those parts is U, we have S = q.U and L = p.U; whence the area of a square on L is p.p.U.U while the area of a square on S is q.q.U.U and twice this is 2.q.q.U.U. For the hypotenuse to be rationally commensurate with the perpendicular sides, we'd need p.p.U.U to be equal to 2.q.q.U.U for some whole numbers p and q; since U.U is non-zero we can divide each by it to conclude that we'd need p.p to equal 2.q.q – which is purely a statement about the arithmetic of whole numbers. Thus we can reduce our geometric question, of whether the hypotenuse can be rationally commensurate with the two perpendicular sides, to: can doubling the square of one positive whole number give us the square of another ?

We could prove that can't happen by reasoning from the uniqueness of prime factorisation, but let's take a more primitive approach. Every positive whole number is either odd or even; if it is even, it is twice some strictly smaller positive whole number, half the one we started with. As long as we get an even result we can keep halving, getting a strictly smaller positive whole number each time; and there are only finitely many positive whole numbers less than the one we started with, so we must eventually run out of factors of two, after finitely many halvings. Since we only stop on an odd number, we thus express our original number as some odd number times power(i, 2) for some natural i, known as the multiplicity of 2 as a factor of our original number. For an odd number, i is zero, for an even number that's not a multiple of four it's one, for multiples of four but not eight it's two, and so on. The result of multiplying an odd number by an odd number is an odd number, so the result of squaring our original number is an odd square times the square of power(i, 2), which is power(2.i, 2); thus 2 has even multiplicity as a factor of any perfect square. Since doubling a perfect square thus results in a number of which 2 has an odd multiplicity, and no odd number is even, the result of doubling a perfect square is never a perfect square.

Taking this purely arithmetic result back to our isoscelese right-angle triangle, we find that no length rationally commensurate with that of one of its perpendicular sides is a side of a square with twice the area of the square on one of those perpendicular sides. Since the square on the hypotenuse does have area twice that of the square on either perpendicular side, the hypotenuse of an isosceles right-angle triangle is not rationally commensurate with that triangle's perpendicular sides.

In particular, there exist lengths that are not rationally commensurate.

The rest of this page is devoted to the study of right-angle triangles – and their higher-dimensional peers, the simplices – whose sides are rationally commensurate. That shall, in due course, let us see how close to isosceles a right-angle triangle can be.

Pythagorean triangles

I'll describe a right-angle triangle as pythagorean precisely if its sides' lengths are rationally commensurate. (One may likewise pose the corresponding question for non-right angles.) A pythagorean triple is a set of three whole numbers in which the squares of two sum to the square of the third: these can be construed as the lengths of the sides of a pythagorean triangle. Where several pythagorean triples have the same largest member (hypotenuse), their lower members identify whole-number co-ordinates for distinct points on a circle with that largest member as radius.

Rationally commensurate

If one length is rationally commensurate with another, duplicating the first one number of times and the second another number of times will produce lines of equal length, if we chose the numbers correctly; equivalently, sub-dividing each into suitably many equal pieces will yield a unit for which each is obtained by duplicating the unit. Thus being rationally commensurate is a symmetric relationship. If lengths K and L are rationally commensurate and L is also rationally commensurate with M, then there are some whole numbers k and m for which dividing L into k equal parts gives a length that, when duplicated enough, yields K; while dividing L into m equal parts gives a unit of which M is a multiple. So dividing L into k.m equal parts gives a length of which both K and M are multiples; thus K and M are also rationally commensurate and rationally commensurate is transitive. Since it is fatuously reflexive (every length is rationally commensurate with itself), rationally commensurate is thus an equivalence relation.

To classify pythagorean triangles, it suffices to consider the case where our right-angle triangle's lengths are all whole multiples of some given unit; this reduces our description of the triangle to three whole numbers. The question thus reduces to finding cases where one perfect square (that is, the square of a whole number) is equal to the sum of two others. We've shown, above, that those two must be distinct.

Scaling a pythagorean triangle necessarily produces a pythagorean triangle; just scale the unit used for the original to get a unit that describes the scaled triangle's sides using the same numbers, whose squares haven't changed so still satisfy Pythagoras's equation. Sub-dividing our unit likewise just increases the numbers we use to describe the lengths of the edges, all by some common factor i, a whole number; if n.n +m.m = k.k then, i.n.i.n +i.m.i.m = i.k.i.k, so any whole-number scaling of a solution to our problem is, trivially, another. So we can scale up our three whole numbers by a common factor to turn one solution into another, albeit one that's not interestingly different.

Given that we can do this, it's sufficient to classify the solutions that have no common factor, since all others can be obtained from these by such scalings. If two of the sides share a common factor i then their squares have i.i as a common factor; hence the sum or difference of thsese squares, which is the square of the other side, also has i.i as a factor; hence the other side has i as a factor. Thus any common factor of two of the sides is in fact a common factor of all three, so we only need to consider cases where no two sides have any common factor; the three sides are mutually comprime.

Odd and even

In particular, at most one of the sides has two as a factor so at least two sides have odd lengths. Any odd number is 2.n +1 for some whole number n; its square is then (2.n).(2.n) +2.(2.n) +1 = 4.n.n +4.n +1 = 4.n.(n+1) +1. Of any two adjacent whole numbers, such as n and n+1, one is odd and the other is even; so n.(n+1) is even and 4.n.(n+1) is a multiple of eight. Thus the square of any odd number is one more than a multiple of eight; so the two odd sides have squares whose difference is a multiple of eight and whose sum is two more than a multiple of eight; one of these is the square of the other side, which thus isn't one more than a multiple of eight, so that other side isn't odd.

Given that the square of an odd number is one more than a multiple of eight, the square of twice an odd number is four more than a multiple of (thirty-two, hence also of) eight. All other even numbers are multiples of four so have squares that are multiples of 16, hence in particular of eight. Thus no whole number's square is two more than a multiple of eight, so the sum of two odd squares is never a perfect square. So our pythagorean equation n.n +m.m = k.k, in which two terms are one more than multiples of eight, must have these two terms on opposite sides of the equation with the remaining term equal to a multiple of eight; i.e. the hypotenuse is odd, as is one of the other two sides, and the remaining side's square is a multiple of eight.

One square is a multiple of eight: thus two has multiplicity at least three as a factor of that square. As two has even multiplicity as a factor of every perfect square, this at least three must in fact be at least four, the smallest even number that's at least three. This makes the even square a multiple of 16 and the side it's a square of a multiple of four. So our hypotenuse is odd, as is one of the other sides, and the remaining side is a multiple of four.

Classification

many pythagorean hypotenuses Suppose, then, that m is the multiple of four, with k and n odd; we have n.n = k.k −m.m = (k +m).(k −m) with k, n, m coprime. As k and m are coprime and m is even, k ±m are also coprime (had k and m both been odd, k ±m would have shared two as a common factor); and their product is n.n, a perfect square. With {x, y} = {k ±m} in either order, any prime factor p of x is a prime factor of x.y = n.n hence also of n, hence has even multiplicity as a factor of n.n = x.y; but p is not a factor of y, hence p in fact has even multiplicity as a factor of x; thus the prime factorisation of x only has even multiplicities for its prime factors and x is a perfect square. Thus k ±m are mutually coprime odd perfect squares.

In particular, the two odd numbers whose squares are k ±m have product n; and we can obtain k and m from them as the mean and half-difference of their squares. Thus, for any coprime pythagorean triangle, there are naturals u, v with v > u for which k +m = 4.v.(v+1) +1, k −m = 4.u.(u +1) +1 so:

Furthermore, for any naturals u, v, we can compute k, m and n as above; they might not be coprime, but they do always satisfy n.n = (k +m).(k −m) = k.k −m.m hence k.k = n.n +m.m, so they do describe a pythagorean triangle, even if it's not coprime. (For example, [v,u] = [4,1] yields [45,36,27] which just scales the familiar [5,4,3] from [v,u] = [1,0] by a factor of 9.) Every pythagorean triangle is a whole multiple of some triangle generated in this way. Note that the hypotenuse, k, is always one more than a multiple of four (since both u.(u+1) and v.(v+1) are even; which also ensures m is a multiple of four).

If your browser supports SVG (and CSS floats), you should see the first 58 distinct hypotenuses (with short side horizontal and intermediate side vertical) depicted at right (possibly above); these are all the examples with 0 ≤ u < v < 12.

One consequence of this classification is that the set of pairs of rationals whose sum is 1, i.e. the set of points on the unit circle of the two-dimensional rational plane, is countable – it is a union of two images (using the perpendicular sides above in each order) of the set of pairs of naturals [u, v], via the combinations of them used to make the two perpendicular sides above. These give us (countably many) angles whose Sin and Cos are rational. (Technically, these are all in the first quadrant (from zero through a quarter turn); we can add and subtract them to obtain angles in the full range, still with rational Sin and Cos – but this in fact necessarily just gives the same set of angles as adding multiples of a quarter turn to the ones obtained directly, since each implies a pythagorean triangle, albeit potentially in other quadrants.) While this set of angles is (though I have not shown this) dense in the turn, it leaves plenty of gaps in the unit circle of the rational plane; e.g. the line {[r, r]: r is a positive rational} runs from [0,0] inside the unit circle to outside that circle but has no intersection with the circle.

Euclid's formulæ

The constraint on our parameterisation, v > u, can be re-written by taking v = u +1 +w for some natural w; so v.(v +1) = (u +w +1).(u +w +2) = u.u +2.u.w +w.w +3.u +3.w +2. We then get

k = 2.(v.(v +1) +(u +1).u) +1
= 4.u.u +4.u.w +2.w.w +8.u +6.w +5
= (2.u).(2.u) +2.(2.u).w +2.w.w +4.(2.u) +6.w +5
= (2.u +w +2).(2.u +w +2) +(w +1).(w +1),
m = 2.(v.(v +1) −(u +1).u)
= 2.(2.u.w +w.w +2.u +3.w +2)
= 2.(2.u.(w +1) +w.(w +1) +2.(w +1))
= 2.(2.u +w +2).(w +1) and
n = (2.v +1).(2.u +1)
= (2.u +2.w +3).(2.u +1)

which is rather messier, but applies for any pair u, w of naturals, u and w. In particular, we see that the hypotenuse, k, of a coprime pythagorean triple is itself a sum of two squares – and, indeed, of an odd square and an even square.

If we write p = 2.u +w +2 = v +u +1, q = w +1 = v −u, this last form of the formulæ becomes k = p.p +q.q, m = 2.p.q, n = p.p −q.q. This formulation is known as Euclid's formulæ and works for any p and q with p > q. It only gives coprime results if p and q are coprime, with odd difference; that gives u = (p −q −1)/2, v = u +q.

3blue1brown has a video explaining this and depicting the result. This includes the delightful observation that any pair of whole numbers p, q can be represented as the complex number p +q.i (with i.i + 1 = 0) whose magnitude is √(p.p +q.q); it square, p.p −q.q +2.i.p.q, thus has magnitude p.p +q.q, which is necessarily a whole number.

In Euclid's formula, we have p = v +u +1 = w +2.u +2 and q = v −u = w +1; these imply p +q = 2.w +2.u +3 and p −q = 2.u +1, still with k = p.p +q.q, m = 2.p.q and n = p.p −q.q. Mathologer points out that, from a triangle described by p −q, q, p, p +q in this way, there are matching triangles that can be obtained from

with b > a > 0 whenever p > q > 0 and a coprime to b whenever p is coprime to q. Going in the opposite direction (recovering p, q from a, b):

in which we always get the same four values, possibly shuffled and with some signs flipped – just what we need to recover p, q positive; and, for any positive a, b with a < b, there's a unique choice of which of these three reversals gets both p and q positive with p > q. If 2.a > b, we use the first; for 2.a < b < 3.a the second, otherwise the last. In each case, p is coprime to q precisely if b is coprime to a and a > 1. However, b > a > 0 with a coprime to b allows the possibility a = 1, coprime to everything, notably 2 and 3, the boundary values at which we would change between which of the three to use. For a = 1, b = 3 (implying k = 10, m = 6, n = 8, a scaled version of 5, 4, 3) we get q = 1 = p (implying k = 2, m = 2, n = 0); for a = 1, b = 2 (implying the well-known k = 5, m = 4, n = 3) we get q = 0, p = 1 (implying k = 1, m = 0, n = 1). In each case, stepping back from (a form of) the 5, 4, 3 triangle gets us the degenerate right-angled triangle with a zero side perpendicular to a side equal to the hypotenuse, with q in {p, 0} failing to satisfy the requirement p > q > 0.

The fun thing is that these steps between generators for pythagorean triples suffice to generate all distinct triples, starting from the p = 2, q = 1 generator of the simplest of them all. Using the same forward step at each iteration will either take you towards one side being tiny compared to the other two (which differ in length by 1 on one side or 2 on the other), or towards ever-more-nearly isoscelese triangles (with ever longer perpendicular sides differing in length by 1). As a bonus, if q and p are consecutive members of the Fibonacci sequence, then k is in that sequence.

Other moduli

Every coprime triple is [k, m, n] given, for some naturals u, w, by:

Our choice of parmeterisation by natural u, w ensures k and n are odd while m is a multiple of four; so they don't share a factor of two. Let's consider what their remainders on division by other numbers may be. In particular, let's see how this constrains u, w for the triple to be coprime. As before, I'll also use p = 2.u +w +2 and q = w +1 where they simplify what I need to write.

If n is a multiple of any odd prime z, whence p = i.z ±q for some odd i, we have k = i.i.z.z ±2.i.z.q +2.q.q and m = 2.i.z.q ±2.i.q, whence p = ±q modulo z implies k = ±m modulo z.z, with the same sign.

For the largest member of a coprime triple to be a multiple of any prime z (necessarily odd, since the largest member of a coprime triple is never even), there must be non-zero perfect squares modulo z that are each other's negation, m.m = −n.n. As z is prime, the multiplication of non-zero values modulo z is a group, so m has a multiplicative inverse i, yielding n.n.i.i = −m.i.m.i = −1, so the arithmetic modulo z has a square root of −1. This happens precisely when z is one more than a multiple of four. So only primes one more than a multiple of four can appear as factors of the largest member of a coprime triple.

Modulo 3 or 9

The square of a multiple of three is a multiple of 9; any other number's square is one more than a multiple of three. Adding two of the latter gives two more than a multiple of three, which can't be a perfect square, so one of the two shorter sides must be a multiple of three; for a coprime triple, this means the other two are not. In particular, no coprime triple's largest member is a multiple of 3. Modulo 9, their squares must be equal; these shall be 1, 4 or 7 = −2, the squares of ±1, ±2 and ±4, respectively.

If p is a multiple of 3, so is m (making it a multiple of 12) and, modulo 9, k and −n are both q.q; for a coprime triplet, q is not a multiple of 3 so k = −n is one of 1, 4 or 7 modulo nine.

If q is a multiple of 3, so again is m (making it a multiple of 12) and, modulo 9, k and n are both p.p; for a coprime triplet, p is not a multiple of 3 so k = n is one of 1, 4 or 7 = −2.

The remaining case, with neither p nor q a multiple of 3, makes n a multiple of 3, hence p = ±q modulo 3 and k = ±m modulo 9, with the same sign, and k is one of 2, 5 = −4 and 8 = −1 modulo 9.

Modulo 5 or 25

Modulo 5, (: power(2) |5) = [0, 1, −1, −1, 1] and the potential values for [k.k, m.m, n.n] are ±[0, 1, −1], ±[1, 1, 0] and ±[1, 0, 1]; so at least one member of any pythagorean triple is a multiple of five. If the multiple of 5 is the biggest, one of the smaller members is ±1 and the other is ±2 modulo 5. If the multiple of five isn't the biggest, then either the other two are both in {±1} or both are in {±2} modulo 5.

When n is a multiple of 5, so p = ±q modulo 5 and k = ±m modulo 25, a coprime triple won't have both p and q multiples of 5, so neither is; and we get m = 2.p.q = ±2.q.q modulo 5 and both k and m are in {±2} modulo 5, so [k.k, m.m, n.n] is [−1, 0, −1], without the ± initially considered.

When m is a multiple of 5 (hence also of 20) we have either p or q a multiple of 5, whence k = ±n modulo 25 (not just modulo 5).

When k is a multiple of 5, so p.p = −q.q, a coprime triple has one of p, q in {±1} and the other in {±2}, modulo 5. Thus m is in {±1} and n is in {±2}, modulo 5. So [k.k, m.m, n.n] is in fact [0, 1, −1] modulo 5, without the ± that initially seemed applicable.

Higher moduli

From the known case of [5, 4, 3] we know that there is no number above 5 that necessarily has a multiple in every pythagorean triple.

The squares, modulo z, of numbers whose double exceeds z are equal to those of their differences from z, so we only actually need to look at the first half of (: power(2) |z) modulo z (including the mid-point, when there is one). This tells us the values squares can have, constraining what the squares of our triple can be, if they're to add up. For each perfect square x, modulo z, we'll get x = 0 +x as an option for our triple of squares; and of course we can swap the two squares being added, unless our modulus is even, in which case just one of them is even and is m.m, while n.n is the odd one. When the modulus has factors, we can discard triples of their multiples, as they're not coprime.

Every pythagorean triple includes at least one multiple of each of 3, 4 and 5, the smaller two of them add up to a multiple of 7; and the largest member (hypotenuse) of any coprime pythagorean triple has, as prime factors, only those that are one more than multiples of four. Each prime less than 313 that is one more than a multiple of 4 does show up in the diagram above as a hypotenuse; and 25×25 = 625 = 313 +312 = 313×313 −312×312 so we have [313, 312, 25] as a pythagorean triple, generated by (some pair of) p = 13, q = 12 = v, u = 0, w = 11, making it the first omission due to limiting the diagram to 0 ≤ u < v < 12.

Inscribed circle

k m n r I learn, via Catriona Shearer and Ben Orlin, that the inscribed circle of a pythagorean triangle has a radius that's a whole multiple of the same unit as the triangle's sides are whole multiples of. We now have the general formula for the pythagorean triangle's sides, at least when they're coprime, so what does that give us as the radius of the incircle ?

Let the radius be r; use our two perpendicular sides of the triangle as co-ordinate axes, so the origin is the right angle corner, with [0, m] and [n, 0] as the other two corners, distance k apart. The centre of the circle is at [r, r]; the radius that meets the hypotenuse does so at [x, y] = [r, r] +r.[m, n]/k = r.[k +m, k +n]/k; the one-form m.x +n.y is constant on the hypotenuse, equal to m.n, so, using Euclid's form of the formulæ,

n.m
= r.(k.m +m.m +k.n +n.n)/k
= r.(m +n +k), so
r = n.m / (m +n +k)
= 2.p.q.(p.p −q.q) / (2.p.q +p.p −q.q +p.p +q.q)
= 2.p.q.(p.p −q.q) / (2.p.q +2.p.p)
= q.(p +q).(p −q) / (q +p)
= q.(p −q)

or, in the other two representations, r = (v −u).(2.u +1) = (w +1).(2.u +1). Sure enough, the radius of the incircle of a pythagorean triangle is a whole number multiple of the highest common factor of its sides. Furthermore, for every positive whole number, there is at least one pythagorean triangle whose incircle has that whole number, times the unit of length that all sides of the triangle are multiples of, as its radius.

Rewriting r = p.q −q.q in terms of the side lengths, we get r = m/2 −(k −n)/2 = (m +n −k)/2; writing s = (m +n +k)/2 for the semi-perimeter of the triangle, this is r = s −k, conforming to the cotangent rule, with the half-angle opposite k being an eighth of a turn, whose Tan is 1. Note, also, that the area of the triangle is m.n/2 = r.(m +n +k)/2, the radius of the incircle times the semi-perimeter,

Approximately Isosceles

Let's pause to consider which triangles are closest to isosceles, with a difference of just 1 between the lengths of the two perpendicular sides. Dividing the perpendicular sides by the hypotenuse of such triangles provides good approximations to √2. These triangles correspond to the triples generated by u, v for which

The ± gives us two cases to consider:

2.(v.(v +1) −(u +1).u) = (2.v +1).(2.u +1) +1
v.v +v −u.u −u = 2.u.v +v +u +1
v.v = 2.u.v +u.u +2.u +1
(v −u).(v −u) = (u +1).(u +1) +u.u
2.(v.(v +1) −(u +1).u) = (2.v +1).(2.u +1) −1
v.v = 2.u.v +u.u +2.u
(u +v +1).(u +v +1) = (v +1).(v +1) +v.v

In each case, solutions to this problem generate new solutions, by using the shorter perpendicular edge as u or v and the hypotenuse as either v −u or v +u +1. The second case also has the square of v −u equal to 2.u.(u +1), requiring one of u and u +1 (since they're coprime) to be an odd perfect square while the other is twice a perfect square. This is relatively rare, with only four such u < 1000 and two more < 10,000:

vukmn
31292021
208985696697
11949334612366023661
6962881136689803760803761
40591681386139652730419627304197
2366098001311738121927538920927538921

The first case, where our ± is +, has the square of u +v +1 equal to 2.v.(v +1), likewise requiring one of v and v +1 to be an odd perfect square and the other to be twice a perfect square.

vukmn
10543
83169120119
4920574140604059
288119195025137904137903
1681696662510946846604684659
98004059225058681159140520159140519

Taking the two cases together, we see that we can start with the degenerate 0, 1, 1 triad, which is trivially a case of two adjacent numbers whose squares add up to a perfect square, use its short side as u in the first table and v in the second then, from each of the pythagorean triangles these generate, use the short side likewise to produce more rows of both tables and so on. (The initial degenerate case can be thought of as the result of u = 0 = v from the even more degenerate all sides zero triangle, which is neither coprime nor generated by our formulæ; and, of course, it violates the u < v constraint.)

Right-angle simplices

A simplex is the generalisation of a two dimensional triangle to other dimensions; the triangle is the two-simplex, the tetrahedron is the three-simplex, a simple line segment is the one-simplex and a point is the zero-simplex. For any natural n, {mappings ({positives}:f:1+n): sum(f) = 1} provides a canonical n-simplex. However, I'm here more interested in a less symmetric n-simplex – namely, one in which n of the edges are (of non-zero length and) mutually perpendicular.

Simplices

One important feature of a simplex is that each vertex is connected to every other vertex by an edge (and, in fact, for every set of i vertices, there is an i-simplex face of the simplex which has these vertices as its corners). Given a set of edges, a path among those edges is a list (:f|1+i) of vertices among which, for each j in i, f(j) and f(1+j) are connected by one of the edges in our set; f(0) and f(i) are described as the ends of the path and the path is described as a path between these two vertices, or from f(0) to f(i). A set of edges is connected if, between any two vertices of edges in the set, there is some path within the set.

A path is closed if its ends are the same vertex; i.e. f(0) is f(i). This is easy to achieve by traversing some sequence of edges and then simply reversing the sequence of edges to come back to where you started; but this is the boring case. If you can get back to where you started without doing that, then your path can be reduced to one which never re-uses an edge; a path is described as a closed loop if it is closed and uses each edge at most once. Among a set of mutually perpendicular edges there is, necessarily, no closed loop. A path among some edges, among which there is no closed loop, can always be reduced to a path that uses each edge at most once.

A set of i edges (for positive natural i), with as few vertices as possible subject to containing no closed loop, always has i+1 vertices and is connected: when i is 1, this is trivial. Thereafter, each added edge must add at least one vertex – because the prior edges are connected, so connecting two of their vertices would form a loop. If all vertices are reached by prior edges, it is no longer possible to add an edge without creating a loop; otherwise, connecting any vertex of an existing edge to any vertex not reached by existing edges does indeed add only the one vertex it must, to the set of edges, without adding a closed loop. If we have n edges of an n-simplex and no closed loop, this requires us to use all 1+n vertices that our n-simplex has; and (since this means our set of edges uses as few vertices as possible, while having no closed loop) ensures that they are all connected. So any n mutually perpendicular edges of an n-simplex are necessarily all connected and reach all n +1 of its vertices.

Hypotenuses

Every vertex of our n-simplex is an end of at least one of our mutually perpendicular edges; and the mutually perpendicular edges are all connected, so there is some path among these edges from any given vertex to any other. As there are no closed loops, this path need only use each edge at most once; and there is only one such path, for each given pair of vertices. Thus, for every edge of our n-simplex, there is such a path connecting its end-points; if this path traverses i edges (once each), I'll refer to the edge whose end-points it connects as an i-hypotenuse of our n-simplex. Each of our perpendicular edges is a 1-hypotenuse (which is boring).

If the n mutually perpendicular edges form a path, that uses each edge exactly once, then we have an n-hypotenuse and, for each positive i in n, each n−i sub-path of length i provide us with an i-hypotenuse. However, if three (or more) of the perpendicular edges meet in one vertex, no path among the perpendicular edges can use each exactly once; at most two of the edges at any given vertex can appear in any such path, as we have no closed loops.

In two dimensions, we had two perpendicular sides to a triangle and they couldn't avoid forming a connected path, so life was simple: we only had one other side and it was a 2-hypotenuse. In higher dimensions, we have more things to consider:

This leads to various possible analogues of pythagorean that we could investigate for n-simplices with n perpendicular sides. Describe an edge as tidy, for present purposes, precisely if its length is rationally commensurate with those of the perpendicular sides. No edge can be tidy unless all the mutually perpendicular edges have rationally commensurate lengths, of course. We could study n-simplices with n perpendicular edges and all edges tidy. A little less generally, we could restrict attention to the case where the perpendicular edges form a path. As a simplified case of this, we could ignore all edges except the n-hypotenuse; this amounts to looking for lists ({naturals}:|n) whose sum of squares is a perfect square.

Incrementalism

Refining the simplest notion slightly, we can ask for lists of naturals where each initial sub-list has a perfect square as its sum of squares; thus, for example, [3, 4, 12, 84, 132] has 3×3 +4×4 = 5×5; adding 12×12 to that we get 13×13; adding 84×84 to that we get 85×85; and adding 132×132 to that we get 157×157. Each of [3, 4], [3, 4, 12], [3, 4, 12, 84] is an initial prefix of the list and has a perfect square as its sum of squares. This means we can have an n-simplex with these as the lengths of successive perpendicular edges, such that each i-hypotenuse associated with a path starting from the start of the first edge is tidy. However, notice that 4×4+12×12 = 160 isn't a perfect square, so at least one of the other other 2-hypotenuses isn't tidy.

From the above, it should be clear that we can build such incrementally pythagorean lists quite straightforwardly; indeed, in the example above, [3, 4, 12, 84] follow a pattern that can be continued indefinitely. As 3 is odd, its square is the sum of adjacent naturals, 4 and 5, hence equal to the difference of their squares, so [3, 4] has length 5. Then 5×5 is odd and likewise 12+13, so [5, 12] has length 13, whose odd square is 84+85, so [13, 84] has length 85; whose square is 7225 = 3612 +3613, so [85, 3612] has length 3613, which is (inevitably) odd again, so we can keep doing this for ever. Such a list grows rapidly, approximating (: 2.power(power(2, 1+i), x/2) ←i :) for some x, but can clearly be done for any odd start-value: for example, [7, 24, 312, 48984]. None the less, as illustrated above, they're not the only game in town; we could use 132 after 84 instead of 3612.

Even so, all cases of this kind can be built using the two-dimensional pythagorean triangles, incrementally: the sum of squares of the first n entries in such a list is the square of some natural, p, so any pythagorean triangle of which p is a perpendicular side can be used to obtain the other perpendicular side as n-th entry in the list, making the hypotenuse take the place of p for the thus-extended list.


Valid CSSValid HTML 4.01 Written by Eddy.