My solutions:
Solution #0: 84 triangles
This is making as many triangles as possible with 9 lines, dealing with any triangle
as opposed to just equilateral triangles. The solution is any arrangement in which
every line crosses every other line. [mathematically: (9*8*7)/(3*2*1) = 84 unique
sets of three lines out of 9; since all lines cross, any three make a triangle]
Solution #1: 27 triangles
This is making as many triangles as possible with 9 lines, dealing only with equilateral
triangles. Since we only want equilaterals, only three different orientations of lines are
used ( angled such as "-", " / ", and " \ " ). To maximize number of triangles I split them
evenly using 3 lines of each of the 3 orientations. The solution is any arrangement in
which each line crosses every line of a different orientation.[mathematically:
3A*3B*3C= 27 ABC where A,B,and C are lines of the three different orientations]
Solution #2: 12 triangles
This is making as many same-size equilateral triangles as possible with 9 lines. This is
the same as solution #1, only with the lines spaced evenly so as to maximize same-size
triangle creation. [unfortunately, I couldn't come up with a good simple mathematical
model for this due to the need to not count overlapping and such. However, my solution
fits nicely on a triangular grid, and each line is part of four different same-size triangles.
So it's likely as efficient as it can be.]
Solution #3: 7 triangles
This is making as many same-size equilateral triangles as possible with 9 lines while
avoiding making other sized triangles. The first two lines do not create any triangles,
but each line after can make exactly one more. It isn't possible to use them more
efficiently because to do so would create larger triangles.
[mathematically: 9 lines - 2 starting lines = 7 triangles]
Note: edited to correct solution #3.