How many rectangles can be made within the confines of a $5 \times 5$ square? 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 5x5 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):

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 2x2 couldn't be drawn if it starts in three of the corners (for example).
 A: 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.
A: You can do something like this:

Notice that the two pairs of rows and columns represent a rectangle(namely, a one by one square). So any two pairs of vertical lines and horizontal lines will result in an unique rectangle. There are $\binom62=15$ ways to choose the vertical lines, and $\binom62=15$ ways to choose the horizontal lines. That gives a total of $15\cdot15=\boxed{225}$ ways to form a rectangle.
A: Here is another way to think about it.
Choose two diagonally opposite vertices - the first can be arbitrary ($36$ possibilities) and the second cannot be in the same row or column (multiply by $25$ possibilities). Then each rectangle has four possible ways to choose a diagonal (each diagonal can be chosen two ways), so divide by $4$ to get $225$ as others have done.
It is good to see you thinking about the problem. In these combinatorial problems, making a careful choice about what to count and in what order can simplify things. And also it doesn't matter if you count the same object multiple times in a simple computation provided you remember to de-duplicate. This de-duplication can trip up an apparently simple approach. I put in this suggested method because it shows both aspects and remains quite simple. Sometimes it offers the best way through.
