How many rectangles can be made within the confines of a $5 \times 5$ square

combinatoricsgeometry

My friend and I are designing a game and are trying to figure out how many possible moves there are. In this game, there is a 5×5 grid, and the player must draw a rectangle with positive natural dimensions within that grid. How many possible rectangles can be drawn? Here's an example, any red rectangle would be a valid move (pretend the red rectangles have natural dimensions):

enter image description here

We were thinking that each row has 5! possible widths, and each column has 5! possible heights, and each rectangle can start in one of 25 possible locations, but we're not sure how to handle the fact that a 2×2 couldn't be drawn if it starts in three of the corners (for example).

Best Answer

This is a classic problem in combinatorics. Think of how you could create such a rectangle. A rectangle is formed by choosing two distinct vertical lines and two distinct horizontal lines. These uniquely determine a rectangle.

There are $\binom62=15$ ways to choose two vertical lines and $\binom62=15$ ways to choose two horizontal lines. Then there are $15^2=\boxed{225}$ ways in total.

Related Question