Like HowStuffWorks on Facebook!

How 8 Queens Works

Solutions to 8 Queens
Here's one solution to the 8 Queens puzzle.
Here's one solution to the 8 Queens puzzle.
Lee Dempsey/

It's not much of a surprise that "eight" is the answer to our specific question of how many queens can be placed on a board without attacking one another. But let's explore how many ways eight queens can be placed and how that is established.

We talked about how brute-force computer programs are one way to solve the puzzle -- and testing out 4,426,165,368 possibilities manually would certainly qualify as brute force -- but there are easier ways to narrow down the solutions. One simplified method was provided when J.W.L Glaisher, another mathematician, published a paper in 1874 describing his use of determinants to find a solution. "Determinants" sounds a little tough, but all you really need to know is that Glaisher basically constructed a matrix, and -- using a system he derived from that matrix -- was able to narrow down the possible solutions to 92.

And 92 solutions it remains. But don't be fooled; you won't be able to line up 92 chessboards, each with a unique set of 8 queens settled peacefully, because there are actually only 12 unique solutions.

Confused? The difference between 12 unique solutions and 92 fundamental solutions rests, literally, on how you look at it. While you could set up 12 different boards distinctively with your eight queens, all it takes is for you to simply turn the board -- or even reflect it onto a mirror -- to make the boards technically look different and thus have a "different" solution. (This is called rotational and reflective symmetry operations.) So you take your 12 unique boards, turn them 90, 180, and 270 degrees and then reflect them at each rotation. But one more thing -- one unique board is symmetrical, so it looks the same from two angles. While all the other boards have eight variants, the symmetrical board only has four. So instead of 12 boards times 8 variations (96), we're actually subtracting the four that don't exist with the symmetrical board. What do we get? 92 fundamental solutions.

Now, don't let the math fool you. You can always find yourself a chessboard and attempt to ferret out some placements for yourself. (Finding one answer, of course, is a lot easier than finding all 12.) And there are even programs on the Web that let you suss out some different solutions. (Warning: they may make you feel stupid.)

Before you shuffle your queens around, check out the next page to learn more information.