Skip to content
RMIT University Library - Learning Lab

V7 Intersecting lines in 3D


intersection of two lines in 3D space

Learn how to determine if two lines in three dimensions intersect (cross each other) and, if so, what is their point of intersection?

(See also Linear graphs)

In order to find the point of intersection of two lines in three dimensional space, it is best to have both equations in parametric form. This module discusses how to determine whether two lines intersect or not.


The equation of a line in three dimensional space can be written in either vector, parametric or symmetric form. Vector form is not so useful for determining whether two lines intersect. Parametric form is preferred for this purpose.

Parametric Form

The parametric equations of a line through the point \(\left(x_{0},y_{0},z_{0}\right)\) in the direction of the vector \(\overrightarrow{V}=a\hat{i}+b\hat{j}+c\hat{k}\) is : \[\begin{align*} x & =x_{0}+at\\ y & =y_{0}+bt\\ z & =z_{0}+ct \end{align*}\] where \(t\in\mathbb{R}\) is called a parameter. Note that \(t\) is merely a number. It has no physical significance and may be any symbol. Often \(s\) is used for the parameter.

Symmetric Form

The symmetric form of a line through the point \(\left(x_{0},y_{0},z_{0}\right)\) in the direction of the vector \(\overrightarrow{V}=a\hat{i}+b\hat{j}+c\hat{k}\) is :

\[\begin{align*} \frac{x-x_{0}}{a} & =\frac{y-y_{0}}{b}=\frac{z-z_{0}}{c}. & \left(1\right) \end{align*}\]

Converting to Parametric Form

A line in symmetric form may be converted to parametric form by setting each term in equation \(\left(1\right)\) equal to a parameter \(s\in\mathbb{R}.\) That is,

\[\begin{align*} \frac{x-x_{0}}{a} & =s\\ \frac{y-y_{0}}{b} & =s\\ \frac{z-z_{0}}{c} & =s. \end{align*}\] These can then be rearranged to give the parametric form of the line: \[\begin{align*} x & =x_{0}+as\\ y & =y_{0}+bs\\ z & =z_{0}+cs \end{align*}\] where \(s\in\mathbb{R}\).

Finding the Intersection of Two Lines

The idea is to write each of the two lines in parametric form. Different parameters must be used for each line, say \(s\) and \(t\). If the lines intersect, there must be values of \(s\) and \(t\) that give the same point on each of the lines. If this is not the case, the lines do not intersect.

The basic approach is:

  1. write each line in parametric form

  2. solve the simultaneous equations for the parameters

  3. if a solution exists the line intersect, if not they don’t intersect.

Example 1

Find the point of intersection of the two lines \(L_{1}\) and \(L_{2}\) where \(L_{1}\) is the line represented by the equation \(\frac{x-5}{1}=\frac{y-1}{-1}=\frac{z-8}{-3}\) and \(L_{2}\) is the line \(x=1+2s\) ; \(y=-4+s\) ; \(z=8-2s.\)


Line \(L_{2}\) is already in parametric form: \[\begin{align*} x & =1+2s & \left(2\right)\\ y & =-4+s & \left(3\right)\\ z & =8-2s & \left(4\right) \end{align*}\]

We now write \(L_{1}\) in parametric form. Set1 As \(L_{2}\) is using the parameter \(s\) we choose a parameter \(t\) in what follows. It doesn’t matter what you use but it must be different from \(s.\) \[\begin{align*} \frac{x-5}{1} & =t\\ \frac{y-1}{-1} & =t\\ \frac{z-8}{-3} & =t. \end{align*}\] Rearranging we obtain \[\begin{align*} x & =5+t & \left(5\right)\\ y & =1-t & \left(6\right)\\ z & =8-3t & \left(7\right) \end{align*}\]

To find the point of intersection of these two lines, we must find a point \(P\) that lies on both lines.

Lines L1 and L2 intersect at the point P

At the point of intersection the coordinates for \(L_{1}\) will equal the coordinates for \(L_{2}\). This means there exist values of \(s\) and \(t\) such that the \(x,\) \(y\) and \(z\) coordinates of the two lines are equal.

Equating the \(x,\) \(y\) and \(z\) coordinates, we get from equations \(\left(2-7\right):\)

\[\begin{align*} \text{for $x,$ }5+t= & 1+2s\\ 4= & 2s-t & \left(8\right)\\ \text{for $y,$ }1-t= & -4+s\\ 5= & s+t & \left(9\right)\\ \text{for $z,$ }8-3t= & 8-2s\\ 0= & 3t-2s. & \left(10\right) \end{align*}\] If we add equations \(\left(8\right)\) and \(\left(9\right)\) we get \(9=3s\) and so \(s=3\).

If \(s=3\) we can substitute this into all of the above equations \(\left(8-9\right)\) and find that \(t=2\). Note that you must check all equations. 2 You must check that \(s=3\) and \(t=2\) satisfies all three equations. It is common that they satisfy only \(2\) of the \(3\) equations as shown below in Example 2.

The solution is therefore

\[\begin{align*} s & =3\\ t & =2. \end{align*}\]

To find the point of intersection, substitute the \(s\) value into the \(x,y\) and \(z\) equations for \(L_{2}\) or substitute the \(t\) value into \(x,y\) and \(z\) equations for \(L_{1}\). For \(L_{1},\)

\[\begin{align*} x & =5+t\\ & =5+2\\ & =7\\ y & =1-t\\ & =1-2\\ & =-1\\ z & =8-3t\\ & =8-3(2)\\ & =2 \end{align*}\]

Therefore the point of intersection of the two lines is \((7,-1,2).\)

Example 2

Do the lines \(L_{1}:\) \(x=s\) ; \(y=-4+s\) ; \(z=8-2s\) and
\(L_{2}:\) \(x=2+2t\) ; \(y=-1+t\) ; \(z=3-2t\) intersect?


Equate the coordinates of each line. We have: \[\begin{align*} \text{for $x,$ }s= & 2+2t\\ s-2t= & 2 & \left(11\right)\\ \text{for $y,$ }-4+s= & -1+t\\ s-t= & 3 & \left(12\right)\\ \text{for $z,$ }8-2s= & 3-2t\\ -2s+2t= & -5. & \left(13\right) \end{align*}\] Subtract equation \(\left(11\right)\) from equation \(\left(12\right)\): \[\begin{align*} s-t-\left(s-2t\right) & =3-2\\ t & =1. \end{align*}\] Substitute \(t=1\) in equation \(\left(11\right)\): \[\begin{align*} s-2\left(1\right) & =2\\ s & =4. \end{align*}\] We have a solution namely, \(t=1\), \(s=4\) but this must be checked with all equations. The proposed solution satisfies equations \(\left(11\right)\) and equation \(\left(12\right)\) but substituting in equation \(\left(13\right)\), \[\begin{align*} -2\left(4\right)+2\left(1\right) & =-5\\ -8+2 & =-5\\ -6 & =-5. \end{align*}\] The last statement is clearly untrue. Consequently, we conclude there is no solution for \(t\) and \(s\) and so the lines do not intersect. In this case, we say the lines are skew.


Find the point of intersection of the lines

\(x=2t+2\) ; \(y=2t+3\) ; \(z=t+3\) and \(\frac{x+2}{2}=\frac{y-2}{-1}=\frac{z}{2}\)

Answer: \(\left(0,1,2\right)\)

Download this page: V7 Intersecting Lines (PDF 287KB)

What's next... V8 Equation of a plane