# Vector Equation of a Line, Intersections

> IB Mathematics AI HL · Geometry and trigonometry
> Source: https://www.owlsprep.com/study/ib-math-ai-hl-u3-vector-equation-of-a-line/

This sub-topic explains how to represent lines in 2D and 3D space using vector notation, convert between common line forms, and determine the relationship between two lines, including finding their intersection point if it exists.

**Prerequisites:** [Basic vector operations (addition, scalar multiplication)](https://www.owlsprep.com/study/ib-math-ai-hl-u3-vector-operations/)

## Learning objectives

- Write the vector equation of a line in 2D and 3D space
- Convert between vector, parametric and Cartesian forms of a line
- Classify pairs of lines as parallel, intersecting or skew
- Calculate the intersection point of two lines if it exists

## Vector Equation of a Line

**Vector Equation of a Line** — For a line passing through a fixed point with position vector $\mathbf{a}$ and parallel to direction vector $\mathbf{d}$, any point $\mathbf{r}$ on the line is given by the sum of $\mathbf{a}$ and a scalar multiple $\lambda$ of $\mathbf{d}$. The parameter $\lambda$ can take any real value, generating all points on the line.

*Notation:* $\mathbf{r} = \mathbf{a} + \lambda \mathbf{d}, \lambda \in \mathbb{R}$

*Example:* A line through $(1,2,3)$ parallel to $\begin{pmatrix}2 \\ -1 \\ 0\end{pmatrix}$ has equation $\mathbf{r} = \begin{pmatrix}1 \\ 2 \\ 3\end{pmatrix} + \lambda \begin{pmatrix}2 \\ -1 \\ 0\end{pmatrix}$

This form works for both 2D and 3D space — only the dimension of the position and direction vectors changes. Any scalar multiple of the direction vector produces an equivalent equation for the same line.

**Worked example:** Find the vector equation of the line passing through points $P(2, -1, 4)$ and $Q(5, 2, 1)$.

1. Choose the position vector of a fixed point on the line, using $P$:
2. $$\mathbf{a} = \begin{pmatrix}2 \\ -1 \\ 4\end{pmatrix}$$
3. Calculate the direction vector as the vector between the two points:
4. $$\mathbf{d} = \overrightarrow{PQ} = Q - P = \begin{pmatrix}5-2 \\ 2 - (-1) \\ 1 - 4\end{pmatrix} = \begin{pmatrix}3 \\ 3 \\ -3\end{pmatrix}$$
5. Simplify the direction vector by dividing by the scalar 3 (any non-zero scalar multiple is valid):
6. $$\mathbf{d} = \begin{pmatrix}1 \\ 1 \\ -1\end{pmatrix}$$
7. Substitute into the general vector equation:
8. $$\mathbf{r} = \begin{pmatrix}2 \\ -1 \\ 4\end{pmatrix} + \lambda \begin{pmatrix}1 \\ 1 \\ -1\end{pmatrix}, \lambda \in \mathbb{R}$$

## Converting Between Common Line Forms

For calculations, you will often need to convert the vector equation into parametric or Cartesian form. Starting from the general 3D vector equation:

$$\mathbf{r} = \begin{pmatrix}a_1 \\ a_2 \\ a_3\end{pmatrix} + \lambda \begin{pmatrix}d_1 \\ d_2 \\ d_3\end{pmatrix}$$

1. **Parametric form**: Split into separate equations for each coordinate: $x = a_1 + \lambda d_1$, $y = a_2 + \lambda d_2$, $z = a_3 + \lambda d_3$
2. **Cartesian form**: Rearrange to isolate $\lambda$ from each equation, then equate: $\frac{x - a_1}{d_1} = \frac{y - a_2}{d_2} = \frac{z - a_3}{d_3}$

> **tip**
>
> If a direction vector component is zero, the corresponding coordinate is just a constant in Cartesian form, e.g. if $d_3 = 0$, then $z = a_3$.

**Worked example:** Convert $\mathbf{r} = \begin{pmatrix}1 \\ 3 \\ -2\end{pmatrix} + \lambda \begin{pmatrix}2 \\ -1 \\ 4\end{pmatrix}$ to parametric and Cartesian form.

1. Let $\mathbf{r} = \begin{pmatrix}x \\ y \\ z\end{pmatrix}$, equate components to get parametric form:
2. $$x = 1 + 2\lambda, \quad y = 3 - \lambda, \quad z = -2 + 4\lambda$$
3. Rearrange each equation to isolate $\lambda$:
4. $$\lambda = \frac{x-1}{2}, \quad \lambda = \frac{y-3}{-1}, \quad \lambda = \frac{z+2}{4}$$
5. Equate all expressions to get Cartesian form:
6. $$\frac{x-1}{2} = 3 - y = \frac{z+2}{4}$$

## Intersections and Relationships Between Two Lines

**Relationships Between Two Lines in 3D** — There are three possible cases for two lines in 3D space:
1. **Parallel**: Direction vectors are scalar multiples of each other, lines never meet.
2. **Intersecting**: Lines are not parallel and share exactly one common point.
3. **Skew**: Lines are not parallel and never meet, only possible in 3D.

To find if two lines intersect, write both in parametric form with different parameters, set coordinates equal, solve the system of equations, then check consistency.

**Worked example:** Determine if lines $L_1: \mathbf{r}_1 = \begin{pmatrix}2 \\ 2 \\ 3\end{pmatrix} + \lambda \begin{pmatrix}1 \\ -1 \\ 2\end{pmatrix}$ and $L_2: \mathbf{r}_2 = \begin{pmatrix}1 \\ 0 \\ 4\end{pmatrix} + \mu \begin{pmatrix}2 \\ 1 \\ 1\end{pmatrix}$ intersect, and find the intersection point if they do.

1. Write parametric equations for both lines:
2. $$L_1: x=2+\lambda,\ y=2-\lambda,\ z=3+2\lambda \\ L_2: x=1+2\mu,\ y=\mu,\ z=4+\mu$$
3. Set coordinates equal to get a system of equations:
4. $$2 + \lambda = 1 + 2\mu \implies \lambda - 2\mu = -1 \quad (1) \\ 2 - \lambda = \mu \implies \lambda + \mu = 2 \quad (2) \\ 3 + 2\lambda = 4 + \mu \implies 2\lambda - \mu = 1 \quad (3)$$
5. Solve (1) and (2): Substitute $\lambda = 2 - \mu$ from (2) into (1):
6. $$(2 - \mu) - 2\mu = -1 \implies 2 - 3\mu = -1 \implies \mu = 1, \lambda = 1$$
7. Check consistency with equation (3): Left side $= 2(1) - 1 = 1$, which matches the right side. The solution is consistent.
8. Substitute $\lambda = 1$ into $L_1$ to get the intersection point:
9. $$x=3,\ y=1,\ z=5 \implies \text{Intersection at } (3, 1, 5)$$

## Common pitfalls

- **Wrong:** Using the same parameter variable for both lines when solving for intersections
  - Why it fails: Each line has an independent free parameter, so using the same variable incorrectly forces the parameter value to be the same on both lines
  - Correct: Use $\lambda$ for the first line and $\mu$ for the second line to keep the parameters independent
- **Wrong:** Stopping after solving two equations, not checking consistency with the third equation in 3D
  - Why it fails: Two equations will always produce a solution even for skew lines, so you must confirm the solution satisfies all equations
  - Correct: Always substitute the calculated parameter values into the third equation to check consistency before concluding lines intersect
- **Wrong:** Claiming non-parallel lines that do not intersect are parallel
  - Why it fails: This ignores the third category of lines unique to 3D space
  - Correct: Classify non-parallel lines that never intersect as skew lines
- **Wrong:** Forgetting that direction vectors can be any scalar multiple
  - Why it fails: Sign errors or incorrect scaling leads to incorrect conversion to Cartesian form
  - Correct: Simplify direction vectors to have integer components with a positive leading term for consistency

## Cheatsheet

| Concept | Rule/Formula |
| --- | --- |
| Vector equation of line | $\mathbf{r} = \mathbf{a} + \lambda \mathbf{d}$ |
| Parametric form (3D) | $x = a_1 + \lambda d_1,\ y = a_2 + \lambda d_2,\ z = a_3 + \lambda d_3$ |
| Cartesian form (3D) | $\frac{x-a_1}{d_1} = \frac{y-a_2}{d_2} = \frac{z-a_3}{d_3}$ |
| Parallel lines | $\mathbf{d_1} = k\mathbf{d_2}$ for some scalar $k$ |
| Intersecting lines | Non-parallel, consistent parameter solution exists |
| Skew lines | Non-parallel, no consistent parameter solution |

## What's next

Understanding the vector equation of a line is the core foundation for all further 3D vector topics in IB AI HL, including the vector equation of planes and finding intersections between lines and planes, which are frequently tested in both Paper 1 and Paper 2. This topic builds on your knowledge of coordinate geometry and vectors, and connects to applied problems involving paths of moving objects. Mastering the method for checking intersections and classifying lines will make all more complex 3D geometry problems much easier to approach and solve correctly.

- [Voronoi diagrams: basic construction](https://www.owlsprep.com/study/ib-math-ai-hl-u3-voronoi-diagrams-basic-construction/)
- [Voronoi diagrams: application problems](https://www.owlsprep.com/study/ib-math-ai-hl-u3-voronoi-diagrams-application-problems/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-ai-hl-u3-vector-equation-of-a-line/
