Example 1.13 Let $A_{n}$ be a convex $n$-sided polygon, in which no three diagonals intersect at the same point. Find:
(1) The number of diagonals in $A_{n}$.
(2) The number of triangles (referred to as the triangles of $A_{n}$) formed by the sides and diagonals of $A_{n}$.
Solution: (1) If we call the sides and diagonals of $A_{n}$ the lines of $A_{n}$, then $A_{n}$ has a total of $\binom{n}{2}$ lines, of which $n$ lines are the sides of $A_{n}$. Therefore, the number of diagonals of $A_{n}$ is
$$
\binom{n}{2}-n=\frac{n(n-1)}{2}-n=\frac{n(n-3)}{2} .
$$
(2) Let the total number of triangles in $A_{n}$ be $N$. Then these $N$ triangles can be divided into the following 4 categories: This classification is too broad.
(1) Triangles with all 3 vertices being vertices of $A_{n}$. There are $\binom{n}{3}$ such triangles.
(2) Triangles with only two vertices being vertices of $A_{n}$. Such triangles are formed by two intersecting diagonals and one side (Figure 1.3a), with the endpoints of the side being the endpoints of the two diagonals. Since 4 vertices of $A_{n}$ determine two intersecting diagonals, and two intersecting diagonals determine 4 such triangles, there are $4\binom{n}{4}$ such triangles.
(3) Triangles with only one vertex being a vertex of $A_{n}$. Such triangles are formed by 3 diagonals (Figure 1.3b). These 3 diagonals have 5 points that are vertices of $A_{n}$, and form 5 such triangles, so there are $5\binom{n}{5}$ such triangles.
(4) Triangles with none of the 3 vertices being vertices of $A_{n}$. Such triangles are formed by 3 diagonals (Figure 1.3c). These 3 diagonals have 6 points that are vertices of $A_{n}$, and form 1 such triangle, so there are $\binom{n}{6}$ such triangles.
By the principle of addition, we get
$$
N=\binom{n}{3}+4\binom{n}{4}+5\binom{n}{5}+\binom{n}{6} .
$$