# How Many squares in this picture?

**URL:** <https://boards.straightdope.com/t/how-many-squares-in-this-picture/629791>\
**Category:** The Game Room\
**Created:** [July 29, 2012, 8:23pm UTC](https://boards.straightdope.com/t/how-many-squares-in-this-picture/629791 "2012-07-29T20:23:24Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![gazpacho](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@gazpacho](https://boards.straightdope.com/u/gazpacho)\
**Post date:** [July 30, 2012, 2:20am UTC](https://boards.straightdope.com/t/how-many-squares-in-this-picture/629791/21 "2012-07-30T02:20:15Z")

</div>

> [@Kamino\_Neko](#):
>
> Again, note, the size of the cells is not consistent.

could you be a little more specific about how the cells are not the same size? The large square to me seems to be divided into four equal sized vertical rectangles and four equally sized horizontal rectangles. Are you saying that is not the case?

---

<div class="post-metadata">

**Author:** ![Left\_Hand\_of\_Dorkness](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/left_hand_of_dorkness/32/7156_2.png) [@Left\_Hand\_of\_Dorkness](https://boards.straightdope.com/u/Left_Hand_of_Dorkness)\
**Post date:** [July 30, 2012, 2:34am UTC](https://boards.straightdope.com/t/how-many-squares-in-this-picture/629791/22 "2012-07-30T02:34:24Z")

</div>

> [@Airman\_Doors\_USAF](#):
>
> When you have a perfect square of whatever number, you also have the perfect squares of all the other numbers counting up to it. Since this is four squared, you also have three, two and one squared.
> 
> 16+9+4+1=30
> 
> Now you add the two squares in the middle, plus the eight subdivisions of those squares.
> 
> 10+30=40
> 
> 40 is the answer.

Good way of putting it. There was a great puzzle on NPR a few years ago, something like this:

Make a square.  
Connect the middle of each side with the middle of each adjacent side.  
Connect each corner with the opposite corner.  
Draw additional lines such that your square becomes a 4x4 grid with 6 diagonals.  
How many triangles can you find?

As part of solving it, I realized what you’d said. And that helped me solve this one pretty quickly. In any square grid, There’s (1^2) squares of the biggest size, (2^2) squares of the next-biggest size, (3^2) squares of the next biggest size, and so on.

---

<div class="post-metadata">

**Author:** ![antonio107](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@antonio107](https://boards.straightdope.com/u/antonio107)\
**Post date:** [July 30, 2012, 2:52am UTC](https://boards.straightdope.com/t/how-many-squares-in-this-picture/629791/23 "2012-07-30T02:52:02Z")

</div>

> [@gazpacho](#):
>
> could you be a little more specific about how the cells are not the same size? The large square to me seems to be divided into four equal sized vertical rectangles and four equally sized horizontal rectangles. Are you saying that is not the case?

What I think he’s saying is that those cluster of mini-squares in the middle? He’s calling those two by two squares. Even though they’re the same size as the other one by one squares.

---

<div class="post-metadata">

**Author:** ![Kamino\_Neko](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/kamino_neko/32/34_2.png) [@Kamino\_Neko](https://boards.straightdope.com/u/Kamino_Neko)\
**Post date:** [July 30, 2012, 3:22am UTC](https://boards.straightdope.com/t/how-many-squares-in-this-picture/629791/24 "2012-07-30T03:22:08Z")

</div>

Right. There are 8 small cells, making up 2 2X2 squares.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [July 30, 2012, 3:24am UTC](https://boards.straightdope.com/t/how-many-squares-in-this-picture/629791/25 "2012-07-30T03:24:59Z")

</div>

Here’s a more general solution:

Take an n x n square and mark off the points on the sides as 1, 2, …, n. Any subsquare can be identified with its side length and the coordinates of its upper left corner. If the side length is k, the coordinates have to be between 1 and n + 1 - k, so that gives you (n - k + 1)[sup]2[/sup] subsquares with side lengths k. You sum that over k = 1, 2, …, n to get that there are (2n[sup]3[/sup] + 3n[sup]2[/sup] + n)/6 total subsquares.

Here we have one 4 x 4 square, and two 2 x 2 squares. By the formula above, the 4 x 4 square has 30 subsquares, and each of the 2 x 2 squares has 5 subsquares. Add them all up and you get 40.

---

<div class="post-metadata">

**Author:** ![Tom\_Scud](https://avatars.discourse-cdn.com/v4/letter/t/f08c70/32.png) [@Tom\_Scud](https://boards.straightdope.com/u/Tom_Scud)\
**Post date:** [July 30, 2012, 4:05am UTC](https://boards.straightdope.com/t/how-many-squares-in-this-picture/629791/26 "2012-07-30T04:05:39Z")

</div>

Some smartasses on my facebook friends list pointed out that you could count from the inside or the outside of the black lines, thus coming up with a lot more than 40.

---

<div class="post-metadata">

**Author:** ![Left\_Hand\_of\_Dorkness](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/left_hand_of_dorkness/32/7156_2.png) [@Left\_Hand\_of\_Dorkness](https://boards.straightdope.com/u/Left_Hand_of_Dorkness)\
**Post date:** [August 1, 2012, 4:27am UTC](https://boards.straightdope.com/t/how-many-squares-in-this-picture/629791/27 "2012-08-01T04:27:19Z")

</div>

> [@Tom\_Scud](#):
>
> Some smartasses on my facebook friends list pointed out that you could count from the inside or the outside of the black lines, thus coming up with a lot more than 40.

Equally, you could point out that none of these are geometrically true squares, so the correct answer is zero. In order to solve problems like this, you gotta figure that the imperfect physical image represents a perfect geometrical structure.

---

<div class="post-metadata">

**Author:** ![ThisSpaceForRent](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thisspaceforrent/32/345_2.png) [@ThisSpaceForRent](https://boards.straightdope.com/u/ThisSpaceForRent)\
**Post date:** [August 1, 2012, 7:32am UTC](https://boards.straightdope.com/t/how-many-squares-in-this-picture/629791/28 "2012-08-01T07:32:36Z")

</div>

late to the dance but honest…I got 40

---

<div class="post-metadata">

**Author:** ![Saint\_Cad](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/saint_cad/32/18907_2.png) [@Saint\_Cad](https://boards.straightdope.com/u/Saint_Cad)\
**Post date:** [August 1, 2012, 5:28pm UTC](https://boards.straightdope.com/t/how-many-squares-in-this-picture/629791/29 "2012-08-01T17:28:26Z")

</div>

1. I think the OP didn’t count the 3x3 squares

---

<div class="post-metadata">

**Author:** ![BigAppleBucky](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigapplebucky/32/178_2.png) [@BigAppleBucky](https://boards.straightdope.com/u/BigAppleBucky)\
**Post date:** [August 1, 2012, 9:22pm UTC](https://boards.straightdope.com/t/how-many-squares-in-this-picture/629791/30 "2012-08-01T21:22:14Z")

</div>

> [@JohnT](#):
>
> I got 39, then realized I forgot the whole shape, so 40.

I also got 39 counting the large square, but I forgot the four squares in the middle so I was missing a 2x2.

---

<div class="post-metadata">

**Author:** ![Manduck](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/manduck/32/256_2.png) [@Manduck](https://boards.straightdope.com/u/Manduck)\
**Post date:** [August 1, 2012, 9:36pm UTC](https://boards.straightdope.com/t/how-many-squares-in-this-picture/629791/31 "2012-08-01T21:36:08Z")

</div>

I got 40 also:

4x4 : 1  
3x3 : 4  
2x2 : 9  
1x1 : 18  
.5x.5: 8

total : 40

[Previous page](https://boards.straightdope.com/t/how-many-squares-in-this-picture/629791.md?page=1)
