Math Core

Lesson 1.5 · Vectors and 3D Space

Lines and planes

In the plane, a single equation y=mx+by = mx + b describes a line. In space that no longer works: one linear equation in xx, yy, zz describes a plane, and a line needs a different description. Vectors give clean descriptions of both, and the dot and cross products turn questions about angles, intersections and distances into short computations.

Lines

A line in space is determined by a point P0(x0,y0,z0)P_0(x_0, y_0, z_0) on it and a nonzero direction vector v=⟨a,b,c⟩\mathbf{v} = \langle a, b, c \rangle parallel to it. A point PP lies on the line exactly when P0P→\overrightarrow{P_0P} is a multiple of v\mathbf{v}, say tvt\mathbf{v}. Writing r0\mathbf{r}_0 and r\mathbf{r} for the position vectors of P0P_0 and PP:

Equations of a line

The line through P0(x0,y0,z0)P_0(x_0, y_0, z_0) with direction v=⟨a,b,c⟩\mathbf{v} = \langle a, b, c \rangle has

  • vector equation r(t)=r0+tv\mathbf{r}(t) = \mathbf{r}_0 + t\mathbf{v},
  • parametric equations x=x0+at,  y=y0+bt,  z=z0+ctx = x_0 + at,\ \ y = y_0 + bt,\ \ z = z_0 + ct,
  • symmetric equations (when a,b,c≠0a, b, c \ne 0) x−x0a=y−y0b=z−z0c\dfrac{x - x_0}{a} = \dfrac{y - y_0}{b} = \dfrac{z - z_0}{c}.

Each real value of the parameter tt gives one point on the line.

Think of tt as time: at t=0t = 0 you are at P0P_0, and each unit of time moves you by v\mathbf{v}. A line has infinitely many such descriptions, since any point on it and any nonzero multiple of v\mathbf{v} work equally well.

Worked example: The line through two points

Find parametric equations for the line through P(1,−2,4)P(1, -2, 4) and Q(3,1,0)Q(3, 1, 0), and find where it crosses the xzxz-plane.

Solution. A direction vector is PQ→=⟨2,3,−4⟩\overrightarrow{PQ} = \langle 2, 3, -4 \rangle. Using PP as the base point:

x=1+2t,y=−2+3t,z=4−4t.x = 1 + 2t, \qquad y = -2 + 3t, \qquad z = 4 - 4t.

The xzxz-plane is y=0y = 0, so −2+3t=0-2 + 3t = 0 and t=23t = \dfrac23. Then x=1+43=73x = 1 + \dfrac43 = \dfrac73 and z=4−83=43z = 4 - \dfrac83 = \dfrac43. The crossing point is (73,0,43)\left(\dfrac73, 0, \dfrac43\right).

How two lines can meet

Two lines in the plane either intersect or are parallel. In space there is a third option: skew lines are not parallel and never meet, like a road and an overpass crossing it.

  1. If the direction vectors are parallel, the lines are parallel (or identical, if they share a point).
  2. Otherwise, set the coordinates equal using different parameters tt and ss. Solve two of the three equations. If the solution satisfies the third, the lines intersect; if not, they are skew.

Worked example: Intersecting or skew?

Classify L1L_1: x=1+t, y=2−t, z=3tx = 1 + t,\ y = 2 - t,\ z = 3t and L2L_2: x=2s, y=3+s, z=1+4sx = 2s,\ y = 3 + s,\ z = 1 + 4s.

Solution. The directions ⟨1,−1,3⟩\langle 1, -1, 3 \rangle and ⟨2,1,4⟩\langle 2, 1, 4 \rangle are not multiples of each other, so the lines are not parallel. Equate xx and yy: 1+t=2s1 + t = 2s and 2−t=3+s2 - t = 3 + s. Adding the equations gives 3=3+3s3 = 3 + 3s, so s=0s = 0 and then t=−1t = -1. Check zz: L1L_1 gives 3t=−33t = -3, but L2L_2 gives 1+4s=11 + 4s = 1. These disagree, so the lines never meet. They are skew.

Planes

A plane is determined by a point P0P_0 in it and a nonzero normal vector n=⟨a,b,c⟩\mathbf{n} = \langle a, b, c \rangle perpendicular to it. A point PP lies in the plane exactly when P0P→\overrightarrow{P_0P} is orthogonal to n\mathbf{n}.

Equation of a plane

The plane through P0(x0,y0,z0)P_0(x_0, y_0, z_0) with normal vector n=⟨a,b,c⟩\mathbf{n} = \langle a, b, c \rangle is

n⋅(r−r0)=0,that is,a(x−x0)+b(y−y0)+c(z−z0)=0.\mathbf{n} \cdot (\mathbf{r} - \mathbf{r}_0) = 0, \qquad\text{that is,}\qquad a(x - x_0) + b(y - y_0) + c(z - z_0) = 0.

Expanding gives the linear equation ax+by+cz=dax + by + cz = d. Conversely, every such equation with a,b,ca, b, c not all zero is a plane with normal ⟨a,b,c⟩\langle a, b, c \rangle.

So you can read a normal vector straight off the coefficients: 2x−y+5z=72x - y + 5z = 7 has normal ⟨2,−1,5⟩\langle 2, -1, 5 \rangle. To sketch a plane, find its intercepts and connect them. The plane 2x+3y+4z=122x + 3y + 4z = 12 meets the axes at (6,0,0)(6, 0, 0), (0,4,0)(0, 4, 0) and (0,0,3)(0, 0, 3); the triangle joining them is the part of the plane in the first octant.

The first-octant piece of the plane 2x + 3y + 4z = 12, drawn by joining its three intercepts.

For a plane through three points PP, QQ, RR, the vectors PQ→\overrightarrow{PQ} and PR→\overrightarrow{PR} lie in the plane, so their cross product is a normal vector.

Worked example: Plane through three points

Find an equation of the plane through P(1,0,2)P(1, 0, 2), Q(2,−1,3)Q(2, -1, 3) and R(0,2,1)R(0, 2, 1).

Solution. PQ→=⟨1,−1,1⟩\overrightarrow{PQ} = \langle 1, -1, 1 \rangle and PR→=⟨−1,2,−1⟩\overrightarrow{PR} = \langle -1, 2, -1 \rangle, so

n=PQ→×PR→=⟨(−1)(−1)−(1)(2), (1)(−1)−(1)(−1), (1)(2)−(−1)(−1)⟩=⟨−1,0,1⟩.\mathbf{n} = \overrightarrow{PQ} \times \overrightarrow{PR} = \langle (-1)(-1) - (1)(2),\ (1)(-1) - (1)(-1),\ (1)(2) - (-1)(-1) \rangle = \langle -1, 0, 1 \rangle.

Using PP: −(x−1)+0(y−0)+(z−2)=0-(x - 1) + 0(y - 0) + (z - 2) = 0, which simplifies to x−z=−1x - z = -1. Check: QQ gives 2−3=−12 - 3 = -1 and RR gives 0−1=−10 - 1 = -1.

Angles, intersections and distances

Two planes are parallel if their normals are parallel. Otherwise they meet in a line, and the angle between the planes is the acute angle between their normals.

Worked example: Two intersecting planes

For the planes x+y+z=1x + y + z = 1 and x−2y+3z=1x - 2y + 3z = 1, find the angle between them and parametric equations for their line of intersection.

Solution. With n1=⟨1,1,1⟩\mathbf{n}_1 = \langle 1, 1, 1 \rangle and n2=⟨1,−2,3⟩\mathbf{n}_2 = \langle 1, -2, 3 \rangle,

cos⁡θ=∣n1⋅n2∣∣n1∣ ∣n2∣=2314=242,θ≈72.0∘.\cos\theta = \frac{|\mathbf{n}_1 \cdot \mathbf{n}_2|}{|\mathbf{n}_1|\,|\mathbf{n}_2|} = \frac{2}{\sqrt3\sqrt{14}} = \frac{2}{\sqrt{42}}, \qquad \theta \approx 72.0^\circ.

The line of intersection lies in both planes, so it is perpendicular to both normals. Its direction is n1×n2=⟨5,−2,−3⟩\mathbf{n}_1 \times \mathbf{n}_2 = \langle 5, -2, -3 \rangle. For a point, set z=0z = 0: then x+y=1x + y = 1 and x−2y=1x - 2y = 1, giving y=0y = 0, x=1x = 1. The line is x=1+5t, y=−2t, z=−3tx = 1 + 5t,\ y = -2t,\ z = -3t.

To find the distance from a point P1P_1 to a plane, pick any point P0P_0 in the plane. The distance is the length of the projection of P0P1→\overrightarrow{P_0P_1} onto the normal: D=∣n⋅P0P1→∣∣n∣D = \dfrac{|\mathbf{n} \cdot \overrightarrow{P_0P_1}|}{|\mathbf{n}|}. Writing this out in coordinates gives a formula that doesn't need P0P_0 at all.

Distance from a point to a plane

The distance from P1(x1,y1,z1)P_1(x_1, y_1, z_1) to the plane ax+by+cz=dax + by + cz = d is

D=∣ax1+by1+cz1−d∣a2+b2+c2.D = \frac{|ax_1 + by_1 + cz_1 - d|}{\sqrt{a^2 + b^2 + c^2}}.

For example, the distance from (1,−2,4)(1, -2, 4) to 3x+2y+6z=53x + 2y + 6z = 5 is ∣3−4+24−5∣9+4+36=187\dfrac{|3 - 4 + 24 - 5|}{\sqrt{9 + 4 + 36}} = \dfrac{18}{7}.

Common mistake

Before using the distance formula for two parallel planes, make their left sides identical, not just proportional. The planes x+2y−2z=3x + 2y - 2z = 3 and 2x+4y−4z=182x + 4y - 4z = 18 are parallel, but you must first divide the second by 22 to get x+2y−2z=9x + 2y - 2z = 9. Only then is the distance ∣9−3∣3=2\dfrac{|9 - 3|}{3} = 2.

Practice

Practice 1

A line passes through (2,−1,5)(2, -1, 5) with direction vector ⟨3,0,−2⟩\langle 3, 0, -2 \rangle. Using the parametrization r(t)=⟨2,−1,5⟩+t⟨3,0,−2⟩\mathbf{r}(t) = \langle 2, -1, 5 \rangle + t\langle 3, 0, -2 \rangle, find the point with t=2t = 2.

Enter a point like (2, -3)

Practice 2

The plane through (4,−2,1)(4, -2, 1) with normal vector ⟨2,−1,3⟩\langle 2, -1, 3 \rangle has equation 2x−y+3z=d2x - y + 3z = d. Find dd.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

Find the point where the line x=1+2t, y=−3+t, z=4−tx = 1 + 2t,\ y = -3 + t,\ z = 4 - t meets the plane x+2y+3z=11x + 2y + 3z = 11.

Enter a point like (2, -3)

Practice 4

Find the distance from the point (2,1,−3)(2, 1, -3) to the plane 2x−2y+z=42x - 2y + z = 4.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

Which is an equation of the plane through (1,2,3)(1, 2, 3), (2,0,1)(2, 0, 1) and (0,1,5)(0, 1, 5)?

Practice 6

Classify the lines L1L_1: r=⟨1,2,0⟩+t⟨2,−1,1⟩\mathbf{r} = \langle 1, 2, 0 \rangle + t\langle 2, -1, 1 \rangle and L2L_2: r=⟨3,0,4⟩+s⟨−4,2,−2⟩\mathbf{r} = \langle 3, 0, 4 \rangle + s\langle -4, 2, -2 \rangle.

Practice 7

Find the angle, in degrees, between the planes 2x−y+z=32x - y + z = 3 and x+y+2z=1x + y + 2z = 1.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

Find the distance between the parallel planes x+2y−2z=3x + 2y - 2z = 3 and 3x+6y−6z=273x + 6y - 6z = 27.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.