# How many ways to make scalene triangles in a nonagon?

The title pretty much says it all, but:

How many distinct scalene triangles can be formed by connecting three vertices of a regular nonagon?

Any answers would be greatly appreciated, thank you!

Edit: I'm sorry I haven't been clear enough, but the correct answer is really the number of distinct triangles. Some answers have been correct depending of your point of view, but the correct answer does not include the same triangle mirrored or in different positions. I am really asking for the number of triangles with distinct side lengths. If several triangles have the same side lengths, then that only counts as one.

## 2 Answers

There are ${9 \choose 3}=84$ triangles in all. Each vertex is the apex of $3$ isosceles non-equilateral triangles, and there are $3$ equilateral triangles. Therefore $84-27-3=54$ scalene triangles remain.

• [+1] Yes, very neat enumeration of "real" triangles" instead of an equivalence class mod. the 18 elements of dihedral group $D_9$ ( generated by the $2 \pi/9$ rotation and an axial symmetry) as in MvG's result. Connection between the result of @MvG and yours is straightforward : $3 \times 18=54$... – Jean Marie Dec 16 '17 at 17:56

Think of a chord as the number of vertices to advance between start and finish. So the shortest possible chord would be 1, then up to 4 they would become longer. 5 is just as long as 4, and 8 is as short as 1. So in a way, a triangle is a partition of the number 9 into 3 parts, each part being a positive integer. There are $\binom82=28$ such partitions. But in order to exclude some equilateral triangles, and also omit rotated versions of the same triangle, let's concentrate on those where the parts are in ascending order since there is always a way to read the vertex differences in non-descending order for any triangle, and a scalene triangle will not have repeated counts either.

\begin{align*} 1+2+6&=9 & 1+3+5&=9 & 2+3+4&=9 \end{align*}

The $6$ has the same length as a $3$, so the first is indeed scalene. Likewise the $5$ has the same length as a $4$. In terms of lengths (still expresse din terms of vertices skipped) the three triangles above would correspond to $(1,2,3), (1,3,4), (2,3,4)$. All scalene as you can see. So if you are only interested in identifying triangles up to congruence, the answer is $3$. If you consider triangles different if they get rotated or reflected, there are $9$ ways to rotate them and $2$ ways to orient them, and for scalene triangles they will all be distinct. This leads to a total count of

$$9\cdot 2\cdot 3=54$$

• Very complete answer. Just a little precision : different indices $1,2,\cdots$ do not necessarily correspond to different lengths. Indices equal to $5, 6...$ correspond to $4, 3 ...$ resp., but fortunately, there is no consequence in your count. – Jean Marie Dec 16 '17 at 14:55
• @JeanMarie: I had that checked, but not written down. Should indeed do so. – MvG Dec 16 '17 at 17:12