Skip to main content

Vectors in Three Dimensions

Vector Algebra

Representation in {R}3\mathbb{'\{'}R{'\}'}^3

A vector {a}\mathbf{'\{'}a{'\}'} in three-dimensional space with components a1,a2,a3a_1, a_2, a_3 is written:

{a}=(a1a2a3)=a1{i}+a2{j}+a3{k}\mathbf{'\{'}a{'\}'} = \begin{pmatrix} a_1 \\ a_2 \\ a_3 \end{pmatrix} = a_1\mathbf{'\{'}i{'\}'} + a_2\mathbf{'\{'}j{'\}'} + a_3\mathbf{'\{'}k{'\}'}

where {i},{j},{k}\mathbf{'\{'}i{'\}'}, \mathbf{'\{'}j{'\}'}, \mathbf{'\{'}k{'\}'} are the standard basis vectors along the xx, yy, and zz axes respectively.

Vector Operations

For {a}=(a1,a2,a3)\mathbf{'\{'}a{'\}'} = (a_1, a_2, a_3) and {b}=(b1,b2,b3)\mathbf{'\{'}b{'\}'} = (b_1, b_2, b_3), and λ{R}\lambda \in \mathbb{'\{'}R{'\}'}:

{a}+{b}=(a1+b1,a2+b2,a3+b3)\mathbf{'\{'}a{'\}'} + \mathbf{'\{'}b{'\}'} = (a_1 + b_1,\, a_2 + b_2,\, a_3 + b_3)

λ{a}=(λa1,λa2,λa3)\lambda \mathbf{'\{'}a{'\}'} = (\lambda a_1,\, \lambda a_2,\, \lambda a_3)

Magnitude

{a}=a12+a22+a32|\mathbf{'\{'}a{'\}'}| = \sqrt{a_1^2 + a_2^2 + a_3^2}

A unit vector in the direction of {a}\mathbf{'\{'}a{'\}'} is {a}^={a}{a}\hat{\mathbf{'\{'}a{'\}'}} = \dfrac{\mathbf{'\{'}a{'\}'}}{|\mathbf{'\{'}a{'\}'}|}.

Distance Between Points

The distance between A(x1,y1,z1)A(x_1, y_1, z_1) and B(x2,y2,z2)B(x_2, y_2, z_2) is:

AB=AB=(x2x1)2+(y2y1)2+(z2z1)2AB = |\overrightarrow{AB}| = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}


The Scalar (Dot) Product

Definition

The scalar product (or dot product) of {a}\mathbf{'\{'}a{'\}'} and {b}\mathbf{'\{'}b{'\}'} is:

{a}{b}=a1b1+a2b2+a3b3\mathbf{'\{'}a{'\}'} \cdot \mathbf{'\{'}b{'\}'} = a_1 b_1 + a_2 b_2 + a_3 b_3

Equivalently, in geometric form:

{a}{b}={a}{b}cosθ\mathbf{'\{'}a{'\}'} \cdot \mathbf{'\{'}b{'\}'} = |\mathbf{'\{'}a{'\}'}||\mathbf{'\{'}b{'\}'}|\cos\theta

where θ\theta is the angle between {a}\mathbf{'\{'}a{'\}'} and {b}\mathbf{'\{'}b{'\}'} (0θπ0 \le \theta \le \pi).

Properties

  • Commutative: {a}{b}={b}{a}\mathbf{'\{'}a{'\}'} \cdot \mathbf{'\{'}b{'\}'} = \mathbf{'\{'}b{'\}'} \cdot \mathbf{'\{'}a{'\}'}
  • Distributive: {a}({b}+{c})={a}{b}+{a}{c}\mathbf{'\{'}a{'\}'} \cdot (\mathbf{'\{'}b{'\}'} + \mathbf{'\{'}c{'\}'}) = \mathbf{'\{'}a{'\}'} \cdot \mathbf{'\{'}b{'\}'} + \mathbf{'\{'}a{'\}'} \cdot \mathbf{'\{'}c{'\}'}
  • Bilinear: {a}(λ{b})=λ({a}{b})\mathbf{'\{'}a{'\}'} \cdot (\lambda\mathbf{'\{'}b{'\}'}) = \lambda(\mathbf{'\{'}a{'\}'} \cdot \mathbf{'\{'}b{'\}'})
  • {a}{a}={a}2\mathbf{'\{'}a{'\}'} \cdot \mathbf{'\{'}a{'\}'} = |\mathbf{'\{'}a{'\}'}|^2
  • {i}{i}={j}{j}={k}{k}=1\mathbf{'\{'}i{'\}'} \cdot \mathbf{'\{'}i{'\}'} = \mathbf{'\{'}j{'\}'} \cdot \mathbf{'\{'}j{'\}'} = \mathbf{'\{'}k{'\}'} \cdot \mathbf{'\{'}k{'\}'} = 1
  • {i}{j}={j}{k}={k}{i}=0\mathbf{'\{'}i{'\}'} \cdot \mathbf{'\{'}j{'\}'} = \mathbf{'\{'}j{'\}'} \cdot \mathbf{'\{'}k{'\}'} = \mathbf{'\{'}k{'\}'} \cdot \mathbf{'\{'}i{'\}'} = 0

Angle Between Vectors

cosθ={a}{b}{a}{b}\cos\theta = \frac{\mathbf{'\{'}a{'\}'} \cdot \mathbf{'\{'}b{'\}'}}{|\mathbf{'\{'}a{'\}'}||\mathbf{'\{'}b{'\}'}|}

Example. Find the angle between {a}=(1,2,1)\mathbf{'\{'}a{'\}'} = (1, 2, -1) and {b}=(3,1,4)\mathbf{'\{'}b{'\}'} = (3, 1, 4).

{a}{b}=3+24=1\mathbf{'\{'}a{'\}'} \cdot \mathbf{'\{'}b{'\}'} = 3 + 2 - 4 = 1

{a}=1+4+1=6,{b}=9+1+16=26|\mathbf{'\{'}a{'\}'}| = \sqrt{1 + 4 + 1} = \sqrt{6}, \qquad |\mathbf{'\{'}b{'\}'}| = \sqrt{9 + 1 + 16} = \sqrt{26}

cosθ=1156    θ85.4\cos\theta = \frac{1}{\sqrt{156}} \implies \theta \approx 85.4\,{}^{\circ}

Perpendicularity

Two non-zero vectors are perpendicular (orthogonal) if and only if:

{a}{b}=0\mathbf{'\{'}a{'\}'} \cdot \mathbf{'\{'}b{'\}'} = 0

Example. Find a vector perpendicular to both (1,2,3)(1, 2, 3) and (4,5,6)(4, 5, 6).

We need {n}=(x,y,z)\mathbf{'\{'}n{'\}'} = (x, y, z) such that x+2y+3z=0x + 2y + 3z = 0 and 4x+5y+6z=04x + 5y + 6z = 0. Let z=tz = t:

x+2y=3t,4x+5y=6tx + 2y = -3t, \qquad 4x + 5y = -6t

From the first: x=3t2yx = -3t - 2y. Substituting: 12t8y+5y=6t    y=2t-12t - 8y + 5y = -6t \implies y = -2t.

x=3t+4t=tx = -3t + 4t = t. So {n}=t(1,2,1)\mathbf{'\{'}n{'\}'} = t(1, -2, 1). Taking t=1t = 1: {n}=(1,2,1)\mathbf{'\{'}n{'\}'} = (1, -2, 1).


The Vector (Cross) Product

Definition

The vector product (or cross product) of {a}\mathbf{'\{'}a{'\}'} and {b}\mathbf{'\{'}b{'\}'} is:

{a}×{b}={i}{j}{k}a1a2a3b1b2b3=(a2b3a3b2a3b1a1b3a1b2a2b1)\mathbf{'\{'}a{'\}'} \times \mathbf{'\{'}b{'\}'} = \begin{vmatrix} \mathbf{'\{'}i{'\}'} & \mathbf{'\{'}j{'\}'} & \mathbf{'\{'}k{'\}'} \\ a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \end{vmatrix} = \begin{pmatrix} a_2 b_3 - a_3 b_2 \\ a_3 b_1 - a_1 b_3 \\ a_1 b_2 - a_2 b_1 \end{pmatrix}

Geometric Interpretation

{a}×{b}={a}{b}sinθ|\mathbf{'\{'}a{'\}'} \times \mathbf{'\{'}b{'\}'}| = |\mathbf{'\{'}a{'\}'}||\mathbf{'\{'}b{'\}'}|\sin\theta

The direction of {a}×{b}\mathbf{'\{'}a{'\}'} \times \mathbf{'\{'}b{'\}'} is perpendicular to both {a}\mathbf{'\{'}a{'\}'} and {b}\mathbf{'\{'}b{'\}'}, given by the right-hand rule.

Properties

  • Anti-commutative: {a}×{b}=({b}×{a})\mathbf{'\{'}a{'\}'} \times \mathbf{'\{'}b{'\}'} = -(\mathbf{'\{'}b{'\}'} \times \mathbf{'\{'}a{'\}'})
  • Distributive over addition: {a}×({b}+{c})={a}×{b}+{a}×{c}\mathbf{'\{'}a{'\}'} \times (\mathbf{'\{'}b{'\}'} + \mathbf{'\{'}c{'\}'}) = \mathbf{'\{'}a{'\}'} \times \mathbf{'\{'}b{'\}'} + \mathbf{'\{'}a{'\}'} \times \mathbf{'\{'}c{'\}'}
  • {a}×{a}={0}\mathbf{'\{'}a{'\}'} \times \mathbf{'\{'}a{'\}'} = \mathbf{'\{'}0{'\}'}
  • {a}×{b}={0}\mathbf{'\{'}a{'\}'} \times \mathbf{'\{'}b{'\}'} = \mathbf{'\{'}0{'\}'} if and only if {a}\mathbf{'\{'}a{'\}'} and {b}\mathbf{'\{'}b{'\}'} are parallel (or one is zero)
  • {i}×{j}={k}\mathbf{'\{'}i{'\}'} \times \mathbf{'\{'}j{'\}'} = \mathbf{'\{'}k{'\}'}, {j}×{k}={i}\mathbf{'\{'}j{'\}'} \times \mathbf{'\{'}k{'\}'} = \mathbf{'\{'}i{'\}'}, {k}×{i}={j}\mathbf{'\{'}k{'\}'} \times \mathbf{'\{'}i{'\}'} = \mathbf{'\{'}j{'\}'}

Area of a Parallelogram and Triangle

The area of the parallelogram spanned by {a}\mathbf{'\{'}a{'\}'} and {b}\mathbf{'\{'}b{'\}'} is:

A={a}×{b}A = |\mathbf{'\{'}a{'\}'} \times \mathbf{'\{'}b{'\}'}|

The area of the triangle with sides represented by {a}\mathbf{'\{'}a{'\}'} and {b}\mathbf{'\{'}b{'\}'} is:

A=12{a}×{b}A = \frac{1}{2}|\mathbf{'\{'}a{'\}'} \times \mathbf{'\{'}b{'\}'}|

Example. Find the area of the triangle with vertices A(1,0,0)A(1, 0, 0), B(0,2,0)B(0, 2, 0), C(0,0,3)C(0, 0, 3).

AB=(1,2,0),AC=(1,0,3)\overrightarrow{AB} = (-1, 2, 0), \qquad \overrightarrow{AC} = (-1, 0, 3)

AB×AC=(600(3)0(2))=(632)\overrightarrow{AB} \times \overrightarrow{AC} = \begin{pmatrix} 6 - 0 \\ 0 - (-3) \\ 0 - (-2) \end{pmatrix} = \begin{pmatrix} 6 \\ 3 \\ 2 \end{pmatrix}

A=1236+9+4=1249=72A = \frac{1}{2}\sqrt{36 + 9 + 4} = \frac{1}{2}\sqrt{49} = \frac{7}{2}


Equations of Lines in 3D

Vector Form

A line through point AA with position vector {a}\mathbf{'\{'}a{'\}'}, in the direction of vector {d}\mathbf{'\{'}d{'\}'}:

{r}={a}+t{d},t{R}\mathbf{'\{'}r{'\}'} = \mathbf{'\{'}a{'\}'} + t\mathbf{'\{'}d{'\}'}, \qquad t \in \mathbb{'\{'}R{'\}'}

Parametric Form

If {a}=(x0,y0,z0)\mathbf{'\{'}a{'\}'} = (x_0, y_0, z_0) and {d}=(d1,d2,d3)\mathbf{'\{'}d{'\}'} = (d_1, d_2, d_3):

x=x0+td1,y=y0+td2,z=z0+td3x = x_0 + td_1, \qquad y = y_0 + td_2, \qquad z = z_0 + td_3

Cartesian (Symmetric) Form

If d1,d2,d30d_1, d_2, d_3 \ne 0:

xx0d1=yy0d2=zz0d3\frac{x - x_0}{d_1} = \frac{y - y_0}{d_2} = \frac{z - z_0}{d_3}

Example. Find the vector equation of the line through (1,2,3)(1, 2, 3) and (4,6,5)(4, 6, 5).

Direction: {d}=(3,4,2)\mathbf{'\{'}d{'\}'} = (3, 4, 2).

{r}=(123)+t(342)\mathbf{'\{'}r{'\}'} = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix} + t\begin{pmatrix} 3 \\ 4 \\ 2 \end{pmatrix}


Equations of Planes

Vector Form

A plane through point AA with position vector {a}\mathbf{'\{'}a{'\}'} and normal vector {n}\mathbf{'\{'}n{'\}'}:

{r}{n}={a}{n}=d\mathbf{'\{'}r{'\}'} \cdot \mathbf{'\{'}n{'\}'} = \mathbf{'\{'}a{'\}'} \cdot \mathbf{'\{'}n{'\}'} = d

where dd is a constant.

Cartesian Form

If {n}=(a,b,c)\mathbf{'\{'}n{'\}'} = (a, b, c) and the plane passes through (x0,y0,z0)(x_0, y_0, z_0):

a(xx0)+b(yy0)+c(zz0)=0a(x - x_0) + b(y - y_0) + c(z - z_0) = 0

or equivalently: ax+by+cz=dax + by + cz = d where d=ax0+by0+cz0d = ax_0 + by_0 + cz_0.

Parametric Form

A plane through point AA containing two non-parallel direction vectors {d}1\mathbf{'\{'}d{'\}'}_1 and {d}2\mathbf{'\{'}d{'\}'}_2:

{r}={a}+s{d}1+t{d}2,s,t{R}\mathbf{'\{'}r{'\}'} = \mathbf{'\{'}a{'\}'} + s\mathbf{'\{'}d{'\}'}_1 + t\mathbf{'\{'}d{'\}'}_2, \qquad s, t \in \mathbb{'\{'}R{'\}'}

Example. Find the equation of the plane through (1,0,2)(1, 0, 2), (3,1,0)(3, 1, 0), and (0,1,1)(0, -1, 1).

AB=(2,1,2),AC=(1,1,1)\overrightarrow{AB} = (2, 1, -2), \qquad \overrightarrow{AC} = (-1, -1, -1)

Normal: {n}=AB×AC\mathbf{'\{'}n{'\}'} = \overrightarrow{AB} \times \overrightarrow{AC}:

{n}=((1)(1)(2)(1)(2)(1)(2)(1)(2)(1)(1)(1))=(141)\mathbf{'\{'}n{'\}'} = \begin{pmatrix} (-1)(-1) - (-2)(-1) \\ (-2)(-1) - (2)(-1) \\ (2)(-1) - (1)(-1) \end{pmatrix} = \begin{pmatrix} -1 \\ 4 \\ -1 \end{pmatrix}

Plane: 1(x1)+4(y0)1(z2)=0-1(x - 1) + 4(y - 0) - 1(z - 2) = 0, i.e. x+4yz+3=0-x + 4y - z + 3 = 0.


Angles Between Lines and Planes

Angle Between Two Lines

If two lines have direction vectors {d}1\mathbf{'\{'}d{'\}'}_1 and {d}2\mathbf{'\{'}d{'\}'}_2:

cosθ={d}1{d}2{d}1{d}2\cos\theta = \frac{|\mathbf{'\{'}d{'\}'}_1 \cdot \mathbf{'\{'}d{'\}'}_2|}{|\mathbf{'\{'}d{'\}'}_1||\mathbf{'\{'}d{'\}'}_2|}

Angle Between Two Planes

If two planes have normal vectors {n}1\mathbf{'\{'}n{'\}'}_1 and {n}2\mathbf{'\{'}n{'\}'}_2:

cosθ={n}1{n}2{n}1{n}2\cos\theta = \frac{|\mathbf{'\{'}n{'\}'}_1 \cdot \mathbf{'\{'}n{'\}'}_2|}{|\mathbf{'\{'}n{'\}'}_1||\mathbf{'\{'}n{'\}'}_2|}

Angle Between a Line and a Plane

If a line has direction {d}\mathbf{'\{'}d{'\}'} and a plane has normal {n}\mathbf{'\{'}n{'\}'}, the angle ϕ\phi between the line and the plane satisfies:

sinϕ={d}{n}{d}{n}\sin\phi = \frac{|\mathbf{'\{'}d{'\}'} \cdot \mathbf{'\{'}n{'\}'}|}{|\mathbf{'\{'}d{'\}'}||\mathbf{'\{'}n{'\}'}|}

(The angle between the line and the normal is θ=90ϕ\theta = 90\,{}^{\circ} - \phi.)


Shortest Distances

Distance from a Point to a Line

The shortest distance from point PP with position vector {p}\mathbf{'\{'}p{'\}'} to the line {r}={a}+t{d}\mathbf{'\{'}r{'\}'} = \mathbf{'\{'}a{'\}'} + t\mathbf{'\{'}d{'\}'} is:

d=({p}{a})×{d}{d}d = \frac{|(\mathbf{'\{'}p{'\}'} - \mathbf{'\{'}a{'\}'}) \times \mathbf{'\{'}d{'\}'}|}{|\mathbf{'\{'}d{'\}'}|}

Distance from a Point to a Plane

The shortest distance from point P(x1,y1,z1)P(x_1, y_1, z_1) to the plane ax+by+cz+d=0ax + by + cz + d = 0 is:

D=ax1+by1+cz1+da2+b2+c2D = \frac{|ax_1 + by_1 + cz_1 + d|}{\sqrt{a^2 + b^2 + c^2}}

Example. Find the distance from (1,2,3)(1, 2, 3) to the plane 2xy+2z=52x - y + 2z = 5.

D=2(1)1(2)+2(3)54+1+4=22+653=13D = \frac{|2(1) - 1(2) + 2(3) - 5|}{\sqrt{4 + 1 + 4}} = \frac{|2 - 2 + 6 - 5|}{3} = \frac{1}{3}

Distance Between Two Skew Lines

Two lines in 3D that are neither parallel nor intersecting are skew. The shortest distance between the line {r}1={a}1+t{d}1\mathbf{'\{'}r{'\}'}_1 = \mathbf{'\{'}a{'\}'}_1 + t\mathbf{'\{'}d{'\}'}_1 and the line {r}2={a}2+s{d}2\mathbf{'\{'}r{'\}'}_2 = \mathbf{'\{'}a{'\}'}_2 + s\mathbf{'\{'}d{'\}'}_2 is:

d=({a}2{a}1)({d}1×{d}2){d}1×{d}2d = \frac{|(\mathbf{'\{'}a{'\}'}_2 - \mathbf{'\{'}a{'\}'}_1) \cdot (\mathbf{'\{'}d{'\}'}_1 \times \mathbf{'\{'}d{'\}'}_2)|}{|\mathbf{'\{'}d{'\}'}_1 \times \mathbf{'\{'}d{'\}'}_2|}

Distance Between Parallel Planes

For parallel planes ax+by+cz=d1ax + by + cz = d_1 and ax+by+cz=d2ax + by + cz = d_2:

D=d1d2a2+b2+c2D = \frac{|d_1 - d_2|}{\sqrt{a^2 + b^2 + c^2}}


Vector Triple Product

Scalar Triple Product

The scalar triple product is:

[{a},{b},{c}]={a}({b}×{c})[\mathbf{'\{'}a{'\}'}, \mathbf{'\{'}b{'\}'}, \mathbf{'\{'}c{'\}'}] = \mathbf{'\{'}a{'\}'} \cdot (\mathbf{'\{'}b{'\}'} \times \mathbf{'\{'}c{'\}'})

Its absolute value equals the volume of the parallelepiped spanned by {a}\mathbf{'\{'}a{'\}'}, {b}\mathbf{'\{'}b{'\}'}, and {c}\mathbf{'\{'}c{'\}'}.

{a}({b}×{c})=a1a2a3b1b2b3c1c2c3\mathbf{'\{'}a{'\}'} \cdot (\mathbf{'\{'}b{'\}'} \times \mathbf{'\{'}c{'\}'}) = \begin{vmatrix} a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \\ c_1 & c_2 & c_3 \end{vmatrix}

Coplanarity Test

Three vectors {a}\mathbf{'\{'}a{'\}'}, {b}\mathbf{'\{'}b{'\}'}, {c}\mathbf{'\{'}c{'\}'} are coplanar if and only if:

{a}({b}×{c})=0\mathbf{'\{'}a{'\}'} \cdot (\mathbf{'\{'}b{'\}'} \times \mathbf{'\{'}c{'\}'}) = 0

Properties

  • {a}({b}×{c})={b}({c}×{a})={c}({a}×{b})\mathbf{'\{'}a{'\}'} \cdot (\mathbf{'\{'}b{'\}'} \times \mathbf{'\{'}c{'\}'}) = \mathbf{'\{'}b{'\}'} \cdot (\mathbf{'\{'}c{'\}'} \times \mathbf{'\{'}a{'\}'}) = \mathbf{'\{'}c{'\}'} \cdot (\mathbf{'\{'}a{'\}'} \times \mathbf{'\{'}b{'\}'})
  • Cyclic permutation preserves the value; swapping any two vectors negates it.

Vector Projections

Projection of {a}\mathbf{'\{'}a{'\}'} onto {b}\mathbf{'\{'}b{'\}'}

The scalar projection (component) of {a}\mathbf{'\{'}a{'\}'} along {b}\mathbf{'\{'}b{'\}'}:

comp{b}{a}={a}{b}{b}={a}cosθ\mathrm{comp}_{\mathbf{'\{'}b{'\}'}}\,\mathbf{'\{'}a{'\}'} = \frac{\mathbf{'\{'}a{'\}'} \cdot \mathbf{'\{'}b{'\}'}}{|\mathbf{'\{'}b{'\}'}|} = |\mathbf{'\{'}a{'\}'}|\cos\theta

The vector projection of {a}\mathbf{'\{'}a{'\}'} onto {b}\mathbf{'\{'}b{'\}'}:

proj{b}{a}={a}{b}{b}2{b}={a}{b}{b}{b}{b}\mathrm{proj}_{\mathbf{'\{'}b{'\}'}}\,\mathbf{'\{'}a{'\}'} = \frac{\mathbf{'\{'}a{'\}'} \cdot \mathbf{'\{'}b{'\}'}}{|\mathbf{'\{'}b{'\}'}|^2}\,\mathbf{'\{'}b{'\}'} = \frac{\mathbf{'\{'}a{'\}'} \cdot \mathbf{'\{'}b{'\}'}}{\mathbf{'\{'}b{'\}'} \cdot \mathbf{'\{'}b{'\}'}}\,\mathbf{'\{'}b{'\}'}

The component of {a}\mathbf{'\{'}a{'\}'} perpendicular to {b}\mathbf{'\{'}b{'\}'} is:

{a}={a}proj{b}{a}\mathbf{'\{'}a{'\}'}_{\perp} = \mathbf{'\{'}a{'\}'} - \mathrm{proj}_{\mathbf{'\{'}b{'\}'}}\,\mathbf{'\{'}a{'\}'}

Example. Find the projection of {a}=(3,1,2)\mathbf{'\{'}a{'\}'} = (3, 1, -2) onto {b}=(1,0,2)\mathbf{'\{'}b{'\}'} = (1, 0, 2).

{a}{b}=3+04=1,{b}2=1+4=5\mathbf{'\{'}a{'\}'} \cdot \mathbf{'\{'}b{'\}'} = 3 + 0 - 4 = -1, \qquad |\mathbf{'\{'}b{'\}'}|^2 = 1 + 4 = 5

proj{b}{a}=15(1,0,2)=(15,0,25)\mathrm{proj}_{\mathbf{'\{'}b{'\}'}}\,\mathbf{'\{'}a{'\}'} = \frac{-1}{5}(1, 0, 2) = \left(-\frac{1}{5},\, 0,\, -\frac{2}{5}\right)


Intersection of Lines and Planes

Line-Line Intersection

Two lines {r}1={a}1+t{d}1\mathbf{'\{'}r{'\}'}_1 = \mathbf{'\{'}a{'\}'}_1 + t\mathbf{'\{'}d{'\}'}_1 and {r}2={a}2+s{d}2\mathbf{'\{'}r{'\}'}_2 = \mathbf{'\{'}a{'\}'}_2 + s\mathbf{'\{'}d{'\}'}_2 intersect if and only if the system

{a}1+t{d}1={a}2+s{d}2\mathbf{'\{'}a{'\}'}_1 + t\mathbf{'\{'}d{'\}'}_1 = \mathbf{'\{'}a{'\}'}_2 + s\mathbf{'\{'}d{'\}'}_2

has a solution for (t,s)(t, s). If the direction vectors are not parallel but the system has no solution, the lines are skew.

Line-Plane Intersection

Substitute the parametric form of the line into the equation of the plane ax+by+cz=dax + by + cz = d and solve for the parameter.

Example. Find where the line {r}=(1,2,0)+t(1,1,3)\mathbf{'\{'}r{'\}'} = (1, 2, 0) + t(1, -1, 3) meets the plane x+2yz=5x + 2y - z = 5.

Substituting: (1+t)+2(2t)3t=5    1+t+42t3t=5    4t=0(1 + t) + 2(2 - t) - 3t = 5 \implies 1 + t + 4 - 2t - 3t = 5 \implies -4t = 0.

t=0t = 0, so the intersection point is (1,2,0)(1, 2, 0).

Plane-Plane Intersection

Two planes {r}{n}1=d1\mathbf{'\{'}r{'\}'} \cdot \mathbf{'\{'}n{'\}'}_1 = d_1 and {r}{n}2=d2\mathbf{'\{'}r{'\}'} \cdot \mathbf{'\{'}n{'\}'}_2 = d_2 intersect in a line. The direction of this line is {d}={n}1×{n}2\mathbf{'\{'}d{'\}'} = \mathbf{'\{'}n{'\}'}_1 \times \mathbf{'\{'}n{'\}'}_2 (provided the planes are not parallel).

If {n}1\mathbf{'\{'}n{'\}'}_1 and {n}2\mathbf{'\{'}n{'\}'}_2 are parallel (i.e. {n}1=k{n}2\mathbf{'\{'}n{'\}'}_1 = k\mathbf{'\{'}n{'\}'}_2), the planes are either coincident (same plane) or parallel and distinct (no intersection).


Direction Cosines and Direction Ratios

Direction Cosines

For a vector {a}=(a1,a2,a3)\mathbf{'\{'}a{'\}'} = (a_1, a_2, a_3) with {a}0|\mathbf{'\{'}a{'\}'}| \ne 0, the direction cosines are:

l=cosα=a1{a},m=cosβ=a2{a},n=cosγ=a3{a}l = \cos\alpha = \frac{a_1}{|\mathbf{'\{'}a{'\}'}|}, \qquad m = \cos\beta = \frac{a_2}{|\mathbf{'\{'}a{'\}'}|}, \qquad n = \cos\gamma = \frac{a_3}{|\mathbf{'\{'}a{'\}'}|}

where α,β,γ\alpha, \beta, \gamma are the angles between {a}\mathbf{'\{'}a{'\}'} and the xx, yy, zz axes respectively.

They satisfy: l2+m2+n2=1l^2 + m^2 + n^2 = 1.

Direction Ratios

Any triple of numbers (a1,a2,a3)(a_1, a_2, a_3) proportional to the direction cosines are direction ratios. For a vector {a}\mathbf{'\{'}a{'\}'}, its components are direction ratios.


Worked Problems

Problem: Shortest Distance Between Skew Lines

Find the shortest distance between {r}1=(0,1,0)+t(1,0,1)\mathbf{'\{'}r{'\}'}_1 = (0, 1, 0) + t(1, 0, -1) and {r}2=(0,0,1)+s(0,1,1)\mathbf{'\{'}r{'\}'}_2 = (0, 0, 1) + s(0, 1, 1).

{a}2{a}1=(0,1,1)\mathbf{'\{'}a{'\}'}_2 - \mathbf{'\{'}a{'\}'}_1 = (0, -1, 1), {d}1=(1,0,1)\mathbf{'\{'}d{'\}'}_1 = (1, 0, -1), {d}2=(0,1,1)\mathbf{'\{'}d{'\}'}_2 = (0, 1, 1).

{d}1×{d}2=(0(1)1010)=(111)\mathbf{'\{'}d{'\}'}_1 \times \mathbf{'\{'}d{'\}'}_2 = \begin{pmatrix} 0 - (-1) \\ -1 - 0 \\ 1 - 0 \end{pmatrix} = \begin{pmatrix} 1 \\ -1 \\ 1 \end{pmatrix}

{d}1×{d}2=1+1+1=3|\mathbf{'\{'}d{'\}'}_1 \times \mathbf{'\{'}d{'\}'}_2| = \sqrt{1 + 1 + 1} = \sqrt{3}

({a}2{a}1)({d}1×{d}2)=0+1+1=2(\mathbf{'\{'}a{'\}'}_2 - \mathbf{'\{'}a{'\}'}_1) \cdot (\mathbf{'\{'}d{'\}'}_1 \times \mathbf{'\{'}d{'\}'}_2) = 0 + 1 + 1 = 2

d=23=233d = \frac{2}{\sqrt{3}} = \frac{2\sqrt{3}}{3}

Problem: Reflection of a Point in a Plane

Find the reflection of the point P(1,2,3)P(1, 2, 3) in the plane 2xy+z=42x - y + z = 4.

The normal is {n}=(2,1,1)\mathbf{'\{'}n{'\}'} = (2, -1, 1), {n}=6|\mathbf{'\{'}n{'\}'}| = \sqrt{6}.

The foot of the perpendicular from PP to the plane is found by solving the line {r}=(1,2,3)+t(2,1,1)\mathbf{'\{'}r{'\}'} = (1, 2, 3) + t(2, -1, 1) intersecting the plane:

2(1+2t)(2t)+(3+t)=4    2+4t2+t+3+t=4    6t=1    t=162(1 + 2t) - (2 - t) + (3 + t) = 4 \implies 2 + 4t - 2 + t + 3 + t = 4 \implies 6t = 1 \implies t = \frac{1}{6}

Foot F=(1+26,216,3+16)=(43,116,196)F = \left(1 + \dfrac{2}{6},\, 2 - \dfrac{1}{6},\, 3 + \dfrac{1}{6}\right) = \left(\dfrac{4}{3},\, \dfrac{11}{6},\, \dfrac{19}{6}\right).

The reflection PP' satisfies F=P+P2F = \dfrac{P + P'}{2}:

P=2FP=(831,1132,1933)=(53,53,103)P' = 2F - P = \left(\dfrac{8}{3} - 1,\, \dfrac{11}{3} - 2,\, \dfrac{19}{3} - 3\right) = \left(\dfrac{5}{3},\, \dfrac{5}{3},\, \dfrac{10}{3}\right)

warning

warning

The cross product is defined only in {R}3\mathbb{'\{'}R{'\}'}^3 (and {R}7\mathbb{'\{'}R{'\}'}^7). Do not attempt to compute cross products in {R}2\mathbb{'\{'}R{'\}'}^2 directly. Also, {a}×{b}{b}×{a}\mathbf{'\{'}a{'\}'} \times \mathbf{'\{'}b{'\}'} \ne \mathbf{'\{'}b{'\}'} \times \mathbf{'\{'}a{'\}'}: the cross product is anti-commutative.


Additional Worked Examples

Worked Example: Intersection of Two Lines in 3D

Determine whether the lines {r}1=(1,2,0)+t(2,1,1)\mathbf{'\{'}r{'\}'}_1 = (1, 2, 0) + t(2, -1, 1) and {r}2=(3,0,1)+s(1,1,2)\mathbf{'\{'}r{'\}'}_2 = (3, 0, -1) + s(1, 1, 2) intersect. If so, find the intersection point.

Solution

For intersection, we need tt and ss such that:

1+2t=3+s,2t=s,t=1+2s1 + 2t = 3 + s, \qquad 2 - t = s, \qquad t = -1 + 2s

From the second equation: s=2ts = 2 - t.

Substitute into the first: 1+2t=3+2t    3t=4    t=431 + 2t = 3 + 2 - t \implies 3t = 4 \implies t = \dfrac{4}{3}.

Then s=243=23s = 2 - \dfrac{4}{3} = \dfrac{2}{3}.

Check with the third equation: t=1+2s    43=1+43=13t = -1 + 2s \implies \dfrac{4}{3} = -1 + \dfrac{4}{3} = \dfrac{1}{3}.

Since 4313\dfrac{4}{3} \ne \dfrac{1}{3}, the system is inconsistent. The lines do not intersect; they are skew.

Worked Example: Angle Between a Line and a Plane

Find the acute angle between the line {r}=(1,1,2)+t(3,1,2)\mathbf{'\{'}r{'\}'} = (1, -1, 2) + t(3, 1, -2) and the plane 2xy+2z=62x - y + 2z = 6.

Solution

The direction of the line is {d}=(3,1,2)\mathbf{'\{'}d{'\}'} = (3, 1, -2).

The normal of the plane is {n}=(2,1,2)\mathbf{'\{'}n{'\}'} = (2, -1, 2).

The angle α\alpha between the line and the normal satisfies:

cosα={d}{n}{d}{n}\cos\alpha = \frac{|\mathbf{'\{'}d{'\}'} \cdot \mathbf{'\{'}n{'\}'}|}{|\mathbf{'\{'}d{'\}'}||\mathbf{'\{'}n{'\}'}|}

{d}{n}=614=1\mathbf{'\{'}d{'\}'} \cdot \mathbf{'\{'}n{'\}'} = 6 - 1 - 4 = 1

{d}=9+1+4=14,{n}=4+1+4=3|\mathbf{'\{'}d{'\}'}| = \sqrt{9 + 1 + 4} = \sqrt{14}, \qquad |\mathbf{'\{'}n{'\}'}| = \sqrt{4 + 1 + 4} = 3

cosα=1314=1442    α85.0\cos\alpha = \frac{1}{3\sqrt{14}} = \frac{\sqrt{14}}{42} \implies \alpha \approx 85.0\,{}^{\circ}

The angle between the line and the plane is ϕ=90α5.0\phi = 90\,{}^{\circ} - \alpha \approx 5.0\,{}^{\circ}.

Worked Example: Shortest Distance Between Parallel Planes

Find the shortest distance between the planes 3x+2yz=43x + 2y - z = 4 and 3x+2yz=83x + 2y - z = -8.

Solution

Both planes have the same normal vector {n}=(3,2,1)\mathbf{'\{'}n{'\}'} = (3, 2, -1), so they are parallel.

The distance between parallel planes ax+by+cz=d1ax + by + cz = d_1 and ax+by+cz=d2ax + by + cz = d_2 is:

D=d1d2a2+b2+c2=4(8)9+4+1=1214=121414=6147D = \frac{|d_1 - d_2|}{\sqrt{a^2 + b^2 + c^2}} = \frac{|4 - (-8)|}{\sqrt{9 + 4 + 1}} = \frac{12}{\sqrt{14}} = \frac{12\sqrt{14}}{14} = \frac{6\sqrt{14}}{7}

D3.22D \approx 3.22

Worked Example: Volume of a Parallelepiped

Find the volume of the parallelepiped with adjacent edges represented by {a}=(1,0,2)\mathbf{'\{'}a{'\}'} = (1, 0, 2), {b}=(3,1,1)\mathbf{'\{'}b{'\}'} = (3, 1, -1), and {c}=(2,1,1)\mathbf{'\{'}c{'\}'} = (2, -1, 1).

Solution

The volume is {a}({b}×{c})|\mathbf{'\{'}a{'\}'} \cdot (\mathbf{'\{'}b{'\}'} \times \mathbf{'\{'}c{'\}'})|.

First compute {b}×{c}\mathbf{'\{'}b{'\}'} \times \mathbf{'\{'}c{'\}'}:

{b}×{c}=((1)(1)(1)(1)(1)(2)(3)(1)(3)(1)(1)(2))=(055)\mathbf{'\{'}b{'\}'} \times \mathbf{'\{'}c{'\}'} = \begin{pmatrix} (1)(1) - (-1)(-1) \\ (-1)(2) - (3)(1) \\ (3)(-1) - (1)(2) \end{pmatrix} = \begin{pmatrix} 0 \\ -5 \\ -5 \end{pmatrix}

Then {a}({b}×{c})=(1)(0)+(0)(5)+(2)(5)=10\mathbf{'\{'}a{'\}'} \cdot (\mathbf{'\{'}b{'\}'} \times \mathbf{'\{'}c{'\}'}) = (1)(0) + (0)(-5) + (2)(-5) = -10.

Volume =10=10= |-10| = 10.

Alternatively, compute the determinant directly:

102311211=1(11)0+2(32)=10\begin{vmatrix} 1 & 0 & 2 \\ 3 & 1 & -1 \\ 2 & -1 & 1 \end{vmatrix} = 1(1 - 1) - 0 + 2(-3 - 2) = -10

Volume =10=10= |-10| = 10.

Worked Example: Plane Through a Line Perpendicular to Another Plane

Find the equation of the plane that contains the line {r}=(1,2,3)+t(1,1,0)\mathbf{'\{'}r{'\}'} = (1, 2, 3) + t(1, -1, 0) and is perpendicular to the plane x+2yz=7x + 2y - z = 7.

Solution

The plane must contain the direction vector {d}=(1,1,0)\mathbf{'\{'}d{'\}'} = (1, -1, 0) of the given line.

The plane is perpendicular to x+2yz=7x + 2y - z = 7, whose normal is {n}1=(1,2,1)\mathbf{'\{'}n{'\}'}_1 = (1, 2, -1). Since the planes are perpendicular, {n}1\mathbf{'\{'}n{'\}'}_1 lies in the desired plane.

The desired plane has normal {n}={d}×{n}1\mathbf{'\{'}n{'\}'} = \mathbf{'\{'}d{'\}'} \times \mathbf{'\{'}n{'\}'}_1:

{n}=((1)(1)(0)(2)(0)(1)(1)(1)(1)(2)(1)(1))=(113)\mathbf{'\{'}n{'\}'} = \begin{pmatrix} (-1)(-1) - (0)(2) \\ (0)(1) - (1)(-1) \\ (1)(2) - (-1)(1) \end{pmatrix} = \begin{pmatrix} 1 \\ 1 \\ 3 \end{pmatrix}

The plane passes through (1,2,3)(1, 2, 3) (a point on the line):

1(x1)+1(y2)+3(z3)=01(x - 1) + 1(y - 2) + 3(z - 3) = 0

x+y+3z12=0x + y + 3z - 12 = 0


Common Pitfalls

  1. Confusing the angle between a line and a plane. The formula cosθ={d}{n}{d}{n}\cos\theta = \dfrac{|\mathbf{'\{'}d{'\}'} \cdot \mathbf{'\{'}n{'\}'}|}{|\mathbf{'\{'}d{'\}'}||\mathbf{'\{'}n{'\}'}|} gives the angle between the line direction and the normal to the plane. The angle between the line and the plane itself is 90θ90\,{}^{\circ} - \theta.

  2. Cross product direction errors. The cross product {a}×{b}\mathbf{'\{'}a{'\}'} \times \mathbf{'\{'}b{'\}'} follows the right-hand rule. Reversing the order gives {b}×{a}=({a}×{b})\mathbf{'\{'}b{'\}'} \times \mathbf{'\{'}a{'\}'} = -(\mathbf{'\{'}a{'\}'} \times \mathbf{'\{'}b{'\}'}). Always check the sign when computing normals to planes.

  3. Incorrect distance formula. The distance from point (x1,y1,z1)(x_1, y_1, z_1) to the plane ax+by+cz=dax + by + cz = d is ax1+by1+cz1da2+b2+c2\dfrac{|ax_1 + by_1 + cz_1 - d|}{\sqrt{a^2 + b^2 + c^2}}. Note the d-d in the numerator: this depends on whether the plane equation is written as ax+by+cz=dax + by + cz = d or ax+by+cz+d=0ax + by + cz + d = 0.

  4. Assuming two lines in 3D always intersect. Unlike in 2D, two lines in 3D may be skew (neither parallel nor intersecting). Always check consistency of all three equations when solving for intersection parameters.

  5. Parametric line-plane intersection gives t=0t = 0. If substituting the parametric line into the plane equation yields t=0t = 0, the intersection point is the point on the line at t=0t = 0, i.e. the initial point of the line. This is a valid answer, not an error.

  6. Mixing up scalar and vector projections. The scalar projection gives a number (the length of the shadow), while the vector projection gives a vector. The scalar projection can be negative if the angle exceeds 9090\,{}^{\circ}.

  7. Scalar triple product coplanarity test. Three vectors {a}\mathbf{'\{'}a{'\}'}, {b}\mathbf{'\{'}b{'\}'}, {c}\mathbf{'\{'}c{'\}'} are coplanar if {a}({b}×{c})=0\mathbf{'\{'}a{'\}'} \cdot (\mathbf{'\{'}b{'\}'} \times \mathbf{'\{'}c{'\}'}) = 0. A zero result means the volume of the parallelepiped is zero, confirming coplanarity.

  8. Normal vector to a plane from two direction vectors. If a plane contains direction vectors {d}1\mathbf{'\{'}d{'\}'}_1 and {d}2\mathbf{'\{'}d{'\}'}_2, the normal is {d}1×{d}2\mathbf{'\{'}d{'\}'}_1 \times \mathbf{'\{'}d{'\}'}_2. A common mistake is to use the dot product or to use {d}2×{d}1\mathbf{'\{'}d{'\}'}_2 \times \mathbf{'\{'}d{'\}'}_1 without recognising this gives the opposite normal direction (which is still valid for the plane equation).


Exam-Style Problems

  1. Find the vector equation of the line through A(2,1,3)A(2, -1, 3) and B(5,1,2)B(5, 1, -2). Determine whether the point C(4,0,1)C(4, 0, 1) lies on this line.

  2. Find the equation of the plane through (1,0,1)(1, 0, -1), (2,3,1)(2, 3, 1), and (0,1,2)(0, 1, 2). Find the distance from the origin to this plane.

  3. Two lines are given by {r}1=(0,1,2)+t(1,1,1)\mathbf{'\{'}r{'\}'}_1 = (0, 1, 2) + t(1, -1, 1) and {r}2=(1,0,1)+s(2,1,0)\mathbf{'\{'}r{'\}'}_2 = (1, 0, -1) + s(2, 1, 0). Show that the lines are skew and find the shortest distance between them.

  4. Find the angle between the planes x+y+z=1x + y + z = 1 and 2xy+z=32x - y + z = 3.

  5. The points A(1,0,0)A(1, 0, 0), B(0,2,0)B(0, 2, 0), C(0,0,3)C(0, 0, 3), and D(1,1,1)D(1, 1, 1) form a tetrahedron. Find its volume using the scalar triple product.

  6. Find the reflection of the point (3,1,2)(3, -1, 2) in the plane x2y+z=4x - 2y + z = 4.

  7. A line passes through (1,2,3)(1, 2, 3) and is perpendicular to both vectors (1,0,1)(1, 0, -1) and (0,1,2)(0, 1, 2). Find the vector equation of this line and its intersection with the plane 2x+yz=12x + y - z = 1.

  8. Find the projection of {a}=(4,1,3)\mathbf{'\{'}a{'\}'} = (4, -1, 3) onto {b}=(2,1,2)\mathbf{'\{'}b{'\}'} = (2, 1, -2). Hence find the component of {a}\mathbf{'\{'}a{'\}'} perpendicular to {b}\mathbf{'\{'}b{'\}'}.


Cross-References

  • Trigonometry for angle calculations: see Trigonometry
  • Calculus for vector-valued functions and differentiation: see Differentiation
  • Integration for arc length and surface area of curves: see Integration

tip

tip Ready to test your understanding of Vectors? The diagnostic test contains the hardest questions within the IB specification for this topic, each with a full worked solution.

Unit tests probe edge cases and common misconceptions. Integration tests combine Vectors with other IB mathematics topics to test synthesis under exam conditions.

See Diagnostic Guide for instructions on self-marking and building a personal test matrix.