Intersection of Two Lines Using Vectors

The intersection of two lines, each given by a pair of points (i.e. the respective equations are not used), is obtained by elementary vector considerations.
step 1
Objective: to find the intersection of the two lines and .
step 2
The projection (blue line ) of the red segment through perpendicular to onto has magnitude , where is the angle between the red segment and .
step 3
In vector terms, the tip of the blue vector is at a distance from , so that its position vector is , where is a unit vector (in purple). Use the positive sign whenever ; otherwise use the negative sign.
step 4
Let be the angle betwen the lines and . The point of intersection of the two lines (in orange) lies at the distance from (with ), so that its position vector is , where is a unit vector (in black). Choose the sign to give the position closest to .


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


The method relies on Mathematica's capabilities to handle vectors and the angles between them. If is the angle between the two lines, and is the angle between the red segment and the line (see step 2 in the figure), then it can readily be seen that the position vector of the point of intersection is
(, implying that the two lines are not parallel), where and are the position vectors of the points and , is the length of the red segment, and is a unit vector in the direction of the line , from to .
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2018 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+