2025 AMC 10B Problem 25
Square has sides of length . Points and lie on and , respectively, with and . A path begins along the segment from to and continues by reflecting against the sides of (with congruent incoming and outgoing angles). If the path hits a vertex of the square, it terminates there; otherwise it continues forever. At which vertex does the path terminate? 
Show solution without answering
Key insight
Flip the square instead of bouncing the path. The path becomes one straight line through a grid of squares, ending at the first grid corner it meets.
Solution
1. Set up coordinates. Put , , , , as in the figure. is the left side and is the top. So
- Unfold instead of bouncing. When the path hits a side, flip the whole square across that side, like a mirror image. In the flipped copy, the bounced path simply keeps going in a straight line. Doing this at every bounce fills the plane with copies of the square in a grid of cells, and the whole bouncing path becomes one straight line starting at .
The corners of all the copies are the grid points whose coordinates are both multiples of . So the path ends at a vertex exactly when the straight line hits a grid point .
3. The straight line. From to the path goes across and up. Its slope is
so the line is .
4. Find the first grid point. Put and :
Multiply by : . Divide by :
So must be a multiple of . Try : the values are . The first multiple of is , at , which gives . The line first hits the grid point , so the path does end at a vertex.
5. Which vertex? Each flip across a vertical side swaps left and right. In the unfolded picture, the original left side () shows up at (even multiples of ), and the right side () shows up at (odd multiples). The same goes for bottom and top with .
- , an odd multiple, so the vertex is on the right side, .
- , an even multiple, so the vertex is on the bottom, .
The vertex is , which is .
The answer is .
Why this works
A path that bounces off walls with equal angles is a straight line in disguise. Flipping the square instead of the path "unfolds" it, and all the bounces become easy questions about where a line crosses a grid. Whether the path ever reaches a corner becomes one equation in whole numbers, and which corner it reaches is decided by whether the grid point is an odd or even number of squares across and up. This trick works for any billiard-table problem in a rectangle.
Concise solution
A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.
Set coordinates as in the figure: , , , . Then is the left side and the top side, so
Unfold. Instead of reflecting the ray at a side, reflect the square. Repeatedly reflecting the square in its sides tiles the plane with copies, one in each cell
and under this unfolding the bouncing path becomes a single straight ray from . A bounce is just the moment the ray crosses from one cell to the next, and the images of the four vertices of the square are exactly the lattice points . So:
> the path terminates at a vertex precisely when the straight ray from first meets a point .
The ray. Its direction is
so the ray is with increasing.
When does it hit a lattice point? Put and with positive integers:
Reducing modulo : . Since , multiply by :
The smallest positive solution is , which gives . So the ray first reaches a lattice point at , and the path does terminate.
Which vertex? Folding back, the copies alternate orientation, so the image point corresponds to the corner of the original square whose -coordinate is when is even and when is odd, and whose -coordinate is when is even and when is odd. Here is odd and is even, so the corner is , which is .
The answer is .
Review in the AoPS books
- Introduction to Geometry, Chapter 16: The More Things Change. . . (§16.1, §16.2, §16.3, §16.4)
- Introduction to Geometry, Chapter 17: Analytic Geometry
- Introduction to Number Theory, Chapter 12: Introduction to Modular Arithmetic
- Introduction to Algebra, Chapter 8: Graphing Lines
Similar problems
Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.