# Interactive Point Where Two Lines Intersect

This interactive demonstrates the point where two lines intersect. The interactive has four blue control points which define the shape of two lines. Click and drag any of the control points to see the point of intersection change.

## Calculating the Position of the Point

The general solution to finding the position of the point of intersection is to find or identify the equations of the lines.

Then we can solve for the point by setting the two lines equal to each other. This will give us the x position where the two lines intersect. Then that position can be substituted back into one of the equations to get the y position. This is shown in the steps below.

### Special Cases

When calculating the point where two lines intersect there are a number of special cases to consider.

#### Vertical Line

In the case of a vertical line, the slope-intercept form of the line will result in an infinite slope, because of the division of zero. In computing, we can trap this error by checking the value of the slope and then manually set the x-position of the point of intersection and solve for the y-position. #### Parallel Lines

In the case of parallel lines, the two lines in slope-intercept form will have the same slope. If they have different y-intercepts, then a solution does not exist. Otherwise, if they have the same y-intercepts they are the same line and infinitely many solutions exist. ## Examples

The example(s) below demonstrate the full process of taking four points which define two lines and then finding the point of intersection. To find the point where two lines intersect set the equations equal together and solve for the x-coordinate. Then substitute the solved for coordinate back into one of the equations to get the y-coordinate.

Steps
{"ft_lang_label":"__label__en","ft_lang_prob":0.8992736,"math_prob":0.99005014,"size":1689,"snap":"2020-24-2020-29","text_gpt3_token_len":330,"char_repetition_ratio":0.18160237,"word_repetition_ratio":0.05923345,"special_character_ratio":0.19123742,"punctuation_ratio":0.071207434,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99946874,"pos_list":[0,1,2,3,4,5,6],"im_url_duplicate_count":[null,2,null,2,null,2,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-07-12T12:44:29Z\",\"WARC-Record-ID\":\"<urn:uuid:091479be-4726-458f-af04-efbdef2a0624>\",\"Content-Length\":\"6025\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:1465c1b0-dcf9-4cdd-b196-98df2f87e6d9>\",\"WARC-Concurrent-To\":\"<urn:uuid:80dbc2a3-db5a-4696-9a26-f8470d2b2251>\",\"WARC-IP-Address\":\"185.199.110.153\",\"WARC-Target-URI\":\"https://wumbo.net/interactive/point-where-two-lines-intersect/\",\"WARC-Payload-Digest\":\"sha1:PDJPNPFS2PB2YCKEP5II55FW7GY2VMXH\",\"WARC-Block-Digest\":\"sha1:ZYFKPVHW652YRHGCTUD7WNXCNXMQNLZZ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-29/CC-MAIN-2020-29_segments_1593657138718.61_warc_CC-MAIN-20200712113546-20200712143546-00547.warc.gz\"}"}