0
votes

There are two pairs of points given by the coordinates. I have to create two lines out of those pairs of points, and to calculate the point of intersection of those lines.

This can be instance of how the points are given.

A1 = {2, 2};
A2 = {2, 4};
A3 = {3, 1};
A4 = {4, 3};

Graphics[{Line[{A1, A2}], Line[{A3, A4}]}]
1

1 Answers

1
votes
(Ay-By)/(Ax-By)=0
(Cy-Dy)/(Cx-Dy)=0

These equations will give you the slopes of the two lines. When you set them equal to 0 it will also give you the y intercept of them giving you y=mx+b for both lines. Once you get this all you have to do is set them equal to each other (y1=y2). This will give you the x coordinate. Plug this x coordinate into both of your lines to double check it. This is your intersection.