Multivariable CalculusVectors and the Geometry of Space1 of 5
Vectors and the Geometry of Space · 1

Three-Dimensional Coordinates

To describe points and shapes in space, we add a third axis for height to our flat xyxy-graph.

1

Plotting Points in 3D

Suppose we want to plot the point (2,3,4)(2, 3, 4) in three dimensions. On a flat page, a floating dot by itself could be far back and low down or close and high up, so we lay the xyxy-graph on the floor and trace the path along the floor before going up.

Plotting Points in 3D
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
z\htmlClass{lc-mute}{z}
(2,3,4)\htmlClass{}{(2, 3, 4)}

Text solution:

Drawing the floor point (2,3,0)(2, 3, 0) first locks in how far forward and right the point sits, so its height of 4\step{4} is clear.

2

Planes, Lines and Octants

Once we can locate a single point by fixing all three coordinates, we want to see what shape an equation builds when it only fixes one or two coordinates and leaves the others out.

Planes, Lines and Octants
z=3\htmlClass{lc-blue}{z = 3}
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
z\htmlClass{lc-mute}{z}
(1,3,3)\htmlClass{}{(1, 3, \htmlClass{lc-blue}{3})}

An equation in 3D only restricts the coordinates it mentions:

Fixing xx gives a plane parallel to the back wall, fixing yy gives a plane parallel to the left wall, and fixing both gives the vertical line where those two planes meet.

Fixing one coordinate gives a flat plane parallel to a wall, and fixing both floor coordinates keeps the point on the vertical line where those two planes meet.
3

Distance and Midpoint in 3D

Now suppose we have two points in the room, A(1,−2,4)A(1, -2, 4) and B(3,2,1)B(3, 2, 1), and we want to find the straight-line distance between them through the air as well as the midpoint halfway between them. Instead of memorizing a new rule, we can find the diagonal distance across the floor first and use it as the base of a vertical right triangle.

Distance and Midpoint in 3D
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
z\htmlClass{lc-mute}{z}
(0,0,0)\htmlClass{}{(0, 0, 0)}
(2,3,6)\htmlClass{}{(2, 3, 6)}
d=  ?\htmlClass{}{\htmlClass{lc-blue}{d} = \;?}

Wherever a point sits in the room, its vertical height segment meets the floor diagonal at a 90∘90^\circ angle, so the 3D distance squared is always the floor diagonal squared plus the height squared.

No matter where a point sits in the room, its height meets the floor diagonal at a right angle, so the 3D distance squared is always the floor diagonal squared plus the height squared.

Applying the Pythagorean theorem across the floor and then straight up gives the 3D distance formula:

d\displaystyle \dist{d} =(x2−x1)2+(y2−y1)2+(z2−z1)2\displaystyle = \sqrt{{\step{(x_2 - x_1)}}^2 + {\step{(y_2 - y_1)}}^2 + {\step{(z_2 - z_1)}}^2}

In practice, plugging negative coordinates into x2−x1\step{x_2 - x_1} makes it easy to make sign mistakes. Because every change gets squared anyway, it is much safer to just count how many steps each coordinate travels from one point to the other.

Text solution:

So AA and BB are 29\dist{\sqrt{29}} units apart through the air, and (2,0,2.5)(2, 0, 2.5) is the exact halfway point between them.

4

The Equation of a Sphere

A sphere is made of all the points (x,y,z)(x, y, z) at a fixed distance from a center. To write the equation of the sphere with center (1,2,3)(1, 2, 3) and radius 5\dist{5}, we set the 3D distance from (1,2,3)(1, 2, 3) to (x,y,z)(x, y, z) equal to 5\dist{5}.

The Equation of a Sphere
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
z\htmlClass{lc-mute}{z}
(1,2,3)\htmlClass{}{(1, 2, 3)}
5\htmlClass{lc-blue}{5}
(x,y,z)\htmlClass{}{(x, y, z)}

Text solution:

So a sphere equation is just the 3D distance formula with both sides squared: the values that make each squared term zero give the center (1,2,3)(1, 2, 3), and the square root of the right side gives the radius 25=5\dist{\sqrt{25} = 5}. Watch the signs inside the parentheses: if a term is (y+4)2{\step{(y + 4)}}^2, the value that makes it zero is y=−4y = -4.

5

Completing the Square and Slicing a Sphere

When someone multiplies out a sphere's parentheses and collects the numbers on the right, we get an expanded equation like

x2+y2+z2−6x+4y−2z\displaystyle x^2 + y^2 + z^2 - 6x + 4y - 2z =11\displaystyle = 11

where you can't immediately see the center and radius. We want to put this equation back into squared form to find the center and radius, and then find the curve formed where a flat plane slices through the sphere.

Since multiplying out (x−3)2{\step{(x - 3)}}^2 doubles −3-3 to make −6x-6x and squares −3-3 to add 9\complete{9} at the end, we reverse it by taking half of the middle number and adding its square to both sides:

(x−3)2⏟half of −6 is −3\displaystyle \underbrace{{\step{(x - 3)}}^2}_{\text{half of } -6 \text{ is } -3} =x2−6x+9⏟(−3)2\displaystyle = x^2 - 6x + \complete{\underbrace{9}_{(-3)^2}}
Completing the Square and Slicing a Sphere
x2+y2+z2−6x+4y−2z\displaystyle x^2 + y^2 + z^2 - 6x + 4y - 2z =11\displaystyle = 11
center=  ?,radius=  ?\displaystyle {\text{center} = \;?,\qquad \dist{\text{radius}} = \;?}

Text solution:

As a horizontal plane cuts the sphere at different heights, the circular slice is widest at the center (z=1z = 1), shrinks to a point at the top (z=6z = 6) and bottom (z=−4z = -4), and disappears when the plane moves past the sphere and makes the right side negative.

At each height, the number on the right side of the slice's equation sets the circle's radius, and turns negative once the plane moves past the sphere.
6

Inequalities and Solid Regions in 3D

Equations with an equals sign only give thin surfaces like a flat plane or a hollow sphere. To describe a solid 3D region, like a solid ball, a rectangular box, or a hollowed-out shell, we replace == with inequalities (<,>,≤,≥\region{<, >, \le, \ge}), where each inequality cuts away part of space.

Inequalities and Solid Regions in 3D
=\htmlClass{lc-blue}{=}
<\htmlClass{lc-green}{<}
>\htmlClass{lc-green}{>}
≤\htmlClass{lc-green}{\le}
≥\htmlClass{lc-green}{\ge}
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
z\htmlClass{lc-mute}{z}
0≤x≤2,  0≤y≤3,  0≤z≤4\htmlClass{lc-green}{0 \le x \le 2,\; 0 \le y \le 3,\; 0 \le z \le 4}
1≤x2+y2+z2≤4,  z≥0\htmlClass{lc-green}{1 \le x^2 + y^2 + z^2 \le 4,\; z \ge 0}

Putting bounds on xx, yy, and zz builds flat-sided blocks, while putting bounds on the distance squared from a center builds curved solids:

Now let's write out the steps for two curved-region problems: first describing 1≤x2+y2+z2≤4\region{1 \le x^2 + y^2 + z^2 \le 4} with z≥0\region{z \ge 0}, and then turning a description in the first octant into inequalities.

Text solution (describing 1≤x2+y2+z2≤4\region{1 \le x^2 + y^2 + z^2 \le 4} and z≥0\region{z \ge 0}):

Text solution (writing inequalities for the region in the first octant below z=6z = 6 and outside the sphere of radius 2\dist{2} at the origin):

Together, x≥0\region{x \ge 0}, y≥0\region{y \ge 0}, 0≤z<6\region{0 \le z < 6}, and x2+y2+z2>4\region{x^2 + y^2 + z^2 > 4} describe the solid region in the first octant below height 66 with a ball of radius 2\dist{2} removed from the corner.

Raising the inner bound in inner2≤x2+y2+z2≤4\region{\text{inner}^2 \le x^2 + y^2 + z^2 \le 4} (with z≥0\region{z \ge 0}) from 0\region{0} to 4\region{4} hollows out the solid half-ball from the inside, turning it into a thick shell and then a thin surface when both bounds meet at 4\region{4}.

Raising the lower bound hollows out a solid ball from the center, turning it into a thick shell and then a thin hollow sphere as the inner boundary reaches the outer surface.

Summary

Everything here comes down to two questions: which coordinates are locked in place, and how far is a point from a center?

When an equation sets coordinates to fixed numbers, count which coordinates are missing to see what can still move freely. Fixing all three coordinates gives a single point like (2,3,4)(2, 3, 4), which you always plot by walking out to its floor spot (2,3,0)(2, 3, 0) first. Leaving one coordinate out gives a line along that free direction (so x=2,y=3\locked{x = 2, y = 3} is a vertical line because zz is free), and leaving two coordinates out gives a flat plane parallel to the two free axes (so z=0\locked{z = 0} is the floor, y=0\locked{y = 0} is the left wall, and x=0\locked{x = 0} is the back wall, which together divide space into eight octants, with x>0,y>0,z>0\region{x > 0, y > 0, z > 0} in the first octant).

When working with two points like A(1,−2,4)A(1, -2, 4) and B(3,2,1)B(3, 2, 1), separate how far apart they are from where their halfway point sits: for distance, just count the coordinate steps (2\step{2}, 4\step{4}, and 3\step{3}) and combine them in the 3D Pythagorean theorem d=22+42+32=29\dist{d} = \sqrt{\step{2}^2 + \step{4}^2 + \step{3}^2} = \dist{\sqrt{29}} rather than plugging negatives into (x2−x1)2{\step{(x_2 - x_1)}}^2, whereas for the midpoint you average the coordinates themselves to get (1+32,−2+22,4+12)=(2,0,2.5)\left(\frac{1+3}{2}, \frac{-2+2}{2}, \frac{4+1}{2}\right) = (2, 0, 2.5).

Keeping the distance from a center (1,2,3)(1, 2, 3) fixed at 5\dist{5} and squaring both sides gives the sphere equation (x−1)2+(y−2)2+(z−3)2=25{\step{(x - 1)}}^2 + {\step{(y - 2)}}^2 + {\step{(z - 3)}}^2 = \dist{25}. When the equation is already factored into squared parentheses, don't multiply it out: read the center (1,2,3)(1, 2, 3) straight from the values that make each square zero and take 25=5\dist{\sqrt{25} = 5} for the radius. Only complete the square when unfactored terms like x2−6xx^2 - 6x appear, taking half of the −6-6 and adding (−3)2=9\complete{(-3)^2 = 9} to both sides. To slice a sphere with a plane like z=0z = 0, plug z=0z = 0 directly into the sphere equation: a positive number on the right gives a circle of radius number\slice{\sqrt{\text{number}}}, zero gives a single point, and a negative number means the plane misses the sphere. Finally, replacing == with inequalities turns thin surfaces into solid regions: putting xx, yy, and zz between numbers cuts out slabs and boxes, while replacing =r2\dist{= r^2} with ≤r2\region{\le r^2} or >r2\region{> r^2} keeps the points inside or outside the sphere.

7

Practice

1

Write the equation of the plane passing through (4,−3,5)(4, -3, 5) that is parallel to the xzxz-plane, and write the pair of equations that describes the vertical line passing through (4,−3,5)(4, -3, 5).

Along a plane parallel to the xzxz-plane, xx and zz can take any value. Which single coordinate stays locked? Along a vertical line, which single coordinate is free to change?

Lock the coordinate missing from the xzxz-planeThe xzxz-plane is the left wall y=0\locked{y = 0}, so a plane parallel to it keeps yy fixed at the point's yy-coordinate while xx and zz can take any value. (A common mistake is seeing the letters xx and zz in "xzxz-plane" and writing x=4,z=5x = 4, z = 5, which fixes two coordinates and gives a horizontal line instead of a plane.)
y=−3\displaystyle \locked{y = -3}
Lock both floor coordinates for the vertical lineA vertical line goes straight up and down from the floor spot (4,−3,0)(4, -3, 0), so zz must stay free while both xx and yy are fixed. (Don't write z=5z = 5 thinking "vertical means zz". Locking z=5z = 5 fixes the height and creates a horizontal plane instead of a vertical line.)
Plane: y=−3Vertical line: x=4,  y=−3\displaystyle \begin{aligned} &\text{Plane: } \locked{y = -3} \\ &\text{Vertical line: } \locked{x = 4,\; y = -3} \end{aligned}
2

Find the straight-line distance and the midpoint between the points A(−2,5,1)A(-2, 5, 1) and B(4,1,−2)B(4, 1, -2).

How many steps does each coordinate travel from AA to BB (crossing zero where needed)? Then what is the average of each pair of coordinates?

Count the coordinate steps from A(−2,5,1)A(-2, 5, 1) to B(4,1,−2)B(4, 1, -2)Walk from −2-2 to 44 on xx, from 55 to 11 on yy, and from 11 to −2-2 on zz. (Watch out for dropping negative signs and taking 4−2=24 - 2 = 2 steps for xx and 2−1=12 - 1 = 1 step for zz, which leads to the wrong distance 22+42+12=21\sqrt{2^2 + 4^2 + 1^2} = \sqrt{21}; crossing zero from −2-2 to 44 is 6\step{6} steps, and from 11 to −2-2 is 3\step{3} steps.)
change in x=6,change in y=4,change in z=3\displaystyle \begin{aligned} &\step{\text{change in } x = 6}, \\ &\step{\text{change in } y = 4}, \\ &\step{\text{change in } z = 3} \end{aligned}
Square the steps and add them under the square root
d=62+42+32=36+16+9=61\displaystyle \begin{aligned} \dist{d} &= \sqrt{\step{6}^2 + \step{4}^2 + \step{3}^2} \\ &= \sqrt{36 + 16 + 9} \\ &= \dist{\sqrt{61}} \end{aligned}
Average the coordinates for the midpointAdd each pair of coordinates and divide by 22 (subtracting the coordinates instead of adding them is a common mistake that gives (−3,2,1.5)(-3, 2, 1.5)).
midpoint\displaystyle \text{midpoint} =(−2+42, 5+12, 1+(−2)2)\displaystyle = \left(\frac{-2 + 4}{2},\, \frac{5 + 1}{2},\, \frac{1 + (-2)}{2}\right) =(1,3,−0.5)\displaystyle = (1, 3, -0.5)
Distance: 61,Midpoint: (1,3,−0.5)\displaystyle \begin{aligned} &\text{Distance: } \dist{\sqrt{61}}, \\ &\text{Midpoint: } (1, 3, -0.5) \end{aligned}
3

Write the equation of the sphere centered at (−2,4,3)(-2, 4, 3) that just touches the floor (the xyxy-plane).

How far is the center (−2,4,3)(-2, 4, 3) straight down to the floor z=0z = 0? That vertical distance is the sphere's radius.

Find the radius from the center's height above the floorThe center (−2,4,3)(-2, 4, 3) sits 3\dist{3} units above the floor z=0z = 0, so a sphere that just touches the floor has radius 3\dist{3}. (Don't find the distance from (−2,4,3)(-2, 4, 3) to the origin (−2)2+42+32=29\sqrt{(-2)^2 + 4^2 + 3^2} = \sqrt{29} and put 2929 on the right side. The sphere touches the floor z=0z = 0, not the corner (0,0,0)(0, 0, 0).)
radius=3,radius2=9\displaystyle \dist{\text{radius} = 3}, \qquad \dist{\text{radius}^2 = 9}
Write the squared distance from (−2,4,3)(-2, 4, 3) equal to radius2\dist{\text{radius}^2}Set each parenthesis so it becomes zero at (−2,4,3)(-2, 4, 3) and put 32=9\dist{3^2 = 9} on the right side (forgetting to flip the signs and to square the radius gives the wrong equation (x−2)2+(y+4)2+(z+3)2=3(x - 2)^2 + (y + 4)^2 + (z + 3)^2 = 3).
(x+2)2+(y−4)2+(z−3)2\displaystyle {\step{(x + 2)}}^2 + {\step{(y - 4)}}^2 + {\step{(z - 3)}}^2 =9\displaystyle = \dist{9}
4

Find the center and radius of the sphere x2+y2+z2+8x−2y−6z=−10x^2 + y^2 + z^2 + 8x - 2y - 6z = -10.

Group the xx, yy, and zz terms: what number completes each square on the left, and what do you get when you add those same three numbers to −10-10 on the right?

Group by coordinate, take half of each middle number, and add its square to both sidesHalf of 88, −2-2, and −6-6 are 44, −1-1, and −3-3, so add their squares 16\complete{16}, 1\complete{1}, and 9\complete{9} to both sides. (The most common mistake is completing the squares on the left while forgetting to add 16+1+9=26\complete{16} + \complete{1} + \complete{9} = 26 to the right side, leaving −10-10 on the right.)
(x2+8x+16)+(y2−2y+1)+(z2−6z+9)\displaystyle (x^2 + 8x + \complete{16}) + (y^2 - 2y + \complete{1}) + (z^2 - 6z + \complete{9}) =−10+16+1+9\displaystyle = -10 + \complete{16} + \complete{1} + \complete{9}
Factor each square and find the center and radiusFind the values that make each parenthesis zero and take the square root of the right side (don't copy the signs inside the parentheses to get (4,−1,−3)(4, -1, -3) or forget the square root and write the radius as 1616).
(x+4)2+(y−1)2+(z−3)2\displaystyle {\step{(x + 4)}}^2 + {\step{(y - 1)}}^2 + {\step{(z - 3)}}^2 =16\displaystyle = \dist{16}
Center: (−4,1,3),Radius: 4\displaystyle \text{Center: } (-4, 1, 3), \qquad \text{Radius: } \dist{4}
5

The sphere (x−2)2+(y+1)2+(z−4)2=9{\step{(x - 2)}}^2 + {\step{(y + 1)}}^2 + {\step{(z - 4)}}^2 = \dist{9} is sliced by the plane y=1y = 1 and by the floor z=0z = 0. Describe the intersection with each plane, giving the center and radius if it is a circle.

Plug y=1y = 1 into the sphere equation and move the resulting number to the right side; then start over and plug z=0z = 0 into the sphere equation.

Substitute y=1y = 1 to find the slice on the plane y=1y = 1Plug y=1y = 1 into the sphere equation and subtract (1+1)2=4{\step{(1 + 1)}}^2 = 4 from both sides. (Be careful not to just drop the yy term when slicing and leave =9= 9 with radius 33, or to keep the sphere's y=−1y = -1 in the circle's center instead of the plane's y=1y = 1.)
(x−2)2+(1+1)2+(z−4)2=9(x−2)2+4+(z−4)2=9(x−2)2+(z−4)2=5,y=1\displaystyle \begin{aligned} &{\step{(x - 2)}}^2 + {\step{(1 + 1)}}^2 + {\step{(z - 4)}}^2 = \dist{9} \\ &{\step{(x - 2)}}^2 + 4 + {\step{(z - 4)}}^2 = \dist{9} \\ &{\step{(x - 2)}}^2 + {\step{(z - 4)}}^2 = \slice{5}, \quad y = 1 \end{aligned}
Substitute z=0z = 0 to test the floor slicePlug z=0z = 0 into the sphere equation and subtract (0−4)2=16{\step{(0 - 4)}}^2 = 16 from both sides. (A common mistake is seeing z=0z = 0 and crossing out (z−4)2{\step{(z - 4)}}^2 completely to get (x−2)2+(y+1)2=9(x - 2)^2 + (y + 1)^2 = 9 with radius 33, instead of calculating (0−4)2=16{\step{(0 - 4)}}^2 = 16.)
(x−2)2+(y+1)2+(0−4)2=9(x−2)2+(y+1)2+16=9(x−2)2+(y+1)2=−7\displaystyle \begin{aligned} &{\step{(x - 2)}}^2 + {\step{(y + 1)}}^2 + {\step{(0 - 4)}}^2 = \dist{9} \\ &{\step{(x - 2)}}^2 + {\step{(y + 1)}}^2 + 16 = \dist{9} \\ &{\step{(x - 2)}}^2 + {\step{(y + 1)}}^2 = \slice{-7} \end{aligned}
The plane y=1y = 1 slices the sphere in a circle with equation (x−2)2+(z−4)2=5,  y=1{\step{(x - 2)}}^2 + {\step{(z - 4)}}^2 = \slice{5},\; y = 1, centered at (2,1,4)(2, 1, 4) with radius 5\slice{\sqrt{5}}. The floor z=0z = 0 misses the sphere completely because plugging in z=0z = 0 gives (x−2)2+(y+1)2=−7{\step{(x - 2)}}^2 + {\step{(y + 1)}}^2 = \slice{-7}, which has no real solutions.
6

Describe in words the 3D region defined by (x−1)2+(y−2)2+(z−3)2<9\region{(x - 1)^2 + (y - 2)^2 +} \allowbreak \region{(z - 3)^2 < 9} and z≤3\region{z \le 3}.

Where does the horizontal plane z=3z = 3 pass through a sphere centered at (1,2,3)(1, 2, 3), and which boundary uses << versus ≤\le?

Locate the ball and its centerThe inequality (x−1)2+(y−2)2+(z−3)2<9\region{(x - 1)^2 + (y - 2)^2 +} \allowbreak \region{(z - 3)^2 < 9} describes the inside of the ball of radius 9=3\dist{\sqrt{9} = 3} centered at (1,2,3)(1, 2, 3), without its curved outer surface because the inequality is <9\region{< 9} rather than ≤9\region{\le 9}.
Cut the ball with the height condition z≤3\region{z \le 3}Because the sphere's center (1,2,3)(1, 2, 3) itself sits at height z=3z = 3, the plane z=3z = 3 slices straight through the middle of the sphere, and z≤3\region{z \le 3} keeps the bottom half along with the flat circular top face at z=3z = 3. (Don't treat the sphere as if it were centered at the origin where z=3z = 3 would only touch the top, and don't swap << and ≤\le to include the curved surface while leaving out the flat top.) The lower half of the solid ball of radius 3\dist{3} centered at (1,2,3)(1, 2, 3), including its flat circular top face at height z=3z = 3 but without its curved outer surface.
7

Write inequalities to describe the solid region in the first octant that lies between the planes z=1z = 1 and z=3z = 3, outside the sphere of radius 2\dist{2} centered at the origin, and inside or on the sphere of radius 5\dist{5} centered at the origin (including the coordinate planes and the planes z=1z = 1 and z=3z = 3).

Write the conditions for xx and yy to be zero or positive, the height range for zz, and a single combined inequality putting the distance squared x2+y2+z2\dist{x^2 + y^2 + z^2} between the two radii squared.

Keep xx, yy, and zz in the first octant between heights 11 and 33Being in the first octant with the coordinate planes included means x≥0\region{x \ge 0} and y≥0\region{y \ge 0}, while staying between the planes z=1z = 1 and z=3z = 3 narrows the height condition from z≥0\region{z \ge 0} to 1≤z≤3\region{1 \le z \le 3}.
x≥0,y≥0,1≤z≤3\displaystyle \region{x \ge 0}, \qquad \region{y \ge 0}, \qquad \region{1 \le z \le 3}
Bound the distance squared between the two spheresLying outside the sphere of radius 2\dist{2} without touching it means x2+y2+z2>22=4\region{x^2 + y^2 + z^2 > 2^2 = 4}, and lying inside or on the sphere of radius 5\dist{5} means x2+y2+z2≤52=25\region{x^2 + y^2 + z^2 \le 5^2 = 25}. (Watch out for forgetting to square the radii and writing 2<x2+y2+z2≤52 < x^2 + y^2 + z^2 \le 5, or using ≤\le on the inner sphere when "outside" leaves out the surface at radius 2\dist{2}.)
x≥0,y≥0,1≤z≤3,4<x2+y2+z2≤25\displaystyle \begin{aligned} &\region{x \ge 0}, \qquad \region{y \ge 0}, \qquad \region{1 \le z \le 3}, \\ &\region{4 < x^2 + y^2 + z^2 \le 25} \end{aligned}