5. From the 16 vertices of the $3 \times 3$ grid composed of 9 unit squares as shown in the figure, if three vertices are chosen at random, then the probability that these three points form a right-angled triangle is $\qquad$ .
Solve $\frac{9}{35}$.
Analysis First, calculate the number of rectangles, then calculate the number of right triangles.
According to the characteristics of rectangles, 36 different rectangles can be formed by these 16 points, which is $C_{4}^{2} \times C_{4}^{2}=36$.
Each rectangle can be divided into 4 different right triangles, and the right triangles obtained from different rectangles are also different, thus yielding $4 \times 36=144$ different right triangles. Therefore, the required probability is $P=\frac{144}{C_{16}^{3}}=\frac{144}{40 \times 14}=\frac{9}{35}$.