Chessboard rectangles How many rectangles (with edges along grid lines) are there in an 8 ×8 chessboard,
which contain the same number of black and white squares? The
whole chessboard counts as a valid rectangle too.
I know how to find the total number of rectangles in the chessboard -- $\binom{9}{2}^2$ -- but the condition that there are the same number of black and white squares is causing a bit of trouble. Does it imply that the area of each rectangle must be even? Even if so, how does that help us.
Thanks
 A: You are right that this implies the area of the rectangle must be even. This is helpful in a way that illustrates a common technique in combinatorics: sometimes it is hard to count the thing you desire, but not so bad to count all possible options and the complement of the quantity you desire. In your case, we can count the number of rectangles with even area by removing the number of rectangles with odd area from the number of all rectangles. These latter two quantities are easier to count, you already have one of them.
As coffeemath noted, the rectangles that do not contain the same number of black and white squares are precisely the rectangles which have both side lengths odd (or equivalently have odd area). Why is this?
Well, if either side length of our rectangle is even of length $2k$ say, then if our other side length is $\ell$, we end up with $k\ell$ black and white squares. One way to think about this is we have $k$ white files of length $\ell$ and $k$ black files of length $\ell$. So both side lengths must be odd to have a different number of black and white squares.
Let's find the number of rectangles in an $8 \times 8$ chess board with both side lengths odd! To do this, we have to choose our two odd sides.
There are $8$ ways to choose a side length of $1$, $6$ ways to choose a side length of $3$, $4$ ways to choose a side length of $5$ and $2$ ways to choose a side length of $7$. So there are $8+6+4+2 = 20$ choices for each side. This gives a total of $20^2 = 400$ rectangles with odd side lengths. There is a more general approach to this, but this count is easy enough to do explicitly in this example.
So the total number of rectangles with the same number of black and white squares is $\binom{9}{2}^2 - 400 = 896$.
