I know that the total number of squares of any size on an $n \times n$ chessboard is equal to $ \frac 1 6 n(n + 1)(2n+1)$ (i.e. the sum of the first $n$ squares). But what is the general formula for the total number of right-angled triangles on an $n \times n$ chessboard? Thanks.
2026-03-26 11:01:01.1774522861
On
Total number of right-angled triangles that can be formed on an $n \times n$ chessboard
1.4k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
On
Each triangle contains one horizontal leg (which goes from left to right across chess board). The number of horizontal legs in one horizontal boundary (ie the horizontal boundary between squares or between squares and the edge of the board) is $\binom{n+1}{2}$. The number of horizontal boundaries in $n+1$. So there are $\binom{n+1}{2}(n+1)$ horizontal legs. Each horizontal leg can be in $2n$ triangles. So number of triangles is
$$\binom{n+1}{2}(n+1)2n \Rightarrow ((n+1)n)^2 \Rightarrow \left(2\binom{n+1}{2}\right)^2 $$.
For $n=1,2,3$ this gives $4, 36, 144$ triangles.
The number of rectangles that can be formed is clearly $\binom{n+1}{2}\binom{n+1}{2}$, since there are $\binom{n+1}{2}$ ways to choose the left and right sides and $\binom{n+1}{2}$ ways to choose top and bottom sides. For each such rectangle we have four right angled triangles. In this we are counting each triangle only once since we are counting them by the smallest rectangle that encloses them. Thus the number is $4\binom{n+1}{2}\binom{n+1}{2}$