Math Core

Lesson 1.1 · Vectors and 3D Space

Three-dimensional coordinates

Single-variable calculus lives in the plane, but most of the world is three-dimensional: a drone's position, the temperature at a point in a room, the surface of a lens. Everything in this course is built on one simple device, a coordinate system that attaches three numbers to every point in space. This lesson sets up that system and the two basic measurements, distance and midpoint, that you'll use constantly.

Three axes and the right-hand rule

Start with a point OO, the origin, and three mutually perpendicular number lines through it: the xx-axis, the yy-axis and the zz-axis. There are two mirror-image ways to arrange them, and mathematicians and physicists agree to use the right-handed one: point the fingers of your right hand along the positive xx-axis and curl them toward the positive yy-axis; your thumb then points along the positive zz-axis.

A point PP in space gets the ordered triple (a,b,c)(a, b, c) if you can reach it from the origin by moving aa units parallel to the xx-axis, then bb units parallel to the yy-axis, then cc units parallel to the zz-axis. The set of all such triples is written R3\mathbb{R}^3.

On paper we draw space with an oblique projection: the yy- and zz-axes are drawn at a right angle, and the xx-axis points diagonally down and to the left, "out of the page" toward you. The dashed path below shows how to locate the point (2,3,4)(2, 3, 4).

Locating P(2, 3, 4): move 2 units along x, 3 units parallel to y, then 4 units up. The point (2, 3, 0) directly below P is its projection onto the xy-plane.

Coordinate planes and octants

Each pair of axes spans a coordinate plane:

planecontainsequation
xyxy-planexx- and yy-axesz=0z = 0
yzyz-planeyy- and zz-axesx=0x = 0
xzxz-planexx- and zz-axesy=0y = 0

The three coordinate planes divide space into eight octants. The one where all three coordinates are positive is the first octant; the others are usually described by their sign patterns, such as "x<0x < 0, y>0y > 0, z<0z < 0."

Dropping a perpendicular from P(a,b,c)P(a, b, c) to a coordinate plane gives its projection onto that plane: (a,b,0)(a, b, 0) on the xyxy-plane, (0,b,c)(0, b, c) on the yzyz-plane, and (a,0,c)(a, 0, c) on the xzxz-plane.

Common mistake

An equation means different things in different dimensions. In R2\mathbb{R}^2, y=3y = 3 is a line. In R3\mathbb{R}^3, y=3y = 3 is the set of all points (x,3,z)(x, 3, z) with xx and zz free: a plane parallel to the xzxz-plane. Likewise x2+y2=1x^2 + y^2 = 1 is a circle in the plane but an infinite circular cylinder in space, because zz is unrestricted. Always ask which variables are missing.

Distance and midpoint

To find the distance between P1(x1,y1,z1)P_1(x_1, y_1, z_1) and P2(x2,y2,z2)P_2(x_2, y_2, z_2), build a box with P1P_1 and P2P_2 at opposite corners. Its edges have lengths ∣x2−x1∣|x_2 - x_1|, ∣y2−y1∣|y_2 - y_1| and ∣z2−z1∣|z_2 - z_1|. The Pythagorean theorem in the base gives the diagonal of the bottom face, (x2−x1)2+(y2−y1)2\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}, and applying it once more with the vertical edge gives the space diagonal.

Distance and midpoint in space

The distance between P1(x1,y1,z1)P_1(x_1, y_1, z_1) and P2(x2,y2,z2)P_2(x_2, y_2, z_2) is

∣P1P2∣=(x2−x1)2+(y2−y1)2+(z2−z1)2.|P_1P_2| = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}.

The midpoint of segment P1P2P_1P_2 is

M=(x1+x22, y1+y22, z1+z22).M = \left( \frac{x_1 + x_2}{2},\ \frac{y_1 + y_2}{2},\ \frac{z_1 + z_2}{2} \right).

Worked example: Distance and midpoint

Find the distance between P(1,−2,3)P(1, -2, 3) and Q(4,2,−9)Q(4, 2, -9), and the midpoint of PQ‾\overline{PQ}.

Solution. The coordinate differences are 33, 44 and −12-12, so

∣PQ∣=32+42+(−12)2=9+16+144=169=13.|PQ| = \sqrt{3^2 + 4^2 + (-12)^2} = \sqrt{9 + 16 + 144} = \sqrt{169} = 13.

The midpoint is (1+42,−2+22,3+(−9)2)=(52,0,−3)\left( \dfrac{1 + 4}{2}, \dfrac{-2 + 2}{2}, \dfrac{3 + (-9)}{2} \right) = \left( \dfrac52, 0, -3 \right).

Spheres

A sphere is the set of points at a fixed distance rr (the radius) from a fixed point C(h,k,l)C(h, k, l) (the center). Writing ∣PC∣=r|PC| = r with the distance formula and squaring gives its equation.

Definition

Sphere

The sphere with center (h,k,l)(h, k, l) and radius r>0r > 0 has equation

(x−h)2+(y−k)2+(z−l)2=r2.(x - h)^2 + (y - k)^2 + (z - l)^2 = r^2.

Expanding shows that every sphere has an equation of the form x2+y2+z2+Gx+Hy+Iz+J=0x^2 + y^2 + z^2 + Gx + Hy + Iz + J = 0. Going backward, you complete the square in each variable separately. The result (x−h)2+(y−k)2+(z−l)2=N(x-h)^2 + (y-k)^2 + (z-l)^2 = N is a sphere if N>0N > 0, a single point if N=0N = 0, and empty if N<0N < 0.

Worked example: Recognizing a sphere

Show that x2+y2+z2−4x+6y−2z−2=0x^2 + y^2 + z^2 - 4x + 6y - 2z - 2 = 0 is a sphere, and find its center and radius.

Solution. Group the terms by variable and complete each square:

(x2−4x+4)+(y2+6y+9)+(z2−2z+1)=2+4+9+1(x−2)2+(y+3)2+(z−1)2=16.\begin{aligned} (x^2 - 4x + 4) + (y^2 + 6y + 9) + (z^2 - 2z + 1) &= 2 + 4 + 9 + 1 \\ (x - 2)^2 + (y + 3)^2 + (z - 1)^2 &= 16. \end{aligned}

Since 16>016 > 0, this is a sphere with center (2,−3,1)(2, -3, 1) and radius 44.

Worked example: Describing a region

Describe the set of points satisfying 1≤x2+y2+z2≤41 \le x^2 + y^2 + z^2 \le 4 and z≥0z \ge 0.

Solution. The quantity x2+y2+z2\sqrt{x^2 + y^2 + z^2} is the distance from (x,y,z)(x, y, z) to the origin, so the first condition says that distance is between 11 and 22. That is the solid shell between the spheres of radius 11 and 22 centered at the origin. The condition z≥0z \ge 0 keeps only the part on or above the xyxy-plane. The region is the upper half of a thick spherical shell, like half of a hollow ball with walls 11 unit thick.

Tip

The distance from P(a,b,c)P(a, b, c) to a coordinate plane is just the absolute value of the missing coordinate: the distance to the xyxy-plane is ∣c∣|c|. The distance to a coordinate axis uses the other two coordinates: the distance to the zz-axis is a2+b2\sqrt{a^2 + b^2}, since the nearest point on that axis is (0,0,c)(0, 0, c).

Practice

Practice 1

Find the distance between (3,−1,2)(3, -1, 2) and (−1,1,6)(-1, 1, 6).

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

Practice 2

Find the projection of the point (4,−5,7)(4, -5, 7) onto the xzxz-plane.

Enter a point like (2, -3)

Practice 3

Find the midpoint of the segment joining (−3,4,1)(-3, 4, 1) and (5,−2,8)(5, -2, 8).

Enter a point like (2, -3)

Practice 4

Find the distance from the point (2,−6,5)(2, -6, 5) to the zz-axis.

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

Practice 5

Find the center of the sphere x2+y2+z2+8x−2y+4z+5=0x^2 + y^2 + z^2 + 8x - 2y + 4z + 5 = 0.

Enter a point like (2, -3)

Practice 6

A sphere has a diameter with endpoints A(2,1,−3)A(2, 1, -3) and B(6,−5,1)B(6, -5, 1). Its equation is (x−4)2+(y+2)2+(z+1)2=r2(x - 4)^2 + (y + 2)^2 + (z + 1)^2 = r^2. Find r2r^2.

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

Practice 7

Which set does the equation x2+z2=9x^2 + z^2 = 9 describe in R3\mathbb{R}^3?

Practice 8

The points A(3,−2,1)A(3, -2, 1), B(5,0,2)B(5, 0, 2) and C(4,−4,3)C(4, -4, 3) form a triangle. Which describes it?