← Back to calculus 3

3D Coordinate

3D world

In three-dimensional space, a point is determined by three variables:

(x,y,z).(x, y, z).

The coordinate axes give us three independent directions, so one number is no longer enough and two numbers are also not enough. We need all three coordinates to locate a point in 3D space.

Picking a Point in 3D

Point: (2, 1, 3)
Magnitude: 3.74
šŸ’” Tip: in vector mode, drag inside the graph to move the endpoint. Hold Shift while dragging to adjust z.

We use a right-handed 3D coordinate system.

  1. Point the index finger of your right hand along the positive xx-axis.
  2. Point the middle finger along the positive yy-axis.
  3. Then the thumb points along the positive zz-axis.

Equivalently, if you curl the fingers of your right hand from the xx-axis toward the yy-axis, your thumb gives the positive orientation of the zz-axis.


The definition of implicit function

An explicit function writes one variable directly in terms of another, such as

y=f(x).y = f(x).

A parametric function uses a parameter and writes both coordinates as functions of that parameter:

x=x(t),y=y(t).x = x(t), \quad y = y(t).

An implicit function describes a relationship by an equation involving both variables without solving for one variable explicitly:

F(x,y)=0.F(x,y) = 0.

The three viewpoints are often compared like this:

TypeFormExampleWhat it describes
Explicit functiony=f(x)y=f(x)y=x2y=x^2one output yy for each input xx
Implicit functionF(x,y)=0F(x,y)=0x2+y2āˆ’1=0x^2+y^2-1=0a relation or curve in the plane
Parametric functionx=x(t), y=y(t)x=x(t),\ y=y(t)x=cos⁔t, y=sin⁔tx=\cos t,\ y=\sin ta curve traced by a parameter

The circle is a simple example of an implicit curve:

x2+y2āˆ’1=0.x^2 + y^2 - 1 = 0.

Unit circle as an implicit curve


Distance in 3D

For two points

P1=(x1,y1,z1),P2=(x2,y2,z2),P_1 = (x_1, y_1, z_1), \quad P_2 = (x_2, y_2, z_2),

the distance is

d(P1,P2)=(x2āˆ’x1)2+(y2āˆ’y1)2+(z2āˆ’z1)2.d(P_1,P_2) = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2 + (z_2-z_1)^2}.

This formula comes from applying the Pythagorean theorem twice. First, the horizontal displacement in the xyxy-plane gives one right triangle. Then the vertical displacement in zz gives a second right triangle, and together they form a cuboid.

Distance Between Two Points in 3D

Point A: (1, 1, 1)
Point B: (4, 3, 5)
Distance AB: 5.39
šŸ’” Tip: in vector mode, drag inside the graph to move the endpoint. Hold Shift while dragging to adjust z.

For the two points above, the distance is

(4āˆ’1)2+(3āˆ’1)2+(5āˆ’1)2=9+4+16=29.\sqrt{(4-1)^2 + (3-1)^2 + (5-1)^2} = \sqrt{9 + 4 + 16} = \sqrt{29}.

Sphere in 3D

The general equation of a sphere in 3D is

(xāˆ’a)2+(yāˆ’b)2+(zāˆ’c)2=r2,(x-a)^2 + (y-b)^2 + (z-c)^2 = r^2,

where (a,b,c)(a,b,c) is the center and rr is the radius.

Now consider the equation

x2+y2+z2+4xāˆ’6y+2z+6=0.x^2 + y^2 + z^2 + 4x - 6y + 2z + 6 = 0.

We complete the squares:

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

Substituting these into the equation gives

(x+2)2+(yāˆ’3)2+(z+1)2āˆ’4āˆ’9āˆ’1+6=0,(x+2)^2 + (y-3)^2 + (z+1)^2 - 4 - 9 - 1 + 6 = 0,

so

(x+2)2+(yāˆ’3)2+(z+1)2=8.(x+2)^2 + (y-3)^2 + (z+1)^2 = 8.

Therefore this is a sphere with center

(āˆ’2,3,āˆ’1)(-2, 3, -1)

and radius

8=22.\sqrt{8} = 2\sqrt{2}.

Sphere from completing the square