To calculate the answer, we start off with how many choices we have. Since it’s established that there are seven total lines that make up the structure, we have seven choices for which colored line makes up the first “leg” of the triangle. After this, we need to pick another colored line to be our triangle’s second “leg”.

Even though it might appear that we have seven choices again, we actually have six. This is because a colored line-- let’s just say purple-- can’t be both the first and second “leg” of a triangle. So we eliminate one choice as the number of “legs” increases. When we find the third “leg” of the triangle, the same concept applies. If we chose purple and blue (or any other two colors) for our first two lines, there are five remaining lines to choose from.

After that, the math boils down to multiplying and dividing. We know that the number of total combinations of lines for triangle formation is 7x6x5, which equals 210. But there obviously aren’t 210 triangles in this picture. So what went wrong? Actually, the calculation itself is correct. But, we have also counted some combinations more than once. Luckily, finding these redundancies is not difficult.

Choosing from any three lines arbitrarily is just like choosing the order of letters A, B, and C. We can jumble them to create ABC. BCA, CAB, ACB, BAC, and CBA. Even though each sequence contains the same letters, there are six ways to shuffle these letters. Let’s say for our third line, we picked red. Mathematically, based on our calculation, our triangle could be made from lines:

1. Purple, blue, red

2. Blue, red, purple

3. Red, purple, blue

4. Purple, red, blue

5. Blue, purple, red

6. Red, blue, purple