# There are $n$ points in a plane, no three of which collinear. Find Number of diagonals in a polygon of $n$ sides.

Q-There are $n$ points in a plane, no three of which collinear. Find the number of diagonals in a polygon of $n$ sides.

Note I found error was with formula used to find number of triangles.

My attempt

In $n$ points there are ${n}\choose{3}$ triangles. So, a polygon formed by ${n}\choose{3}$ triangles will have ${{n}\choose{3}} + 2$ sides (I got this result by noticing series like square have 2 triangles, pentagon have 3 triangles,.....)

And a polygon of $n$ sides have $\frac{n(n-3)}{2}$ diagonals . Hence ${{n}\choose{3}} + 2$ sides will have $\frac{1}{2} \Big[\big( {{n}\choose{3}}\big[{{n}\choose{3}} + 2\big] + 2\big) -3\Big]$ diagonals .

But in textbook it's answer is ${{n}\choose{2}}-n$

Please note that I am a highschool student seeking help from teachers, so please don't close my question.

Thanks everyone for paying attention to my question!!!!!

• You construct diagonals with $2$ points... So, $\binom{n}{2}$ . Again , the sides of polygon aren't diagonals... So, $\binom{n}{2}-n$ . – Entrepreneur Aug 19 '18 at 10:49
• @Entrepreneur Thanks sir, I got it .But i want to know why answer is not coming by this method – Rafael Nadal Aug 19 '18 at 10:54
• How many triangles does a hexagon have? You must go through your first argument. – Entrepreneur Aug 19 '18 at 10:58
• @Entrepreneur Hexagon = 4 triangles it goes perfect with my pattern of n-2 – Rafael Nadal Aug 19 '18 at 11:01
• No. It has $6$ of 'em – Entrepreneur Aug 19 '18 at 11:05

If you insist to make a conclusion starting from the number of triangles...

Say that you have $n$ points: $A_1, A_2, ..., A_n$.

These points define $\binom n3$ triangles. The total number of edges in all these triangles is: $3\times\binom n3$. However each edge is counted several times. For example, edge $A_1A_2$ appears in triangles $A_1A_2A_3$, $A_1A_2A_4$, ..., $A_1A_2A_n$ which means that each edge appears exactly $n-2$ times in all possible triangles.

So the total number of lines is actually:

$$\frac{3\times \binom n3}{n-2}$$

Not all lines are diagonals. You get the number of diagonas by subtracting the number of polygon sides $n$ from the total count of lines:

$$\frac{3\times \binom n3}{n-2}-n=\frac{3\times\frac{n(n-1)(n-2)}{3\times2\times1}}{n-2}-n=\frac{n(n-1)}{2}-n=\binom n2-n$$

The most complicated way to count the number of diagonals, but you asked for it :)

• There is a quicker way of getting to ${n \choose 2}$ as the number of lines joining two of the $n$ points – Henry Aug 20 '18 at 13:14
• @Henry please read my introduction... and conclusion. Submitter asked for a triangle-based proof, not the easiest one. Each vertex of the polygon participates in exactly $n-3$ diagonals with each diagonal counted twice. So the total number of diagonals is $\frac{n(n-3)}2$ – Oldboy Aug 20 '18 at 13:15