0

I'm trying to do something that looks quite simple to me, I have two set of points and I want to display the two lines passing through each of the set. for example if I have P1=(1,1) P2=(2,2) and P3=(-1,1), P4=(-2,2), I want wolfram to draw the lines y=x (as it pass through P1 and P2) and y=-x, how to do this?

there's no problem for one line, in fact if I type:

line [(1,2) (3,4)]

it shows the correct line along with the points, but I can't find a way to show two lines. I tried:

line [(1,2) (3,4)][(2,3)(4,5)]
line [(1,2) (3,4)] line [(2,3)(4,5)]
Graphics[Line[{{1, 0}, {2, 1}}], Line[{{3, 0}, {4, 1}}]]
Line[{{1, 0}, {2, 1}}, {{3, 0}, {4, 1}}]

how can I do it?

jack_the_beast
  • 1,838
  • 4
  • 34
  • 67

1 Answers1

1

"line through (1,2) and (3,4), line through (4,5) and (6,7)"

Source: https://www.wolframalpha.com/examples/CoordinateGeometry.html

iMaddin
  • 982
  • 1
  • 14
  • 23