Skip to main content
\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)
Mathematics LibreTexts

12.5: Lines and Planes

Lines and planes are perhaps the simplest of curves and surfaces in three dimensional space. They also will prove important as we seek to understand more complicated curves and surfaces.

The equation of a line in two dimensions is \(ax+by=c\); it is reasonable to expect that a line in three dimensions is given by \(ax + by +cz = d\); reasonable, but wrong---it turns out that this is the equation of a plane.

A plane does not have an obvious "direction'' as does a line. It is possible to associate a plane with a direction in a very useful way, however: there are exactly two directions perpendicular to a plane. Any vector with one of these two directions is called normal to the plane. So while there are many normal vectors to a given plane, they are all parallel or anti-parallel to each other.

Suppose two points \( (v_1,v_2,v_3)\) and \( (w_1,w_2,w_3)\) are in a plane; then the vector \( \langle w_1-v_1,w_2-v_2,w_3-v_3\rangle\) is parallel to the plane; in particular, if this vector is placed with its tail at \( (v_1,v_2,v_3)\) then its head is at \( (w_1,w_2,w_3)\) and it lies in the plane. As a result, any vector perpendicular to the plane is perpendicular to \( \langle w_1-v_1,w_2-v_2,w_3-v_3\rangle\). In fact, it is easy to see that the plane consists of precisely those points \( (w_1,w_2,w_3)\) for which \( \langle w_1-v_1,w_2-v_2,w_3-v_3\rangle\) is perpendicular to a normal to the plane, as indicated in figure 12.5.1.

Turning this around, suppose we know that \(\langle a,b,c\rangle\) is normal to a plane containing the point \( (v_1,v_2,v_3)\). Then \((x,y,z)\) is in the plane if and only if \(\langle a,b,c\rangle\) is perpendicular to \( \langle x-v_1,y-v_2,z-v_3\rangle\). In turn, we know that this is true precisely when \( \langle a,b,c\rangle\cdot\langle x-v_1,y-v_2,z-v_3\rangle=0\). That is, \((x,y,z)\) is in the plane if and only if

\[\eqalign{ \langle a,b,c\rangle\cdot\langle x-v_1,y-v_2,z-v_3\rangle&=0\cr a(x-v_1)+b(y-v_2)+c(z-v_3)&=0\cr ax+by+cz-av_1-bv_2-cv_3&=0\cr ax+by+cz&=av_1+bv_2+cv_3.\cr }\]

Working backwards, note that if \((x,y,z)\) is a point satisfying \(ax+by+cz=d\) then

\[\eqalign{ ax+by+cz&=d\cr ax+by+cz-d&=0\cr a(x-d/a)+b(y-0)+c(z-0)&=0\cr \langle a,b,c\rangle\cdot\langle x-d/a,y,z\rangle&=0.\cr }\]

Namely, \(\langle a,b,c\rangle\) is perpendicular to the vector with tail at \((d/a,0,0)\) and head at \((x,y,z)\). This means that the points \((x,y,z)\) that satisfy the equation \(ax+by+cz=d\) form a plane perpendicular to \(\langle a,b,c\rangle\). (This doesn't work if \(a=0\), but in that case we can use \(b\) or \(c\) in the role of \(a\). That is, either \(a(x-0)+b(y-d/b)+c(z-0)=0\) or \(a(x-0)+b(y-0)+c(z-d/c)=0\).)



Figure 12.5.1. A plane defined via vectors perpendicular to a normal. You can download the Sage worksheet for this plot and upload it to your own sage account.


Thus, given a vector \(\langle a,b,c\rangle\) we know that all planes perpendicular to this vector have the form \(ax+by+cz=d\), and any surface of this form is a plane perpendicular to \(\langle a,b,c\rangle\).

Example 12.5.1

Find an equation for the plane perpendicular to \(\langle 1,2,3\rangle\) and containing the point \((5,0,7)\).


Using the derivation above, the plane is \(1x+2y+3z=1\cdot5+2\cdot0+3\cdot7=26\). Alternately, we know that the plane is \(x+2y+3z=d\), and to find \(d\) we may substitute the known point on the plane to get \(5+2\cdot0+3\cdot7=d\), so \(d=26\).

Example 12.5.2

Find a vector normal to the plane \(2x-3y+z=15\).


One example is \(\langle 2, -3,1\rangle\). Any vector parallel or anti-parallel to this works as well, so for example \(-2\langle 2, -3,1\rangle=\langle -4,6,-2\rangle\) is also normal to the plane.

We will frequently need to find an equation for a plane given certain information about the plane. While there may occasionally be slightly shorter ways to get to the desired result, it is always possible, and usually advisable, to use the given information to find a normal to the plane and a point on the plane, and then to find the equation as above.

Example 12.5.3

The planes \(x-z=1\) and \(y+2z=3\) intersect in a line. Find a third plane that contains this line and is perpendicular to the plane \(x+y-2z=1\).


First, we note that two planes are perpendicular if and only if their normal vectors are perpendicular. Thus, we seek a vector \(\langle a,b,c\rangle\) that is perpendicular to \(\langle 1,1,-2\rangle\). In addition, since the desired plane is to contain a certain line, \(\langle a,b,c\rangle\) must be perpendicular to any vector parallel to this line. Since \(\langle a,b,c\rangle\) must be perpendicular to two vectors, we may find it by computing the cross product of the two. So we need a vector parallel to the line of intersection of the given planes. For this, it suffices to know two points on the line.

To find two points on this line, we must find two points that are simultaneously on the two planes, \(x-z=1\) and \(y+2z=3\). Any point on both planes will satisfy \(x-z=1\) and \(y+2z=3\). It is easy to find values for \(x\) and \(z\) satisfying the first, such as \(x=1, z=0\) and \(x=2, z=1\). Then we can find corresponding values for \(y\) using the second equation, namely \(y=3\) and \(y=1\), so \((1,3,0)\) and \((2,1,1)\) are both on the line of intersection because both are on both planes. Now \(\langle 2-1,1-3,1-0\rangle=\langle 1,-2,1\rangle\) is parallel to the line. Finally, we may choose \(\langle a,b,c\rangle=\langle 1,1,-2\rangle\times \langle 1,-2,1\rangle=\langle -3,-3,-3\rangle\). While this vector will do perfectly well, any vector parallel or anti-parallel to it will work as well, so for example we might choose \(\langle 1,1,1\rangle\), which is anti-parallel to it.

Now we know that \(\langle 1,1,1\rangle\) is normal to the desired plane and \((2,1,1)\) is a point on the plane. Therefore an equation of the plane is \(x+y+z=4\). As a quick check, since \((1,3,0)\) is also on the line, it should be on the plane; since \(1+3+0=4\), we see that this is indeed the case.

Note that had we used \(\langle -3,-3,-3\rangle\) as the normal, we would have discovered the equation \(-3x-3y-3z=-12\), then we might well have noticed that we could divide both sides by \(-3\) to get the equivalent \(x+y+z=4\).

So we now understand equations of planes; let us turn to lines. Unfortunately, it turns out to be quite inconvenient to represent a typical line with a single equation; we need to approach lines in a different way.

Unlike a plane, a line in three dimensions does have an obvious direction, namely, the direction of any vector parallel to it. In fact a line can be defined and uniquely identified by providing one point on the line and a vector parallel to the line (in one of two possible directions). That is, the line consists of exactly those points we can reach by starting at the point and going for some distance in the direction of the vector. Let's see how we can translate this into more mathematical language.

Suppose a line contains the point \( (v_1,v_2,v_3)\) and is parallel to the vector \(\langle a,b,c\rangle\). If we place the vector \( \langle v_1,v_2,v_3\rangle\) with its tail at the origin and its head at \( (v_1,v_2,v_3)\), and if we place the vector \(\langle a,b,c\rangle\) with its tail at \( (v_1,v_2,v_3)\), then the head of \(\langle a,b,c\rangle\) is at a point on the line. We can get to any point on the line by doing the same thing, except using \(t\langle a,b,c\rangle\) in place of \(\langle a,b,c\rangle\), where \(t\) is some real number. Because of the way vector addition works, the point at the head of the vector \(t\langle a,b,c\rangle\) is the point at the head of the vector \( \langle v_1,v_2,v_3\rangle+t\langle a,b,c\rangle\), namely \( (v_1+ta,v_2+tb,v_3+tc)\); see figure 12.5.2.


Figure 12.5.2. Vector form of a line.


In other words, as \(t\) runs through all possible real values, the vector \( \langle v_1,v_2,v_3\rangle+t\langle a,b,c\rangle\) points to every point on the line when its tail is placed at the origin. Another common way to write this is as a set of parametric equations:

\[ x= v_1+ta\qquad y=v_2+tb \qquad z=v_3+tc.\]

It is occasionally useful to use this form of a line even in two dimensions; a vector form for a line in the \(x\)-\)y\) plane is \( \langle v_1,v_2\rangle+t\langle a,b\rangle\), which is the same as \( \langle v_1,v_2,0\rangle+t\langle a,b,0\rangle\).

Example 12.5.4

Find a vector expression for the line through \((6,1,-3)\) and \((2,4,5)\). To get a vector parallel to the line we subtract \(\langle 6,1,-3\rangle-\langle2,4,5\rangle=\langle 4,-3,-8\rangle\). The line is then given by \(\langle 2,4,5\rangle+t\langle 4,-3,-8\rangle\); there are of course many other possibilities, such as \(\langle 6,1,-3\rangle+t\langle 4,-3,-8\rangle\).

Example 12.5.5

Determine whether the lines \(\langle 1,1,1\rangle+t\langle 1,2,-1\rangle\) and \(\langle 3,2,1\rangle+t\langle -1,-5,3\rangle\) are parallel, intersect, or neither.


In two dimensions, two lines either intersect or are parallel; in three dimensions, lines that do not intersect might not be parallel. In this case, since the direction vectors for the lines are not parallel or anti-parallel we know the lines are not parallel. If they intersect, there must be two values \(a\) and \(b\) so that \(\langle 1,1,1\rangle+a\langle 1,2,-1\rangle= \langle 3,2,1\rangle+b\langle -1,-5,3\rangle\), that is,

\[\eqalign{ 1+a&=3-b\cr 1+2a&=2-5b\cr 1-a&=1+3b\cr }\]

This gives three equations in two unknowns, so there may or may not be a solution in general. In this case, it is easy to discover that \(a=3\) and \(b=-1\) satisfies all three equations, so the lines do intersect at the point \((4,7,-2)\).


Example 12.5.6

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


The distance from a point \(P\) to a plane is the shortest distance from \(P\) to any point on the plane; this is the distance measured from \(P\) perpendicular to the plane; see figure 12.5.3. This distance is the absolute value of the scalar projection of \( \overrightarrow{\strut QP}\) onto a normal vector \(\bf n\), where \(Q\) is any point on the plane. It is easy to find a point on the plane, say \((1,0,1)\). Thus the distance is

\[ {\langle 0,2,2\rangle\cdot\langle 2,-1,3\rangle\over|\langle 2,-1,3\rangle|}= {4\over\sqrt{14}}. \]

Figure 12.5.3. Distance from a point to a plane.


Example 12.5.7

Find the distance from the point \((-1,2,1)\) to the line \(\langle 1,1,1\rangle + t\langle 2,3,-1\rangle\). Again we want the distance measured perpendicular to the line, as indicated in figure 12.5.4. The desired distance is

\[ |\overrightarrow{\strut QP}|\sin\theta= {|\overrightarrow{\strut QP}\times{\bf A}|\over|{\bf A}|}, \]

where \(\bf A\) is any vector parallel to the line. From the equation of the line, we can use \(Q=(1,1,1)\) and \({\bf A}=\langle 2,3,-1\rangle\), so the distance is

\[ {|\langle -2,1,0\rangle\times\langle2,3,-1\rangle|\over\sqrt{14}}= {|\langle-1,-2,-8\rangle|\over\sqrt{14}}={\sqrt{69}\over\sqrt{14}}. \]

Figure 12.5.4. Distance from a point to a line.