5. A $4 \times 4$ square grid is composed of 16 points (see figure). How many rectangles with vertices at these points are there? (Squares are also considered special cases of rectangles.)

![](https://cdn.mathpix.com/cropped/2024_06_04_adcebcbe7d41887b6eefg-20.jpg?height=315&width=315&top_left_y=636&top_left_x=722)

## Second Grade - B Category
5. Let's first count the rectangles with sides parallel to the grid lines. Each such rectangle is determined by the selection of two opposite vertices, i.e., two points out of the existing 16 that are not on the same horizontal or vertical line. The first point can be chosen in 16 ways, and the second in 9 ways (after the first point, 9 points remain that are not on the same horizontal or vertical line with it), so the number of such pairs of points is $\frac{16 \cdot 9}{2}=72$ (we divide by 2 because the order of the points does not matter).

![](https://cdn.mathpix.com/cropped/2024_06_04_adcebcbe7d41887b6eefg-58.jpg?height=269&width=274&top_left_y=1750&top_left_x=1267)

Dr 2019 1B 5 ka nijed not important). Finally, with these selections of pairs of opposite vertices, each rectangle has actually been counted twice (since each rectangle has two pairs of opposite vertices), so the number of observed rectangles is 36.

Furthermore, we have 4 "skewed" squares with side length $\sqrt{2}$ (which are at a $45^{\circ}$ angle to the grid lines), and 2 squares with side length $\sqrt{5}$. Finally, there are also two "skewed" rectangles with side lengths $\sqrt{2}$ and $\sqrt{8}$ (one such rectangle and one of the previously mentioned squares are shown in the figure).

Thus, the solution to the problem is: $36+4+2+2=44$ rectangles.

## Second Grade - B Category