In how many ways can the nine digits from 1 to 9 be placed in a $3 \times 3$ grid so that the sums of the rows and the sums of the columns are all equal?
Answer: 72. Since $1+\cdots+9=45$, the sum of each row is 15.

Since all rows play the same role, it suffices to count the number of grids such that the 9 is on the first row, and then multiply by 3. By reasoning similarly on the columns, we can assume that the 9 is in the top left corner, and we will multiply the number of grids found by 9.

Since $6=1+5=2+4$, either the 1 and the 5 are on the same row (and then the 2 and the 4 on the same column) as the 9, or it is the reverse. Therefore, the number of grids with a 9 in the top left corner is equal to 8 times the number of grids of the form

$$
\left(\begin{array}{lll}
9 & 1 & 5 \\
2 & * & * \\
4 & * & *
\end{array}\right)
$$

It is easily verified that there is only one solution, and thus the answer is $9 \times 8=72$.