# How to create a line due to requiriements?

Considering we have three lines, and know the intersection points (How to find intersection points of lines?)

How can I draw a line that will cross the intersection point of the two lines and will be parallel to the third line?

Thanks.

• I consider that it always exists (like -x + 1, 2 x - 3 and 5 x - 1) Feb 16, 2015 at 11:22

I'm not sure I understand your question correctly, but a parallel line could look like and be constructed as follows.

The interesting points:

p1 = Plot[{f1, f2, f3}, {x, -5, 5}, PlotLegends -> "Expressions",
Epilog -> {Red, PointSize[Large],
Point[{{1, 0}, {-1, 2}, {-1, -2}, {-3, 0}}]}]


And connected with a InfiniteLine

infL = Graphics[InfiniteLine[{{-3, 0}, {-1, -2}}]];
Show[p1, infL]


Or you can find a Fit:

p2 = {-1, -2};
p1 = {-3, 0};
MyFit = Fit[{p1, p2}, {1, x}, x] // Chop


-3. - 1. x

and use it with Plot:

Plot[{f1, f2, f3, MyFit}, {x, -5, 5}, PlotLegends -> "Expressions",
Epilog -> {Red, PointSize[Large], Point[{{1, 0}, {-1, 2}, p2, p1}]}]