Consider the following grid:
1) How many squares (of all sizes) are there in this grid?
2) How many rectangles (of all sizes) are there in this grid?
3) Can you generalize your results to an n by n grid? Can you generalize further?
Please see attachment for grid.
The numbers of squares and rectangles in a grid is solved algebraically. The solution has diagrams and is well explained.