← M408M Week 7(2): Lines and Planes
M408M · Week 7(2) Stewart §12.5

Equations of Lines and Planes

Outline

  1. 1Lines: vector, parametric, symmetric
  2. 2Parallel, intersecting, or skew
  3. 3Planes: a point and a normal vector
  4. 4Angles, intersections, distances
  5. 5Exercises
§12.5 · Lines

A line: one point and one direction

A line $L$ in $\mathbb R^3$ is determined by a point $P_0(x_0,y_0,z_0)$ on $L$ and a direction vector $\mathbf v=\langle a,b,c\rangle$ parallel to $L$.

Vector equation

$$\mathbf r(t)=\mathbf r_0+t\,\mathbf v,\qquad t\in\mathbb R$$

$\mathbf r_0=\langle x_0,y_0,z_0\rangle$ is the position vector of $P_0$. Each value of $t$ gives one point of $L$.

Parametric equations

$$x=x_0+at,\qquad y=y_0+bt,\qquad z=z_0+ct$$

Example

Through $(5,1,3)$, parallel to $\mathbf v=\langle1,4,-2\rangle$:

$$x=5+t,\qquad y=1+4t,\qquad z=3-2t$$

$t=1$ gives $(6,5,1)$ and $t=-1$ gives $(4,-3,5)$. These equations are not unique: another point on $L$, or any nonzero multiple of $\mathbf v$, also works.

Drag to rotate · double-click to reset

§12.5 · Lines

Symmetric equations and line segments

Solve each parametric equation for $t$ and set the results equal.

$$\frac{x-x_0}{a}=\frac{y-y_0}{b}=\frac{z-z_0}{c}\qquad(a,b,c\neq0)$$

If a direction number is $0$, say $a=0$, write $x=x_0$ separately: $\;x=x_0,\ \dfrac{y-y_0}{b}=\dfrac{z-z_0}{c}$.

Example: through $A(2,4,-3)$ and $B(3,-1,1)$

Direction $\mathbf v=\overrightarrow{AB}=\langle1,-5,4\rangle$, so

$$x=2+t,\quad y=4-5t,\quad z=-3+4t\qquad\frac{x-2}{1}=\frac{y-4}{-5}=\frac{z+3}{4}$$

It meets the $xy$-plane when $z=0$: $t=\tfrac34$, at the point $\left(\tfrac{11}4,\tfrac14,0\right)$.

Line segment from $\mathbf r_0$ to $\mathbf r_1$

$$\mathbf r(t)=(1-t)\,\mathbf r_0+t\,\mathbf r_1,\qquad 0\le t\le1$$
Where does this come from?

Start at $\mathbf r_0$ and use the direction $\mathbf v=\mathbf r_1-\mathbf r_0$, the vector from the start to the end:

$$\mathbf r(t)=\mathbf r_0+t\,(\mathbf r_1-\mathbf r_0)=(1-t)\,\mathbf r_0+t\,\mathbf r_1$$

$t=0$ gives $\mathbf r_0$ and $t=1$ gives $\mathbf r_1$, so $0\le t\le1$ keeps only the piece between them. Other values of $t$ give the rest of the line.

With $A$ and $B$ above:

$$\begin{aligned}\mathbf r(t)&=(1-t)\langle2,4,-3\rangle+t\langle3,-1,1\rangle\\&=\langle2+t,\,4-5t,\,-3+4t\rangle\end{aligned}$$

These are the same parametric equations, now with $0\le t\le1$. Slide $t$ past $1$ or below $0$ to leave the segment.

Drag to rotate · double-click to reset

§12.5 · Two lines

Parallel, intersecting, or skew?

In $\mathbb R^3$, two lines can miss each other without being parallel. Such lines are called skew.

  1. Compare directions. If $\mathbf v_1$ and $\mathbf v_2$ are parallel (components proportional), the lines are parallel or the same line.
  2. Look for a common point. Use different parameters $t$ and $s$ and solve
    $$\mathbf r_1+t\,\mathbf v_1=\mathbf r_2+s\,\mathbf v_2$$
    Solve two of the three component equations, then check the third.
  3. Decide. The third equation holds: the lines intersect. It fails: the lines are skew.
Using the same letter $t$ for both lines is a common mistake: it asks whether the two points arrive at the same place at the same time.

Drag to rotate · double-click to reset

§12.5 · Planes

A plane: one point and a normal vector

A plane is determined by a point $P_0(x_0,y_0,z_0)$ in it and a normal vector $\mathbf n=\langle a,b,c\rangle$ orthogonal to it.

$P(x,y,z)$ lies in the plane exactly when $\overrightarrow{P_0P}$ is orthogonal to $\mathbf n$:

$$\mathbf n\cdot(\mathbf r-\mathbf r_0)=0$$
$$a(x-x_0)+b(y-y_0)+c(z-z_0)=0$$
$$ax+by+cz=d,\qquad d=ax_0+by_0+cz_0$$

Example

Through $(1,2,1)$ with $\mathbf n=\langle2,3,4\rangle$:

$$2(x-1)+3(y-2)+4(z-1)=0\iff 2x+3y+4z=12$$

Intercepts: $x=6$, $y=4$, $z=3$. They outline the part of the plane in the first octant.

Read the normal vector straight from the coefficients: $ax+by+cz=d$ has normal $\langle a,b,c\rangle$.

Drag to rotate · double-click to reset

§12.5 · Planes

The plane through three points

Three points that are not on one line determine a plane. A cross product (§12.4) supplies the normal vector.

  1. Two edge vectors: $\overrightarrow{PQ}$ and $\overrightarrow{PR}$ both lie in the plane.
  2. Normal vector: $\mathbf n=\overrightarrow{PQ}\times\overrightarrow{PR}$ is orthogonal to both.
  3. Plug $\mathbf n$ and any one of the points into $a(x-x_0)+b(y-y_0)+c(z-z_0)=0$.
  4. Check: the other two points must satisfy your equation.

Example: $P(1,3,2)$, $Q(3,-1,6)$, $R(5,2,0)$

$$\overrightarrow{PQ}=\langle2,-4,4\rangle,\qquad\overrightarrow{PR}=\langle4,-1,-2\rangle$$
$$\mathbf n=\langle12,20,14\rangle\ \Rightarrow\ 12(x-1)+20(y-3)+14(z-2)=0$$
$$6x+10y+7z=50$$
Bonus from §12.4: the same $\mathbf n$ gives the area of triangle $PQR$, namely $\tfrac12\|\mathbf n\|$.

Drag to rotate · double-click to reset

§12.5 · Angles and intersections

Two planes: the angle and the line where they meet

Two planes are parallel when their normal vectors are parallel. Otherwise they meet in a line.

Angle between planes = acute angle between normals

$$\cos\theta=\frac{|\mathbf n_1\cdot\mathbf n_2|}{\|\mathbf n_1\|\,\|\mathbf n_2\|}$$

Example: $x+y+z=1$ and $x-2y+3z=1$ have $\mathbf n_1=\langle1,1,1\rangle$, $\mathbf n_2=\langle1,-2,3\rangle$, so $\cos\theta=\tfrac{2}{\sqrt{42}}$ and $\theta\approx72^\circ$.

Line of intersection: orthogonal to both normals

Direction $\mathbf v=\mathbf n_1\times\mathbf n_2=\langle5,-2,-3\rangle$. For a point, set $z=0$: $x+y=1$ and $x-2y=1$ give $(1,0,0)$.

$$\frac{x-1}{5}=\frac{y}{-2}=\frac{z}{-3}$$

Where a line meets a plane: substitute, then solve for $t$

Putting $x=2+3t$, $y=-4t$, $z=5+t$ into $4x+5y-2z=18$ gives $-10t=20$, so $t=-2$ and the point is $(-4,8,3)$.

Drag to rotate · double-click to reset

§12.5 · Distances

Distance from a point to a plane

Pick any point $P_0$ in the plane. The distance is the length of the projection of $\overrightarrow{P_0P_1}$ onto $\mathbf n$ (§12.3).

$$D=\left|\operatorname{comp}_{\mathbf n}\overrightarrow{P_0P_1}\right|=\frac{|\mathbf n\cdot\overrightarrow{P_0P_1}|}{\|\mathbf n\|}$$
$$D=\frac{|ax_1+by_1+cz_1-d|}{\sqrt{a^2+b^2+c^2}}$$

Here $P_1=(x_1,y_1,z_1)$ is the point and $ax+by+cz=d$ is the plane, with normal $\mathbf n=\langle a,b,c\rangle$.

Why does $\mathbf n\cdot\overrightarrow{P_0P_1}$ equal $ax_1+by_1+cz_1-d$?

Why project? The shortest path from $P_1$ to the plane is parallel to $\mathbf n$, so $D$ is the length of the part of $\overrightarrow{P_0P_1}$ along $\mathbf n$.

Let $P_0=(x_0,y_0,z_0)$ be any point in the plane, so $ax_0+by_0+cz_0=d$. With $\overrightarrow{P_0P_1}=\langle x_1-x_0,\,y_1-y_0,\,z_1-z_0\rangle$:

$$\begin{aligned}\mathbf n\cdot\overrightarrow{P_0P_1}&=a(x_1-x_0)+b(y_1-y_0)+c(z_1-z_0)\\&=(ax_1+by_1+cz_1)-\underbrace{(ax_0+by_0+cz_0)}_{=\,d\ (P_0\text{ is in the plane})}\\&=ax_1+by_1+cz_1-d\end{aligned}$$

Divide by $\|\mathbf n\|=\sqrt{a^2+b^2+c^2}$. Every $x_0,y_0,z_0$ has dropped out, so any $P_0$ gives the same $D$: try the slider.

Example

From $P_1(3,3,3)$ to $x+2y+2z=6$: $\;D=\dfrac{|3+6+6-6|}{\sqrt{1+4+4}}=\dfrac93=3$.

Parallel planes
Pick a point on one plane and find its distance to the other.
Skew lines
$\mathbf n=\mathbf v_1\times\mathbf v_2$ is orthogonal to both lines. With $P_1$ on $L_1$ and $P_2$ on $L_2$: $\;D=\dfrac{|\mathbf n\cdot\overrightarrow{P_1P_2}|}{\|\mathbf n\|}$.

Drag to rotate · double-click to reset

Exercises

Practice: lines, planes, and triangles

Try each problem before looking at the solutions on the next slides. Give exact answers.

Exercise 1 · Two lines

$$\begin{aligned}L_1&:\ x=1+t,\ y=2t,\ z=2-t\\ L_2&:\ x=2s,\ y=1,\ z=-1+s\end{aligned}$$
  1. Are $L_1$ and $L_2$ parallel, intersecting, or skew?
  2. Find the distance between $L_1$ and $L_2$.

Exercise 2 · A triangle in space

Vertices $A(2,1,0),\ B(1,3,1),\ C(0,0,3)$

  1. Find the equation of the plane formed by the three points.
  2. What is the exact area of the triangle?
  3. How far is this plane from the origin?
Solution · Exercise 1

Solution 1: skew lines and their distance

$L_1$: point $P_1(1,0,2)$, direction $\mathbf v_1=\langle1,2,-1\rangle$. $\;L_2$: point $P_2(0,1,-1)$, direction $\mathbf v_2=\langle2,0,1\rangle$.

(a) $\mathbf v_1$ and $\mathbf v_2$ are not proportional, so the lines are not parallel. A common point would need

$$1+t=2s,\qquad 2t=1,\qquad 2-t=-1+s$$

The first two give $t=\tfrac12$, $s=\tfrac34$. Third: $2-\tfrac12=\tfrac32$ but $-1+\tfrac34=-\tfrac14$. No common point, so the lines are skew.

(b) The shortest segment between the lines is perpendicular to both of them, so it points along

$$\mathbf n=\mathbf v_1\times\mathbf v_2=\langle2,-3,-4\rangle,\qquad\|\mathbf n\|=\sqrt{29}$$

Why project? Any segment from $L_1$ to $L_2$, such as $\overrightarrow{P_1P_2}$, can wander along the lines, but its component along $\mathbf n$ is always the same: it equals the distance. That component is the scalar projection (§12.3).

$$\overrightarrow{P_1P_2}=\langle-1,1,-3\rangle,\qquad \mathbf n\cdot\overrightarrow{P_1P_2}=-2-3+12=7$$
$$D=\left|\operatorname{comp}_{\mathbf n}\overrightarrow{P_1P_2}\right|=\frac{|\mathbf n\cdot\overrightarrow{P_1P_2}|}{\|\mathbf n\|}=\frac{7}{\sqrt{29}}$$

Drag to rotate · double-click to reset

Solution · Exercise 2

Solution 2: a triangle in space

$A(2,1,0)$, $B(1,3,1)$, $C(0,0,3)$

(a) A plane needs a point and a normal vector. Why a cross product? $\overrightarrow{AB}=\langle-1,2,1\rangle$ and $\overrightarrow{AC}=\langle-2,-1,3\rangle$ lie in the plane, and $\overrightarrow{AB}\times\overrightarrow{AC}$ is perpendicular to both, so it is a normal vector.

$$\mathbf n=\begin{vmatrix}\mathbf i&\mathbf j&\mathbf k\\-1&2&1\\-2&-1&3\end{vmatrix}=\langle7,1,5\rangle$$
$$7(x-2)+1(y-1)+5(z-0)=0\iff 7x+y+5z=15$$

Check: $B$ gives $7+3+5=15$ and $C$ gives $0+0+15=15$.

(b) $\|\overrightarrow{AB}\times\overrightarrow{AC}\|$ is the area of the parallelogram on $\overrightarrow{AB}$, $\overrightarrow{AC}$; the triangle is half of it.

$$\text{Area}=\tfrac12\|\mathbf n\|=\tfrac12\sqrt{49+1+25}=\tfrac12\sqrt{75}=\tfrac{5\sqrt3}{2}$$

(c) Distance from $(x_1,y_1,z_1)$ to $ax+by+cz=d$, here with $O(0,0,0)$:

$$D=\frac{|ax_1+by_1+cz_1-d|}{\sqrt{a^2+b^2+c^2}}=\frac{|7(0)+1(0)+5(0)-15|}{\sqrt{7^2+1^2+5^2}}=\frac{15}{5\sqrt3}=\sqrt3$$
The dashed segment from $O$ meets the plane at a right angle, at $\left(\tfrac75,\tfrac15,1\right)$. Its length is $\sqrt3$.

Drag to rotate · double-click to reset

§12.5 · Summary

Summary: what to find, and how

Lines need a point and a direction. Planes need a point and a normal. Cross products supply the missing vector.

GoalMethod
Line through $P_0$ in direction $\mathbf v$$\mathbf r=\mathbf r_0+t\mathbf v$; through two points, use $\mathbf v=\overrightarrow{P_0P_1}$
Two linesParallel directions? If not, solve $\mathbf r_1+t\mathbf v_1=\mathbf r_2+s\mathbf v_2$: a solution means they intersect; none means skew
Plane through $P_0$ with normal $\mathbf n$$a(x-x_0)+b(y-y_0)+c(z-z_0)=0$
Plane through $P$, $Q$, $R$$\mathbf n=\overrightarrow{PQ}\times\overrightarrow{PR}$, then check all three points; area of $\triangle PQR=\tfrac12\|\mathbf n\|$
Angle between planes$\cos\theta=\dfrac{|\mathbf n_1\cdot\mathbf n_2|}{\|\mathbf n_1\|\|\mathbf n_2\|}$
Line where two planes meet$\mathbf v=\mathbf n_1\times\mathbf n_2$; find one point by setting a variable to $0$
Distance from a point to a plane$D=\dfrac{|ax_1+by_1+cz_1-d|}{\sqrt{a^2+b^2+c^2}}$
Distance between skew lines$\mathbf n=\mathbf v_1\times\mathbf v_2$, $\;D=\dfrac{|\mathbf n\cdot\overrightarrow{P_1P_2}|}{\|\mathbf n\|}$