How many diagonals are in a polygon?

There are at least a few different methods of solution, more if you count variations. How many methods can you find? This is the place to post them.

1. March 28, 2007 pm31 5:26 pm 5:26 pm

From each vertex, there are (n-3) different diagonals that can be drawn. (A diagonal can’t go to an adjacent vertex or from a vertex to itself.) Since there are n vertices, each of which has (n-3) diagonals radiating out of it, a total of n(n-3) segments can be drawn. But now we’ve counted the segment AB and the segment BA, so the answer needs to be divided by 2. So n(n-3)/2 gives the number of diagonals in a polygon.

March 28, 2007 pm31 8:11 pm 8:11 pm

I used slightly different logic to get the same answer: The number of distinct ways of connecting $n$ points is

$\frac{n(n-1)}{2} .$

(Application note: to astronomers who do interferometry, this is the number of “baselines” between telescopes).

Of those, $n$ connect adjacent sides and so are not “diagonals,” which means the number of diagonals is:

$\frac{n(n-1)}{2} - n = \frac{n(n-3)}{2}.$

3. March 28, 2007 pm31 9:00 pm 9:00 pm

Both of these are clear. But I wonder if anyone will run into what my students are doing? Let’s see a few more, then I will fill you in.

4. March 28, 2007 pm31 9:09 pm 9:09 pm

A middle school student-type method: Counting around the polygon from each vertex.

The first two vertices will have n – 3 diagonals each (no duplicates). The third will have one less (n – 4) because one is already drawn from the first vertex. As we proceed around the circle, one less diagonal is able to be drawn from each vertex, becuase it’s already been filled in from the other direction.

So (n -3) + (n – 3) + (n – 4) + (n – 5) … + 3 + 2 + 1.
It’s less elegant, but workable nonetheless for small value of n.

5. March 30, 2007 pm31 8:29 pm 8:29 pm

Similar to rdt’s approach: Line segments are a good abstraction of the handshake problem, where each point represents a person and each line segment a handshake. Each person (n of them) shakes all the other hands (n – 1 of them). At first, students think there should be n(n-1) handshakes, but it’s easy to see why we have to divide that product by two. Even though two people are involved in each handshake, we only want to count it once.

The handshake formula counts all the lines between the points, but n of the lines make the polygon itself. They don’t count as diagonals, so we have to subtract them.

Build-the-pattern approach: Start with a triangle, which has no diagonals. Add another vertex by drawing a point outside the triangle and connecting it to the two closest points of the triangle. What had been a side of the triangle has become a new diagonal, plus there are n-3 new diagonals that connect the new point to the other vertexes. So each new vertex on the polygon adds a total of n-2 to the number of diagonals. The pattern builds up as the polygon grows, and the number of diagonals is 2 + 3 + 4 + 5 + … + (n-2)

6. March 31, 2007 pm31 6:28 pm 6:28 pm

Sara’s n-3 + n-3 + n-4 + … + 2 + 1 gives $n-3 + \sum^{n-3}_{i=1}i = \\ n-3 + \frac{(n-3)(n-2)}{2} = \\ \frac{2n-6}{2} + \frac{n^2-5n+6}{2} = \\ \frac{n^2-3n}{2} = \\ \frac{n(n-3)}{2}$ ,
but I like all the solutions so far

January 1, 2008 am31 3:12 am 3:12 am

I was trying to work on this same problem for a discrete course I teach that unfortunately has no solution manual. I figured out on my own that it should be n(n-3)/2, but I was trying to calculate this with finite differences and came up with n(n+3)/2. I tried to later finagle the formula, but got stuck with 2(n-3) + (n-3)(n-2)/2, which doesn’t come out quite right. By any chance could you show me how to do this correctly??

Thanks.

8. January 1, 2008 am31 3:40 am 3:40 am

I don’t believe I properly understand what finite differences means. Maybe you could show me how you started?

I realize that I’d missed one major approach before. Certainly we might recognize that we have something quadratic. In that case we should find $s(n) = an^2 + bn + c$

Plugging in (3,0), (4,2), and (5,5) yields a system of linear equations:
0 = 9a + 3b + c
2 = 16a + 4b + c
5 = 25a + 5b + c

7a + b = 2, 16a + 2b = 5,
a = 1/2, b = -3/2, c = 0, so
$s(n) = \frac{n^2}{2} - \frac{3n}{2}$

9. January 23, 2009 am31 4:33 am 4:33 am

It’s a lot simpler than that. Obviously, you can’t draw a diagonal along a side or between the same point which rules out THAT vertex and it’s neighboring ones, thus, (n-3).

Also, there are n sides and, thus, n vertices, and you would do this for EACH vertex, hence, [n (n-3)].

Last, you don’t want to duplicate the same diagonal twice, so you get rid of one of the duplicates (AC and CA), thus / 2.

In the end, you get [n (n-3)] / 2.

Easy.

10. January 24, 2009 pm31 3:34 pm 3:34 pm

We were looking for multiple solutions. n(n-3)/2 was the first (at the top).