# A small geometry puzzle out of curiosity

Out of curiosity I've been thinking about the following "puzzle" for a while now and maybe someone here can help.

Situation

We take a rectangle and start off at one of the corners. In that corner, which is $90^\circ$, we start drawing a line at $45^\circ$, splitting the corner into two equal parts and staying inside the rectangle with our line. As soon as the line hits an edge of the rectangle, we take a $90^\circ$ "turn" so that we stay inside the rectangle and repeat this as often as we can.

Question

My hypothesis is that we then eventually always end up in a (nother) corner, where our problem stops as we can't take a $90^\circ$ turn there and stay inside the rectangle.

I've tried this in my head with several sizes of rectangles and it always works out, but I can't prove that it's always true for all rectangles. (also with non-integer sized rectangles, for example)

If there's anybody out there wanting to spend some time thinking about this, I would really be interested to find out the solution. :)

Example cases

If we take squares, the proof is easy. Take a square with edges size 5 and give the bottom left corner the co-ordinate (0, 0). We start a line and end up immediately at (5, 5).

If we take a rectangle size 6 (x-axis) by 5 (y-axis), our line "bounces" at the following points: (0, 0);(5, 5); (6, 4); (2, 0); (0, 2); (3, 5); (6, 2); (4, 0); (0, 4); (1, 5); (6, 0) where (6, 0) is of course a corner point.

-
Are you assuming that the side lengths of your rectangle are integers? – Hans Lundmark Dec 29 '12 at 12:45
Nope, as I said, I'm looking for a proof that it's true for all rectangles, also with non-integer sizes. Or for a counter-example of course... But to analyze this in my head or with some paper, I use integer sides and for the few cases I did for my self, it always seems to work. – bartlaarhoven Dec 29 '12 at 12:47

Hint: Consider a tiling of the plane by these rectangles. When you want to "turn by $90^\circ$", think about the relationship of the turned line, with the continuation of the line. Use this to get a classification of the conditions when your line will intersect another corner.
Ah, tiling them, that's a good one. But that means that, for this to work, the two sides should have a common divisor, right? And that would mean that it would work for any rectangle with sides from $\mathbb Q$ but not for example for rectangles size 1 by $\pi$ ? – bartlaarhoven Dec 29 '12 at 12:54
There are sufficient details for you to work this out for yourself. Be careful with the term 'common divisor', which mainly applies to integers only. For example, does $3\sqrt{2}$ and $4\sqrt{2}$ have a 'common divisor'? Think carefully about what the condition that you want actually is, and how you can see that from the picture. – Calvin Lin Dec 29 '12 at 12:57
Hm. How do you call that then.. For me $3\sqrt{2}$ and $4\sqrt{2}$ have a "common divisor", being $\sqrt{2}$. And if I do this one on paper, it also works out, you end up in another corner. But the rectangle of 1 by $\pi$ will never work out, just like the rectangle of 3 by $\sqrt{2}$, right? Because you can't divide both sides into an integer number of equally sized parts... (whatever that may be called) – bartlaarhoven Dec 29 '12 at 13:03
My point was that you have to clarify what 'common divisor' means. Generally divisors are integers, so saying that the 'common divisor' is $\sqrt{2}$ needs a bit of explanation. For example, would the $\frac {22}{7} \times \frac {7}{22}$ rectangle lead you back to a corner? More importantly, you should be able to classify all rectangles which will lead you back to a corner. – Calvin Lin Dec 29 '12 at 13:16
I guess a $a\times b$ rectangle satisfies the condition if and only if there exist integers $x,y$ such that $xa=by$. But i'm not sure about that. – barto Dec 29 '12 at 13:20