\( \definecolor{colordef}{RGB}{249,49,84} \definecolor{colorprop}{RGB}{18,102,241} \)

Equations of Lines

There are many applications of vectors in geometry. While some of these applications can be addressed with other tools in 2-dimensional planar geometry, vector methods become particularly efficient and powerful in 3-dimensional space, especially when considering the relationships between lines and planes.

Vector Equation

The position of any point on a line can be described by a starting point and a direction of travel. In vector terms, this means that the position vector of any point on the line can be reached by starting with the position vector of a known point and adding a scalar multiple of the line's direction vector. This principle allows us to define a line in both two and three dimensions.
Definition Vector Equation of a Line
The vector equation of the line is:$$ \textcolor{olive}{\Vect{r}} = \textcolor{colordef}{\Vect{a}} + \textcolor{colorprop}{\lambda\Vect{b}}, \quad \lambda \in \R $$
Example
Find the vector equation of the line passing through the point \(A(2, -1)\) with direction vector \(\Vect{b} = \begin{pmatrix} 3 \\ 4 \end{pmatrix}\).

The vector equation is given by \(\Vect{r} = \Vect{a} + \lambda\Vect{b}\). Substituting the point and direction:$$ \Vect{r} = \begin{pmatrix} 2 \\ -1 \end{pmatrix} + \lambda \begin{pmatrix} 3 \\ 4 \end{pmatrix}, \quad \lambda \in \R $$

Parametric Equations

Let a line pass through point \(A(a_1, a_2, a_3)\) with direction vector \(\Vect{b} = \begin{pmatrix} b_1 \\ b_2 \\ b_3 \end{pmatrix}\). For any point \(R(x, y, z)\) on the line, the vector equation \(\begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} a_1 \\ a_2 \\ a_3 \end{pmatrix} + \lambda \begin{pmatrix} b_1 \\ b_2 \\ b_3 \end{pmatrix}\) leads to parametric equations: $$ \begin{cases} x = a_1 + \lambda b_1 \\ y = a_2 + \lambda b_2 \\ z = a_3 + \lambda b_3 \end{cases}, \quad \lambda \in \mathbb{R} $$In 2 dimensions, the z-components are simply omitted.
Definition Parametric Equations of a Line
The parametric equations of a line passing through a point \(A(a_1, a_2, a_3)\) with direction vector \(\Vect{b} = \begin{pmatrix} b_1 \\ b_2 \\ b_3 \end{pmatrix}\) are given by the system:$$ \begin{cases} x = a_1 + \lambda b_1 \\ y = a_2 + \lambda b_2 \\ z = a_3 + \lambda b_3 \end{cases} $$where the variable \(\lambda \in \mathbb{R}\) is the parameter.
Example
Determine the parametric equations of the line passing through \(A(1, -2, 5)\) and \(B(3, 4, -1)\).

First, calculate the direction vector \(\Vect{AB} = \begin{pmatrix} 3-1 \\ 4-(-2) \\ -1-5 \end{pmatrix} = \begin{pmatrix} 2 \\ 6 \\ -6 \end{pmatrix}\).
Using point \(A(1, -2, 5)\) and the direction vector, the equations are:$$ \begin{cases} x = 1 + 2\lambda \\ y = -2 + 6\lambda \\ z = 5 - 6\lambda \end{cases} $$

Cartesian Equation in Plane

In two dimensions, a line can also be defined by a normal vector. Let \(\Vect{n}\) be a normal vector to the line's direction, so that \(\Vect{b} \cdot \Vect{n} = 0\).Starting from the vector equation ,\(\Vect{r} = \Vect{a} + \lambda\Vect{b}\), we take the scalar product of both sides with the normal vector \(\Vect{n}\):$$ \begin{aligned} \Vect{r}\cdot \Vect{n} &= (\lambda\Vect{b}+\Vect{a} ) \cdot \Vect{n} \\ \Vect{r}\cdot \Vect{n} &= \lambda\Vect{b}\cdot \Vect{n}+\Vect{a} \cdot \Vect{n}&&\text{(distributivity)} \\ \Vect{r}\cdot \Vect{n} &= \Vect{a} \cdot \Vect{n}&&(\Vect{b} \cdot \Vect{n} = 0) \\ \end{aligned} $$If we let \(\Vect{r} = \begin{pmatrix} x \\ y \end{pmatrix}\) and the normal vector \(\Vect{n} = \begin{pmatrix} a \\ b \end{pmatrix}\), the expression \(\Vect{r} \cdot \Vect{n}\) becomes \(ax+by\). The term \(\Vect{a} \cdot \Vect{n}\) is a constant, which we can call \(C\). This leads to the familiar Cartesian form.
Definition Cartesian Equation of a Line in 2D
The Cartesian equation of a line in 2D with normal vector \(\Vect{n} = \begin{pmatrix} a \\ b \end{pmatrix}\) is given by:$$ ax + by = C $$where \(C\) is a constant.
Example
Find the Cartesian equation of the line passing through point \(P(1, 4)\) with normal vector \(\Vect{n} = \begin{pmatrix} 2 \\ -5 \end{pmatrix}\).

The equation is of the form \(2x - 5y = C\). Using point \(P(1,4)\) to find \(C\):$$ 2(1) - 5(4) = C \implies 2 - 20 = C \implies C = -18 $$The Cartesian equation is \(2x - 5y = -18\).

Shortest Distance from a Point to a Line

When calculating the shortest distance from a point \(P\) to a line, we are looking for the perpendicular distance.
  • In 2D, we can find the foot of the perpendicular \(F\) on the line such that \(\Vect{PF} \cdot \Vect{b} = 0\), where \(\Vect{b}\) is the direction vector of the line. The distance is then the magnitude \(\lVert \Vect{PF} \rVert\).
  • In 3D, vector methods involving the cross product are most efficient.
Method Distance from a Point to a Line in 2D
To find the shortest distance from a point \(P\) to a line passing through \(A\) with direction vector \(\Vect{b}\):
  1. Let \(F\) be a generic point on the line: \(\Vect{f} = \Vect{a} + \lambda \Vect{b}\).
  2. The vector \(\Vect{PF}\) is perpendicular to the line, so \(\Vect{PF} \cdot \Vect{b} = 0\).
  3. Solve for \(\lambda\) to find the coordinates of \(F\).
  4. The shortest distance is \(d = \lVert \Vect{PF} \rVert\).
Example
Find the shortest distance from \(P(1, 4)\) to the line \(\Vect{r} = \begin{pmatrix} 0 \\ -1 \end{pmatrix} + \lambda \begin{pmatrix} 1 \\ 1 \end{pmatrix}\).

Let \(F\) be the foot of the perpendicular on the line.
  • The coordinates of \(F\) are \((\lambda, -1+\lambda)\).
  • The vector \(\Vect{PF} = \begin{pmatrix} \lambda - 1 \\ (-1+\lambda) - 4 \end{pmatrix} = \begin{pmatrix} \lambda - 1 \\ \lambda - 5 \end{pmatrix}\).
  • Since \(\Vect{PF} \perp \Vect{b}\), the dot product is zero: $$ \begin{pmatrix} \lambda - 1 \\ \lambda - 5 \end{pmatrix} \cdot \begin{pmatrix} 1 \\ 1 \end{pmatrix} = 0 $$ $$ (\lambda - 1)(1) + (\lambda - 5)(1) = 0 \implies 2\lambda - 6 = 0 \implies \lambda = 3 $$
  • Substitute \(\lambda = 3\) back into \(\Vect{PF}\): \(\Vect{PF} = \begin{pmatrix} 3-1 \\ 3-5 \end{pmatrix} = \begin{pmatrix} 2 \\ -2 \end{pmatrix}\).
  • The distance is \(d = \sqrt{2^2 + (-2)^2} = \sqrt{8} = 2\sqrt{2}\).

Proposition Distance from a Point to a Line in 3D
The shortest distance \(d\) from a point \(P\) to a line passing through point \(A\) with direction vector \(\Vect{b}\) is given by:$$ d = \frac{\left\lVert \Vect{AP} \times \Vect{b} \right\rVert}{\left\lVert \Vect{b} \right\rVert} $$
Example
Find the distance from the point \(P(3, 1, 1)\) to the line passing through \(A(1, 2, 3)\) with direction vector \(\Vect{b} = \begin{pmatrix} 1 \\ 0 \\ -1 \end{pmatrix}\).

  • First, find \(\Vect{AP} = \begin{pmatrix} 3-1 \\ 1-2 \\ 1-3 \end{pmatrix} = \begin{pmatrix} 2 \\ -1 \\ -2 \end{pmatrix}\).
  • Calculate the cross product \(\Vect{AP} \times \Vect{b} = \begin{pmatrix} 2 \\ -1 \\ -2 \end{pmatrix} \times \begin{pmatrix} 1 \\ 0 \\ -1 \end{pmatrix} = \begin{pmatrix} (-1)\cdot (-1)-(-2)\cdot (0) \\ (-2)\cdot (1)-(2)\cdot (-1) \\ (2)\cdot (0)-(-1)\cdot (1) \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix}\).
  • Calculate the magnitude \(\lVert \Vect{AP} \times \Vect{b} \rVert = \sqrt{1^2 + 0^2 + 1^2} = \sqrt{2}\).
  • Calculate \(\lVert \Vect{b} \rVert = \sqrt{1^2 + 0^2 + (-1)^2} = \sqrt{2}\).
  • The distance is \(d = \frac{\sqrt{2}}{\sqrt{2}} = 1\).