4.2. Lines#

Euclid defined a line as having “breadthless length” which is another way of saying a line is a one dimensional object that has a length but no breadth or volume. Given that we have already taken the time to introduce vectors in \(\mathbb{R}^n\) in Vectors it makes sense to use them to define what it means to be a line in \(\mathbb{R}^n\).

Definition 4.1 (Vector equation of a line)

Let \(\vec{p}\) be a position vector of a point in \(\mathbb{R}^n\) and \(\vec{d}\) a non-zero vector in \(\mathbb{R}^n\). The line \(\ell\) [1] which passes through \(\vec{p}\) in the direction of \(\vec{d}\) has equation

(4.1)#\[ \vec{r} = \vec{p} + t\vec{d}, \]

where \(\vec{r}\) is a point on \(\ell\) and \(t \in \mathbb{R}\) is a parameter.

In other words, every point on \(\ell\) is obtained by adding some scalar multiple of \(\vec{d}\) to \(\vec{p}\) (Fig. 4.3). So \(\ell\) is the line which passes through \(\vec{p}\) in the direction of \(\vec{d}\). We call the vector \(\vec{d}\) a direction vector of the line.

../_images/4_vector_equation_of_a_line.svg

Fig. 4.3 The position of any point on the line \(\ell\) can be obtained by adding a scalar multiple of \(\vec{d}\) to \(\vec{p}\).#

The equation of the line that passes through the two points with position vectors \(\vec{p}_1\) and \(\vec{p}_2\) can be determined by using (4.1) with \(\vec{p} = \vec{p}_1\) and \(\vec{d} = \vec{p}_2 - \vec{p}_1\). In particular, \(\vec{d}\) and \(\vec{p}\) are not unique and we can choose any point on the line for \(\vec{p}\) and non-zero scalar multiple of \(\vec{d}\) to express the same line. Take for instance the \(x\)-axis in \(\mathbb{R}^3\). \(\ell\) can be described as

\[\begin{split} \vec{r} = \begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix} + t \begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix} = \begin{pmatrix} t \\ 0 \\ 0 \end{pmatrix}, \end{split}\]

which means we are taking \(\vec{p} = (0,0,0)\) and \(\vec{d}=(1,0,0)\) and for example the point with position vector \(\vec{q} = (5,0,0)\) is found when \(t=5\). Alternatively we can describe the \(x\)-axis as

\[\begin{split} \vec{r} = \begin{pmatrix} 71 \\ 0 \\ 0 \end{pmatrix} + t \begin{pmatrix} 5 \\ 0 \\ 0 \end{pmatrix} = \begin{pmatrix} 71 + 5t \\ 0 \\ 0 \end{pmatrix}, \end{split}\]

which means we are taking \(\vec{p} = (71,0,0)\) and \(\vec{d} = (5,0,0)\) and the point \(\vec{q} = (5,0,0)\) is found when \(71 +5t = 5 \implies t = -66/5\).

Example 4.1

Given a point with position vector \(\vec{p} = (1, 0, 2, 1, 4)^\mathsf{T}\) and a direction vector \(\vec{d} = (1, -1, 0, -1, 1)^\mathsf{T}\) in \(\mathbb{R}^5\), find the equation of the line \(\ell\) which passes through \(\vec{p}\) in the direction of \(\vec{d}\).

Solution (click to show)
\[\begin{split} \vec{p} + t\vec{d} = \begin{pmatrix} 1 \\ 0 \\ 2 \\ 1 \\ 4 \end{pmatrix} + t \begin{pmatrix} 1 \\ -1 \\ 0 \\ -1 \\ 1 \end{pmatrix} = \begin{pmatrix} 1 + t \\ -t \\ 2 \\ 1 - t \\ 4 + t \end{pmatrix}. \end{split}\]

4.2.1. Intersecting lines#

Definition 4.2 (Intersection between two lines)

Two lines \(\ell_1\) and \(\ell_2\) with corresponding vector equations \(\vec{p}_1 + t_1\vec{d}_1\) and \(\vec{p}_2 + t_2\vec{d}_2\) in \(\mathbb{R}^n\) intersect if there exists values of \(t_1\) and \(t_2\) such that

\[ \vec{p}_1 + t_1 \vec{d}_1 = \vec{p}_2 + t_2 \vec{d}_2. \]
../_images/4_line_line_intersection.svg

Fig. 4.4 The intersection between the two lines \(\ell_1\) and \(\ell_2\).#

To determine whether two lines intersect we simply equate the vector equations of the two lines and attempt to solve for \(t_1\) and \(t_2\).

Example 4.2

Three lines \(\ell_1\), \(\ell_2\) and \(\ell_3\) in \(\mathbb{R}^3\) are defined by the vector equations \((1 + t_1, -3 + 2t_1, t_1)^\mathsf{T}\), \((6 - t_2, -5 + 2t_2, t_2 - 1)^\mathsf{T}\) and \((6 + 2t_3, -11 + 2t_3, -2 - t_3)^\mathsf{T}\) respectively. Determine the points of intersection between the three lines (if possible).

Solution (click to show)

Equating \(\ell_1\) and \(\ell_2\) gives

\[\begin{split} \begin{align*} 1 + t_1 &= 6 - t_2, \\ -3 + 2t_1 &= -5 + 2t_2, \\ t_1 &= -1 + t_2. \end{align*} \end{split}\]

The third equation is \(t_1 = t_2 - 1\) and substituting into the first equation gives \(t_2 = 3\) so \(t_1 = 2\). Substituting these into the second equation gives \(-3 + 2(2) = -5 + 2(3)\) which is \(1 = 1\) so \(\ell_1\) and \(\ell_2\) intersect. To find the point of intersection we substitute \(t_1\) or \(t_2\) into the equations for \(\ell_1\) or \(\ell_2\) respectively.

\[\begin{split} \begin{align*} \begin{pmatrix} 1 + 2 \\ -3 + 2(2) \\ 2 \end{pmatrix} &= \begin{pmatrix} 3 \\ 1 \\ 2 \end{pmatrix}, \\ \begin{pmatrix} 6 - 3 \\ -5 + 2(3) \\ 3 - 1 \end{pmatrix} &= \begin{pmatrix} 3 \\ 1 \\ 2 \end{pmatrix}. \\ \end{align*} \end{split}\]

So \(\ell_1\) and \(\ell_2\) intersect at \((3, 1, 2)\).

Equating \(\ell_1\) and \(\ell_3\) gives

\[\begin{split} \begin{align*} 1 + t_1 &= 6 + t_3, \\ -3 + 2t_1 &= -11 + 2t_3, \\ t_1 &= -2 - t_3. \end{align*} \end{split}\]

Substituting the third equation into the first equation gives \(1 - 2 - t_3 = 6 + t_3\) so \(t_3 = -7/2\) and \(t_1 = -21/2\). Substituting these into the second equation gives \(-3 + 2(-21/2) = -11 + 2(-7/2)\) which is \(-24 = -18\) which is a contradiction so no values of \(t_1\) or \(t_3\) satisfy \(\ell_1 = \ell_3\) and \(\ell_1\) and \(\ell_3\) do not intersect.

Equating \(\ell_2\) and \(\ell_3\) gives the system

\[\begin{split} \begin{align*} 6 - t_2 &= 6 + 2t_3, \\ -5 + 2t_2 &= -11 + 2t_3, \\ -1 + t_2 &= -2 - t_3. \end{align*} \end{split}\]

The third equation gives \(t_2 = -1 - t_3\) and substituting into the first equation gives \(6 + 1 + t_3 = 6 + 2t_3\) so \(t_3 = 1\) and \(t_2 = -2\). Substituting these into the second equation gives \(-5 + 2(-2) = -11 + 2(1)\) which is \(-9 = -9\) so \(\ell_2\) and \(\ell_3\) intersect. Substituting \(t_2\) and \(t_3\) into the equations for \(\ell_2\) and \(\ell_3\)

\[\begin{split} \begin{align*} \begin{pmatrix} 6 - (-2) \\ -5 + 2(-2) \\ -1 + (-2) \end{pmatrix} &= \begin{pmatrix} 8 \\ -9 \\ -3 \end{pmatrix}, \\ \begin{pmatrix} 6 + 2(1) \\ -11 + 2(1) \\ -2 - 1 \end{pmatrix} &= \begin{pmatrix} 8 \\ -9 \\ -3 \end{pmatrix}. \end{align*} \end{split}\]

So \(\ell_2\) and \(\ell_3\) intersect at \((8, -9, -3)\).

4.2.2. Parallel lines#

Definition 4.3 (Parallel lines)

Two lines \(\ell_1\) and \(\ell_2\) in \(\mathbb{R}^n\) defined by the vector equations \(\vec{r}_1 = \vec{p}_1 + t_1 \vec{d}_1\) and \(\vec{r}_2 = \vec{p}_2 + t_2 \vec{d}_2\) respectively are said to be parallel if their direction vectors are parallel, i.e., \(\vec{d_1} = k\vec{d_2},\) for some non-zero scalar \(k\) (Fig. 4.5).

../_images/4_parallel_lines.svg

Fig. 4.5 The lines \(\ell_1\) and \(\ell_2\) are parallel in \(\mathbb{R}^3\).#

In practice the condition from the definition of parallel lines can be verified as follows: two lines \(\ell_1\) and \(\ell_2\) in \(\mathbb{R}^n\) are parallel if for any two distinct points \(\vec{p}_1, \vec{p}_2 \in \ell_1\) and any two distinct points \(\vec{q}_1, \vec{q}_2 \in \ell_2\)

\[ \vec{p}_2 - \vec{p}_1 = k(\vec{q}_2 - \vec{q}_1), \]

for some non-zero \(k \in \mathbb{R}\).

Example 4.3

\(\ell_1\) and \(\ell_2\) are two lines in \(\mathbb{R}^3\) be defined by \(\{(x,y,z) : z = x+1, y=0\}\) and \(\{(x,y,z) : z = -x-1, y=3\}\).

(i)   Write equations for \(\ell_1\) and \(\ell_2\) in vector form;

Solution (click to show)

To calculate the direction vector \(\vec{d}\) we need two points on the line. Choosing \(x=0\) and \(x=1\) then we have the two points with position vectors \(\vec{p}_1 = (0, 0, 1)^\mathsf{T}\) and \(\vec{p}_2 = (1, 0, 2)^\mathsf{T}\) on \(\ell_1\). Therefore

\[\begin{split} \begin{align*} \vec{d} = \vec{p}_2 - \vec{p}_1 = \begin{pmatrix} 1 \\ 0 \\ 2 \end{pmatrix} - \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix}, \end{align*} \end{split}\]

so the equation of \(\ell_1\) is

\[\begin{split} \begin{align*} \vec{r}_1 = \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix} + t \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix} = \begin{pmatrix} t \\ 0 \\ 1 + t \end{pmatrix}. \end{align*} \end{split}\]

Doing similar for \(\ell_2\) we have \(\vec{p}_1 = (0, 3, -1)^\mathsf{T}\), \(\vec{p}_2 = (1, 3, -2)^\mathsf{T}\) so

\[\begin{split} \begin{align*} \vec{d} = \vec{p}_2 - \vec{p}_1 = \begin{pmatrix} 1 \\ 3 \\ -2 \end{pmatrix} - \begin{pmatrix} 0 \\ 3 \\ -1 \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \\ -1 \end{pmatrix}, \end{align*} \end{split}\]

so the equation of \(\ell_2\) is

\[\begin{split} \begin{align*} \vec{r}_2 = \begin{pmatrix} 0 \\ 3 \\ -1 \end{pmatrix} + t \begin{pmatrix} 1 \\ 0 \\ -1 \end{pmatrix} = \begin{pmatrix} t \\ 3 \\ -1 -t \end{pmatrix}. \end{align*} \end{split}\]

(ii)   show that these lines are not parallel in \(\mathbb{R}^3\).

Solution (click to show)

To verify if the two lines are parallel we do not need to know their equations, just their direction vectors. From the definition of parallel lines, \(\ell_1\) and \(\ell_2\) are parallel if \(\vec{d}_1 = k\vec{d}_2\), therefore

\[\begin{split} \begin{align*} \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix} &= k \begin{pmatrix} 1 \\ 0 \\ -1 \end{pmatrix} \qquad \implies \qquad \begin{matrix} k = 1, \\ k = -1 \end{matrix} \end{align*} \end{split}\]

Here we have a contradiction so no value of \(k\) exists to satisfy \(\vec{d}_1 = k\vec{d}_2\) so \(\ell_1\) and \(\ell_2\) are not parallel.

4.2.3. Skew lines#

Definition 4.4 (Skew lines)

Two distinct lines in \(\mathbb{R}^3\), which neither intersect nor are parallel, are called skew lines (Fig. 4.6)

../_images/4_skew_lines.svg

Fig. 4.6 The lines \(\ell_1\) and \(\ell_2\) are skew lines in \(\mathbb{R}^3\).#

Example 4.4

Show that the lines \(\ell_1\) and \(\ell_2\) from Example 4.3 are skew lines.

Solution (click to show)

We have shown in Example 4.3 that \(\ell_1\) and \(\ell_2\) are not parallel. Therefore to we need to show that they do not intersect. Equating \(\ell_1\) and \(\ell_2\) gives

\[\begin{split} \begin{align*} t_1 &= t_2, \\ 0 &= 3, \\ -1 &= -1 - t_2. \end{align*} \end{split}\]

Here the second equation is a contradiction so this system is inconsistent and the lines \(\ell_1\) and \(\ell_2\) do not intersect. Since \(\ell_1\) and \(\ell_2\) are not parallel and do not intersect then they must be skew.

4.2.4. Perpendicular lines#

Definition 4.5 (Perpendicular lines)

Two lines, \(\ell_1\) and \(\ell_2\), are perpendicular if their direction vectors \(\vec{d}_1\) and \(\vec{d}_2\) respectively are at right angles. We denote this using \(\ell_1 \perp \ell_2\). In \(\mathbb{R}^n\) two lines are perpendicular if and only if their direction vectors are perpendicular, which happens precisely when their dot product is zero.

Example 4.5

(i)   Determine whether the two lines from Example 4.3 are perpendicular.

Solution (click to show)

The direction vectors were \(\vec{d}_1 = (1, 0, 1)\) and \(\vec{d}_2 = (1, 0, -1)\)

\[\begin{split} \begin{align*} \vec{d}_1 \cdot \vec{d}_2 = \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix} \cdot \begin{pmatrix} 1 \\ 0 \\ -1 \end{pmatrix} = 1 + 0 + (-1) = 0. \end{align*} \end{split}\]

So \(\ell_1 \perp \ell_2\).

(ii)   Find the equation of a line \(\ell_2\) which is perpendicular to \((t,-t,1+t)^\mathsf{T}\) at the point with position vector \(\vec{p} = (-1,1,0)^\mathsf{T}\).

Solution (click to show)

Writing the line \((t,-t,1+t)\) in the form \(\vec{p}_1 + t \vec{d}_1\) we have

\[\begin{split} \begin{align*} \vec{p}_1 &= \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix}, & \vec{d}_1 &= \begin{pmatrix} 1 \\ -1 \\ 1 \end{pmatrix}. \end{align*} \end{split}\]

To find a direction vector perpendicular to \(\vec{d}_1\), \(\vec{d}_2\) say, we need to satisfy \(\vec{d}_1 \cdot \vec{d}_2 = 0\)

\[\begin{split} \begin{align*} \begin{pmatrix} 1 \\ -1 \\ 1 \end{pmatrix} \cdot \vec{d}_2 = \begin{pmatrix} 1 \\ -1 \\ 1 \end{pmatrix} \cdot \begin{pmatrix} d_1 \\ d_2 \\ d_3 \end{pmatrix} = d_1 - d_2 + d_3 = 0. \end{align*} \end{split}\]

This equation has infinitely many solutions, to find a solution we need to choose values for any two from \(d_1\) ,\(d_2\) and \(d_3\) (where at least one is non-zero). Let \(d_1 = 1\) and \(d_2 = 0\) then \(d_3 = -1\) so \(\vec{d}_2 = (1, 0, -1)\). Since \(\ell_2\) passes through \(\vec{p} = (-1, 1, 0)\) and the equation of \(\ell_2\) is

\[\begin{split} \begin{align*} \begin{pmatrix} -1 \\ 1 \\ 0 \end{pmatrix} + t \begin{pmatrix} 1 \\ 0 \\ -1 \end{pmatrix} = \begin{pmatrix} -1 + t \\ 1 \\ -t \end{pmatrix}. \end{align*} \end{split}\]

The notion of perpendicularity does not necessarily require that the lines intersect. The only condition is that the direction vectors of lines are perpendicular.