×

# Square & Rectangle

How many squares and rectangles are there in an $$n\times n$$ grid?

Note by Shithil Islam
6 months, 2 weeks ago

Sort by:

I am not fully sure but according to my calculations they are respectively equal to the sum of first $$n$$ squares and the sum of first $$n$$ cubes. Or we can say that there are $$\frac{n(n+1)(2n+1)}{6}$$ squares and $$(\frac{(n)(n+1)}{2})^2$$ rectangles in an $$n*n$$ grid. · 6 months, 2 weeks ago