How Many squares in this picture?

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?

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.

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.

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

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.

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.

late to the dance but honest…I got 40

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

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

I got 40 also:

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

total : 40