What’s Your Angle?: An Intro to Arithmetic Billiards

Gems in STEM: Introduction to Arithmetic Billiards

Apoorva Panidapu
7 min readApr 21, 2021

Per usual, I was loitering in the corners of a kid-friendly casino party (in pre-COVID times), wondering what I was still doing there. I had already collected my winnings at the poker table, then subsequently lost them after playing Blackjack with my newly-acquired god complex (which I also soon lost).

As I contemplated leaving, I overheard someone from around the pool table.

“Dude, what are you trying to do here? What’s your angle? Ow, think before you hit, dummy!” An indignant voice rose above the chatter.

Woah, is there a fight brewing? I’m not above drama, so I tiptoe closer, fully expecting to see two guys squaring up. Imagine my surprise when I see a guy in a coat, with no one around, staring sulkily at a talking cue ball on the pool table.

I left.

But, that cue ball did have a point. So today, we’ll be talking about the simplified game of billiards!

What is this game? Think pool, but take out the hard stuff (and pockets). We study a ball that bounces around a rectangular table following the same rules of billiards, except we assume this ball has no mass, and thus no friction. So, this ball is not bogged down by physics and can bounce infinitely many times, reflecting off the sides of the table. The path of the ball formed by these reflections actually gives us a geometric method of understanding and determining the least common multiple (lcm) and greatest common divisor (gcd) of two natural numbers!

(Image taken from Wikipedia)

Least Common Multiple (LCM)

First, a quick review! The least common multiple of two numbers a and b is exactly what it sounds like: the smallest number that is a multiple of both of a and b. For example, lcm(2, 3) = 6, lcm(4, 6) = 12, and lcm(5, 10) = 10.

Also, a quick apology in advance: Medium doesn’t have great support for equations and such, so the following expressions look fairly ugly.

Suppose the billiard table is m x n rectangle. Shoot a ball from the bottom left corner, making a 45 degree with the side. Given our conditions, the ball will bounce off the sides without losing speed, and by the law of reflection, it bounces off at a 45° angle each time it meets a side. Thus, we can see that the ball only makes left or right 90° turns (since 45° + 45° = 90°). The ball will eventually hit a corner (after a finite number of reflections), and will then stop. We call this path the arithmetic billiard path.

We claim that the least common multiple of m and n, lcm(m, n), is equal to the length of this path divided by √2 (in terms of the units measured), which is also actually equivalent to the number of unit squares crossed by the path!

Why is this true? Can we prove this? Yes, we can! We are the little mathematicians that could. I’m just going to provide the general ideas of a proof for sake of simplicity, but if you’re interested, I encourage you to think through the details!

First, form a square with side length lcm(m, n). We can then decompose the square into a grid of m x n rectangles. (Think about why this is true! What does lcm mean?) This square we’re considering is the smallest square that can be tiled with m x n rectangles. Construct the diagonal d from the bottom left corner to the top right corner, and break it into segments depending on the m x n rectangle it intersects. Starting from the rectangle from top right corner of the diagonal, you reflect these segments across the sides intersected by the diagonal, onto the adjacent rectangles. Eventually, you will reach the opposite corner of the rectangle (the bottom left m x n rectangle in our construction), and these repeated reflections have reformed the diagonal d into the path of a ball shot from a corner of an m x n rectangle. The length of d is lcm(m,n) * √2 (you can use the Pythagorean Theorem if you don’t see why this is true). This then becomes the path length, so indeed lcm(m, n) = path length/√2. Ta-da!

This proof is best explained with a picture, so here is the result of the process, with each reflected line segment indicated.

(Image taken from Wikipedia)

Note: if one side length divides the other length, the path is a zigzag that doesn’t intersect with itself (as expected). Here’s an example!

(Image taken from Wikipedia)

Greatest Common Divisor (GCD)

Quick review x 2! The greatest common divisor of two numbers a, b is, again, exactly what it sounds like: the largest number that divides both a and b. For example, gcd(2, 3) = 1, gcd(4, 6) = 2, and gcd(5, 10) = 5.

Once again, let the billiard table be a m x n rectangle. Suppose that neither m or n divide each other, meaning that the arithmetic path intersects with itself. Divide the rectangle into m*n unit squares. We claim that the greatest common divisor gcd(m, n) is equal to the distance from the starting point of the path to the closest point of self-intersection divided by √2. Furthermore, this is equivalent to the number of unit squares crossed by the path segment from said two points. Why? Let’s see!

For simplicity, first assume gcd(m, n) = 1. Then lcm(m, n) = m*n. (Why is this true?) By the above, we know that the path will cross m*n unit squares, so the path will cross all of the unit squares in the rectangle. I’m not going to go too much into the details, but we can find that the first point of self-intersection is the coordinate (1,1), i.e. the top right corner of the very bottom left unit square, as shown in the picture!

(Image taken from Wikipedia)

But what happens if gcd(m, n) is not 1? Well then we can shrink the whole figure by the factor gcd(m, n). Consider the rectangle m/gcd(m,n) x n/gcd(m,n). Since we divided out by the greatest common factor of m and n, we have that gcd(m/gcd(m,n), n/gcd(m,n)) = 1. Thus, we have a path where the distance to the first point of self-intersection is 1*√2. Then, we can scale back this rectangle, giving us the new distance of gcd(m, n)*√2. Voila! We now understand least common multiples and greatest common divisors in terms of geometry and games!

What if we do have pockets?

Remember how we took out the pockets for simplicity? Well, what if we put them back in–just for fun? Turns out that mathematicians have thought about this too (they are very hard workers)!

Consider a rectangular billiard table with only corner pockets and sides of integer lengths m and n such that m and n are relatively prime, meaning that gcd(m, n) = 1). Then, a ball sent at a 45° angle from a corner falls into a pocket of another corner after m+n-2 bounces!

(Image taken from Wolfram MathWorld)

Begone, rectangle!

But, what if we don’t have rectangular tables? What happens to the angle in rectangle? Well, then we get Alhazen’s billiard problem, which attempts to find the point of a circular billiards table at which a cue ball at a given point must be aimed in order to bounce once off the edge of the table and strike another ball at a second given point. Interestingly enough, this problem is impossible to solve using a compass and ruler construction.

Let’s take it even further. What if we have an elliptic table? Or what if it’s not even a table, what if it’s a prism? Like a cube, or tetrahedron, or any regular polyhedron? These are increasingly complex questions that mathematicians have been thinking about, so if you’re interested, definitely look it up!

So there you have it, your chances of succeeding at pool or billiards or whatever probably have increased by at least a little now. Go forth, find your angle, and make me proud.

Until next time! If you found this interesting, make sure to check out the next column! If you have any questions or comments, please email me at apoorvapwrites@gmail.com

This column, Gems in STEM, is a place to learn about various STEM topics that I find exciting, and that I hope will excite you too! This column will always be written to be fairly accessible, so you don’t have to worry about not having background knowledge. However, it does occasionally get more advanced towards the end. Thanks for reading!

--

--

Apoorva Panidapu

Math, CS, & PoliSci @ Stanford. Advocate for youth & gender minorities in STEAM. Winner of Strogatz Prize for Math Communication & Davidson Fellows Laureate.