How many triangles can be formed from four points?

I am interested what is a number of different way to form triangle from point of $4$ point; on one test, I could not copy it's solution, it is said that it equals to

$$\frac{4!}{3!(4-3)!}$$

but I am surprised, order of points does not matter? If three point are on the same line that no triangle could be formed, so order of points are important yes? Or it is not related to order, because order is defined as position as I know, also here the formula is

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

Which one is correct?


Solution 1:

The order isn't important, it has nothing to do with the triangle; once the triangle has been drawn, you can't tell the order of the points. Alternatively, changing the order does not change the triangle.

Given four objects (in this case points), there are ${4 \choose 3} = \frac{4!}{3!(4-3)!} = 4$ ways of choosing three of them. The only potential issue is the one that arises when the three chosen points are collinear. Do these form the vertices of a triangle? Well, it depends on what you call a triangle.

Most people would say no. In this case, you need to remove all the possibilities which lead to collinear points. If all four points are collinear, no triangles can be formed. If three of the four points are collinear, but the fourth point does not lie on that line, three triangles can be formed, i.e. one possible choice of three points does not form a triangle. Finally, if no three of the points are collinear (i.e. the points are in general position, thanks André Nicolas), then four triangles can be formed.

If your definition of triangle includes the possibility that the vertices are collinear, then all four choices of three points lead to triangles so the number of triangles that can be formed is four, regardless of the configuration of the four points.