Creating a square with a "nonhypothenus area", under certain restriction

There’s a tool for math visualization and experimentation called aGeoboard. You use rubber bands on a board with an evenly space grid of pegs to create geometric figures.

One game on this for younger math students is to create squares with various areas and realise that you can make any square with an area that is a hypothenuse number. (Exactly how is left as an exercise for the reader.)

But you can also just use the bands to create lines from one peg to another, and if you do two such lines in parallel and combine with orthogonal lines with the same spacing, you also get a square, which can of course be one of the ones with an “hypothenuse area”, but also one with a non-integer area.

What I’d like to know is if it’s possible to create a whole number non-hypothenuse area this way, such as 3, but the challenge is so far defeating me.

An illustration, if I managed to do things right:
Google Photos

First: by a “hypotenuse number”, I assume you mean any number of the form a[sup]2[/sup] + b[sup]2[/sup]. If that’s correct, then I think you can show that you can’t form squares of an arbitrary side length, and in particular, 3 is impossible. But I don’t know whether this generalizes to all non-hypotentuse numbers.

Consider the two lines that form the opposite sides of this square. We can assume that one of them passes through (0,0), while the second line has an equation of ax + by + c = 0. (The first line will obey a similar equation, but with c = 0.) Since the second line connects two points with integer coordinates, it can be shown that we can put this equation in a form where a, b, and c are all relatively prime integers. (“Relatively prime” means that they have no common divisor other than 1.) We can then use known results from plane geometry to find that the distance between these two lines is

D = c/√(a[sup]2[/sup] + b[sup]2[/sup]).

If these two lines are to form opposite sides of a square of area 3, then the distance between them must be D = √3, which implies that

3 (a[sup]2[/sup] + b[sup]2[/sup]) = c[sup]2[/sup].

This implies that c is a multiple of 3, or c = 3d for some d; which means that

a[sup]2[/sup] + b[sup]2[/sup] = 3 d[sup]2[/sup].

Thus, a[sup]2[/sup] + b[sup]2[/sup] is also a multiple of 3. But square numbers are always either multiples of 3 or 1 more than multiples of 3. (In fancy language, they’re either 0 or 1 mod 3.) The only way for a[sup]2[/sup] + b[sup]2[/sup] to be a multiple of 3 is for a and b to both be divisible by 3. But we said above that a, b, and c had no common divisors greater than 1. This is a contradiction, and so we can conclude that it’s impossible to form a square of area 3 in this way.

This proof relies critically on the fact that a[sup]2[/sup] + b[sup]2[/sup] can’t be a multiple of D[sup]2[/sup] = 3 without a and b also both being multiples of D[sup]2[/sup] = 3. If D was some other non-hypotenuse number, this proof technique might not be possible. It still holds for D[sup]2[/sup] = 7 (the next non-hypotenuse number), but I don’t want to work out D[sup]2[/sup]= 11 (the following one) before I’ve had my coffee. More later, if I have further thoughts.

ETA: oh, and please don’t hesitate to ask for clarification if any of the above is unclear; I’ve used a bunch of jargon and glossed over a few results, but I’m happy to fill those gaps in if need be.

Yeah, that’s what I meant. My brain somehow glossed over that the article I looked up on nonhypotenuse numbers says they are numbers whose squares can’t be written as a[sup]2[/sup] + b[sup]2[/sup].

So numbers that can’t be written as a[sup]2[/sup] + b[sup]2[/sup] was what I was after.

And I enjoyed confirming for myself the correctness of the bits you glossed over.

I’m pretty sure that the general proof is just the same as the general proof that the square root of any integer other than a perfect square is irrational.

I think its possible to prove you can’t make non square and non-hypotenusal area squares in the peg board geometrically.
To construct any square, the rule is that each side extended must pass over two holes. The dX and dY between two holes MUST be integer. So the two holes must have the angles of a hypotenusal triangle… Any right angle triangle constructed from that base line and the grid, must have the angles being the hypotenusal angle, which then must be reflected in the orientation of the desired square… So by similar triangles argument, the square must be orientated the same as a hypotenusual square. This contradicts the ability to make it at a non-hypotenusual angle and therefore you cannot make the square differently to the set of square squards and hypotenusual squares you already had.

That it the angles will be those of a pythagorean triangle is obvious. But I don’t find it obvious that the square would have to be at an angle not allowed by that set of triangles.

The proof is pretty straightforward for odd numbers. Any odd number of the form x[sup]2[/sup] + y[sup]2[/sup] must be congruent to 1 mod 4. This means that any “non-hypothenuse” number must be 3 mod 4. It is a basic number theory exercise to show the square of any integer is either 0 mod 4 (even) or 1 mod 4 (odd). Thus no prefect square is 3 mod 4

So no perfect square is 3 mod 4 and all non-hypothenuse numbers are 3 mod 4 therefore there is no square with integral sides that has a non-hypothenuse area.

Just to clarify. x[sup]2[/sup] + y[sup]2[/sup] is congruent to 1 mod 4 is an if and only if statement for odd numbers.

As for even numbers, a number is “non-hypothenuse” if and only if it is in the form 2[sup]m[/sup]u where u is an odd number congruent to 3 mod 4.
Assume the side of a square of length 2[sup]n[/sup]v; v is odd. The area will be 2[sup]2m[/sup]w where w is an odd number congruent to 1 mod 4. Since this is not 3 mod 4 then no square of even-lengthed side can have a non-hypothenuse area.

Unless I have missed something, it seems simple. You can simply introduce coordinates so that the pegs are all at distance 1. Assume one edge of square goes from (a,b) to (c,d). Then the length of that edge is sqrt((a-c)^2 + (b-d)^2) and area of the square is the square of that, (a-c)^2 + (c-d)^2, that is the sum of two squares. As remarked above, the positive numbers that are not the sum of two squares are just those that are a power of 2 times a number that leaves a remainder of 3 when divided by 4.

And every positive number is the sum of 4 squares (0 is included BTW). Three squares are a bit more complicated. A positive number fails to be a sum of 3 squares if and only if it is a power of 4 times a number that leaves a remainder of 7 when divided by 8. So the exceptions start out 7, 15, 23, 28, 31,…

Hari Seldon, you’re assuming that the corners of the square must be at the lattice points. The link in the OP shows a variety of examples including one where that’s not true.

It is simple and my proof make it look more complicated than it is. Basically it comes down to 4m+1 can never equal 4n+3 (m, n natural)

If I understand correctly what you mean by this, this is false. For example, 21 is 1 mod 4, but cannot be written as a sum of two squares.

The exact rule on when a positive integer is a sum of two squares is that this can be done if and only if each prime in its prime factorization which is of the form 3 mod 4 has an even exponent. Most of the explanation for this is contained in this old post, which deals directly with the case of primes, but also contains the unique factorization properties that allow one to properly extend to the result for general integers as stated above.

Ah, I went looking for the best post to link to, but missed it. This is the best explanation for the present purposes, deriving in further detail the precise number of ways to write any positive integer as a sum of two squares (in terms of the exponents associated to primes with various remainders mod 4 in its prime factorization).

Any square with integral sides has an area which is a square number and thus, trivially, of the form m^2 + 0^2 (so a “hypothenuse value”); all this mod 4 business is both mistaken (since not every “non-hypothenuse” value is 3 mod 4) and unnecessary, for showing that every square with integral sides has a “hypothenuse” area.

But this triviality does not answer the OP’s question, because they are not limited to squares with integral sides.

Consider lines of slope n/d in lowest terms, passing through lattice points. They are regularly spaced, with a perpendicular distance of 1/sqrt(n^2 + d^2). Thus, any two such lines have a perpendicular distance which is some integer times this.

Let n/d be the slope of one line forming one side of the square. Then this is also the slope of the line forming the opposite side of the square, and -d/n is the slope of the two other sides (the spacing of such lines being at the same distance).

Thus, a square formed using a line of slope n/d must have area equal to some square number divided by n^2 + d^2. If this area is a whole number, this means each prime appears in its prime factorization an even or odd number of times according as to whether said prime appears in the prime factorization of n^2 + d^2 an even or odd number of times. But by the characterization of sums of two squares as precisely those values for which each prime which is 3 mod 4 appears an even number of times in their prime factorization, this means the area must, just like n^2 + d^2, be expressible as a sum of two squares. QED.

I posed that question and got some very satisfying answers.

I wrote my last post without having read MikeS’s post, which presents essentially the same argument slightly differently. MikeS had wondered whether it generalizes beyond 3, and indeed it does generalize completely. The key end step (in both my post and his) is knowing that if (n^2 + d^2) * area = c^2, then the area is a sum of two squares. Indeed, more generally, if A * B = C and A is a sum of two squares, then B is a sum of two squares if and only if C is a sum of two squares.

Expanding on that slightly…

The direction from left to right here is fairly straightforward algebra, corresponding to multiplying complex numbers and thinking about what happens to their magnitudes.

The direction from right to left here is trickier. Or, put another way, it’s trickier to show that if B is not a sum of two squares, then neither is C.

For any particular such value of B (e.g., B = 3), one will be able to elementarily reason about remainders modulo B as MikeS did to demonstrate that C is “non-hypotenuse” as well.

But proving the general statement, that this approach actually works for all B, is more complicated, and where we need the less elementary theory of Gaussian prime factorization/which values are sums of two squares.