The way I just explained the solution is not the way I originally figured it out. To arrive at the solution I looked at a particular example, found a product that gave the number of each type of rectangle, and then factored.
Another way to solve the problem is to manipulate some nasty sigma notation. We might realize that the number of rectangles in an n x m grid is the sum of all the answers to these questions: how many i x j rectangles are there in an n x m grid? For example, how many 5 x 8 rectangles are there in a 12 x 17 grid? The answer is (12 - 4)(17 - 7). The number of i x j rectangles in a n x m grid is (n - i + 1)(m - j + 1). So the total number of rectangles in an n x m grid is this double summation:
and then manipulating the sum like this:
Thanks for reading! If you solved the problem a different way or have any ideas about how this task could be implemented with students, I would be excited to hear from you!