On this page
A rook in chess attacks any piece sitting in its row or its column. To place two rooks that do not attack each other, you must put them in different rows and different columns.
If you just start counting safe squares on an 8×8 board, the problem feels messy. But if you break it into a sequence of choices using combinations, the counting becomes simple and applies to any board size.
How many ways to place two rooks that do not attack each other?
There are exactly 1,568 ways to place two identical non-attacking rooks on an 8×8 chessboard (source).
This number comes from the rook polynomial, which counts ways to put non-attacking pieces on grids. Instead of looking at the board square by square, the formula asks you to choose the rows, choose the columns, and then place the pieces.
How do you choose squares in different rows and columns?
To see why the answer is 1,568, break the placement into independent steps.
First, select the rows. An 8×8 board has 8 rows, and your two rooks need 2 of them. The number of ways to pick 2 rows from 8 is given by the combination formula 8C2. Calculating this gives (8 × 7) / 2 = 28.
Second, select the columns. Your two rooks also need 2 columns out of the 8 available. The number of ways to pick these 2 columns is again 8C2, giving 28 ways.
When you choose 2 rows and 2 columns, you isolate a 2×2 sub-grid on the main board. The 4 squares where your chosen rows and columns intersect are the only allowed spaces for your rooks. By selecting the rows and columns first, you narrow the massive 8×8 board down to a 4-square problem.
Why must the two rooks be arranged diagonally?
Now you have a 2×2 grid of intersections and 2 identical rooks to place.
If you put the rooks in the same row or the same column of this small grid, they will attack each other. Therefore, you must place them diagonally. A 2×2 grid has exactly two diagonals, so there are exactly 2 safe ways to arrange the rooks.
Multiply your independent choices together: 28 row choices × 28 column choices × 2 arrangements = 1,568 ways.
If the problem involves different constraints, such as how to solve selection problems with combinations or using the gap method for arranging items so no two are together, isolating the allowed spaces first is always the safest strategy. This prevents overcounting.
What happens if the rooks are different colours?
A common twist in exams is to make the pieces distinct. Suppose you have one white rook and one black rook.
When the rooks are identical, swapping their positions does not create a new arrangement. But if one is white and one is black, swapping them does. For every valid placement of identical rooks, there are 2! (which is 2) ways to assign the colours.
Therefore, the number of ways to place two distinct non-attacking rooks is 1,568 × 2 = 3,136.
You can also reach this number directly. You can place the white rook on any of the 64 squares. Once placed, it attacks its own row and column. Because the square it sits on is shared, the rook dominates 15 squares in total. This leaves 64 − 15 = 49 safe squares for the black rook. Multiplying your choices gives 64 × 49 = 3,136 ways.
How many ways to place three non-attacking rooks?
The logic of choosing rows and columns scales up perfectly for three or more rooks. Suppose you want to place three identical non-attacking rooks on an 8×8 board.
First, choose 3 rows out of 8, which is 8C3 = 56 ways. Second, choose 3 columns out of 8, which is 8C3 = 56 ways. Finally, arrange the 3 rooks on the resulting 3×3 sub-grid so that no two share a row or column. The number of safe arrangements on a 3×3 grid is 3!, which equals 6.
Multiplying these steps gives 56 × 56 × 6 = 18,816 ways.
How does this apply to exam combinatorics?
In competitive exams like JEE Main and Advanced, you will often find permutation and combination problems disguised as grid questions. If a question asks for the count of two squares sharing no row or column, it is mathematically identical to the two-rooks problem.
When a combinatorics problem asks you to arrange items with restrictions, break the geometry down. Choose the allowed spaces first, then arrange the items within them.
If you get stuck turning restrictions into equations, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. Fermi's AI tutor can work out what you already know and build a plan for the session, so you sit down to a clear next step.



