A Triangle Problem

Introduction
I came across this problem in 5th grade. It was a warm-up problem in a textbook.
How many triangles can you make with 6 lines?
It seems straightforward, but can end up being a tricky problem the less you assume. Go ahead and try it for yourself. Below is an applet where you can draw some figures. Try to see what is the most triangles you can create with only six line segments.What's the most amount of triangles you can make with 6 triangles?

3 Lines
The problem may see a bit abstract, but we can simplify the problem to something easier to understand. First, let's consider the case with just 3 lines. Obviously, we can only generate 1 triangle with 3 lines, but let's consider why this is the case.
A triangle is formed when three lines intersect each other, but not at the same point. Corollary to this is no two lines can be parallel, otherwise they would not intersect (and would not generate a triangle). So, if we pick 3 non-parallel lines, and the lines intersect each other at unique points, we must have 3 points of intersection (each pair [3x] of lines will intersect). So with 3 lines, we get 1 combination of these three intersections. Thus, we get 1 triangle.
4 Lines
Let's take this a step further. What is the maximum amount of triangles we can make with 4 lines?
Well, just like last time, we want to choose 4 lines that are non-parallel and no 3 lines intersect at the same point, since this will give us the max amount of POIs. If no 2 lines are parallel, all 4 will intersect with every other line. Since every line intersects, if we pick any set of three lines we will find a triangle (Try in the graphic below). So in a group of 4 lines, we have 4 subsets of 3 lines creating 4 triangles.
N lines
Abstracting this concept to n lines, if we choose n non-perpendicular lines where no 3 lines intersect at the same point, we can pick any set of 3 lines and find a triangle. Alternatively we could say that given n lines, we have:
triangles
Observe the example below of the answer to the 6 line problem. The maximum number of triangles we should be able to create is triangles. Try to count all 20! (Hint: try highlighting a set of 3 lines, then find the triangle made from their intersection)Consider Spherical
We have a general formula for the maximum number of triangles formed in Euclidean geometry. What do you think will change if we were to work in Spherical coordinates?
Assuming that lines are the geodesics (great circles) around the sphere, what is the maximum number of triangles we can make using n lines on a sphere?
If you would like to, try it for yourself in the applet below. You are given the first 3 lines. How many triangles are there? How many more can there be if you add a fourth line?
3 Lines on a Sphere
The answer...
We can see in the above example that now, 3 lines can make EIGHT triangles! The fact that every line can intersect any other line TWICE creates a huge difference in the triangles we make. So the general answer may not a simple as it seems.
- From the Euclidean example, we know that: We should be using non-parallel lines where no 3 lines will intersect at the same point.
- Then taking what we know from spherical geometry, we know that any two lines will intersect twice, once on the front and once on the antipodal side.
- The lines j, k, and, l intersect at points A, B, and C. This means we have 3 antipodal intersection points at A', B', and C',
- Then when we decide which 3 POIs to use to construct our triangle we will have:
{A, B, C}, {A', B, C}, {A, B', C}, {A, B, C'}, {A, B', C'}, {A', B, C'}, {A', B', C}, {A', B', C'}
- Which are 8 unique sets
- (Consider why we can't make a triangle from a point and its antipodal point. ex: {A, A', B})
- In fact, this is just the formula triangles. Since for each point we can choose to take the front point or the antipodal point.
4 Lines on a Sphere
In general
It's hard to count, but there are not 16 triangles on the sphere. There are 32 triangles! Let's try and prove it.
- In the previous case when we had only 3 lines, we proved that there are 8 triangles on the sphere.
So what changes when we add the 4th line?
- All 8 triangles that were there in the previous case are still there when we have add the 4 line. And this accounts for every triangle that can be created with the first 3 lines.
- So, we only need to consider triangles formed including (using) the 4th line.
- They form 8 unique triangles
- This comes directly from the previous proof
- They should also form 8 unique triangles
- They must form 8 unique triangles from the ones made by j, k, l, since: all triangles formed by j, k, l have l as one side, but the triangles made by j, k, m do not have l as a side, instead they have m
- So none of the 8 triangles made by j, k, m will overlap with the triangles made from j, k, l
- Both of these triples will create 8 unique triangles each
The Formula
So that means the final formula is actually:
Given n lines we can make a maximum of triangles.