Question:
Write the number of diagonals of an n-sided polygon.
Solution:
An n-sided polygon has n vertices.
By joining any two vertices of the polygon, we obtain either a side or a diagonal of the polygon.
Number of line segments obtained by joining the vertices of an n-sided polygon if we take two vertices at a time = Number of ways of selecting 2 out of n = nC2
Out of these lines, n lines are sides of the polygon.
Number of diagonals of the polygon $={ }^{n} C_{2}-n=\frac{n(n-1)}{2}-n=\frac{n(n-3)}{2}$