13

enter image description here

I have come across numerous questions where I am given the picture such as the above one been asked "how many rectangles are there?". I have even come across some slightly different images that instead of rectangles you are supposed to find the number of triangles. Well, I was thinking whether there is any formula or strategy that is used to solve these problems without having to manually count every shape.

Help would be appreciated.

Thank you :)

user1729
  • 32,369
anonymous
  • 1,586

2 Answers2

10

To have a rectangle, you need 2 horizontal lines and 2 vertical lines. So for your given picture, there are $5\choose 2$ choices for two vertical lines. Also $4\choose 2$ choices for horizontal lines. So there are ${5 \choose 2}\times{4\choose2}$ rectangles in total.

The strategy is to find a way to categorize the things you want to count. Various problems will require various tricks, but you can gain experience by trying to solve them by your own.

anumosh
  • 945
0

I have found also this answer: $$\left(\sum_{i=1}^{\text{Length}+1} i\right)\cdot\left(\sum_{i=1}^{\text{Width}+1} i\right)$$

Alex
  • 103
  • 1
  • 1
  • 8