Math 344: Calculus III
12.1 3D Coordinates
12.1.1 Plotting in 3D¶
When working in two-dimensional (2D) or three-dimensional (3D) spaces we use ordered pairs or ordered triples, respectively, to denote the location of a point in those spaces. You are familiar with the notation $(1,2)$ and $(-4,3)$ indicating points one unit to the right and two above the origin and four to left and three above the origin in 2D space.
In the image, we see that that the horizontal axis is labeled $x$ and the vertical axis $y$ which is the typical convention for 2D space.
For 3D space we use ordered triples to represent points, with the coordinates of those points given in the form $(x,y,z)$. The points $(2,3,1)$ and $(-1,-3,-2)$ are plotted as follows:
Here the points are plotting using an isometric angle. The viewing angle here is useful because a unit of travel in each of the $x$, $y$, and $z$ directions is visually equivalent. This is by no means the only choice of orientation for the axes, and in 3D there is not a clearcut standard orientation like there is in 2D. It is usual for the axes to be in this rough configuration with $x$ pointed at the viewer, $y$ to the right and $z$ upwards, but the precise viewing angle is not fixed. For instance, we may choose to have the $xy$-plane closer to being parallel with the floor (relative to the viewer) than in the isometric case
The reason we have difficulty here is that there are fundamental issues with using a two-dimensional medium, such a printed page or computer screen, to represent a three-dimensional idea. Do not allow yourself to be limited by this. It is important to look at these images and other representations of 3D objects that you are familiar with and begin to train yourself to visualize and rotate these objects in your mind. This will be extremely useful in both your studies for this course, and for other activities you might be involved in in the future such as computer aided drafting/design.
12.1.2 Coordinates¶
The points in the pictures above are plotted by interpreting the ordered pairs and ordered triples as coordinates in a rectangular coordinate system.
Points in these coordinate systems are described as $(x,y)$ or $(x,y,z)$, respectively. Where the $x$, $y$, and $z$ values represent the number of units moved in the direction of that axis. Like in 2D space with ordered pairs, each point in 3D space is represented by exactly one ordered triple $(x,y,z)$. The organization of the axes in the 3D system defines planes when we take each possible pair of the $x-$, $y-$, and $z-$axes. These $xy$-, $xz$-, and $yz$-planes (pictured right) each divide 3D space in half and serve as a useful reference point for many examples. Furthermore, these planes divide 3D space into eight octants, the analogue of the four quadrants in 2D space. The octant that tends to face towards the viewer in most examples is the octant where all of the coordinates are positive.
Three-dimensional space is defined mathematically as the Cartesian product of the real line $\mathbb{R}$ with itself three times. We use the symbol $\mathbb{R}^3 = \mathbb{R}\times\mathbb{R}\times\mathbb{R} = \left\{ (x,y,z)\ \vert\ x,y,z\in\mathbb{R} \right\}$ to denote 3D space. Two-dimensional space is $\mathbb{R}^2$ and in general this notation extends to any number of copies of the real line $\mathbb{R}^n$.
12.1.3 Plotting Functions in 2D and 3D¶
If you were told to plot the function $y = \frac{1}{8}x^2$ in a previous course, the procedure is pretty straightforward. You are familiar enough with that function to know that it is a parabola, and you would plot it over some subset of values, say $[-4,4]$, to show the shape of the curve.
However, the construction of this plot has many elements that were not explicitly mentioned. More formally, this is a function
$$ f:\,\mathbb{R}\rightarrow\mathbb{R} $$
given by $f(x) = y = \frac{1}{8}x^2$. The name of the function is $f$, its domain is the real numbers $\mathbb{R}$, its codomain is $\mathbb{R}$, and the assignment relation is $f(x) = \frac{1}{8}x^2$. All three elements of $f$ are required for it to be defined (or plotted) correctly. The domain is the set of all inputs for the function. The codomain is the "target set" of the function, that is the set that the function maps into. Previously, you may have referred to this as the "range" of a function, but that term is ambiguous as it may mean either the target set or the values actually achieved by the function ($[0,\infty)$ in the above example). Use codomain instead, it is less confusing. Lastly, the assignment relation $f(x)$ is the familiar formula for the function.
Typically, when a function is discussed, it is presented with just the formula. It is assumed that the reader will interpret this function as being defined on the largest possible domain where that formula is valid and that the codomain is implied by the formula. For instance,
$$ y = \sqrt{x} $$
would only be defined for $x\geq 0$ because taking the square root of a negative number produces a complex result.
What is not given by that formula is the domain and codomain. The most common way to consider that formula would be as a 2D graph with the $x$ values for the domain and the $y$ values as the codomain as seen on the left.We deal almost exclusively with real-valued objects in this course. Don't fret over an early mention of complex numbers.
However, there is nothing preventing us from interpreting this as a 3D plot. The $z$ value is not specified by the formula, so any possible value for $z$ is allowed so long as $y = \sqrt{x}$ is satisfied as seen in the right figure. At each $z$ value, the curve is exactly the graph of the square root.
As a simpler example, we can look at $y = 1$. In 2D, this is a line and in 3D this is a plane:
Be careful about the context of the graph. Make sure that you are interpreting the equation correctly. What you are plotting is called the locus of solutions to the equation in 2D or 3D. This is the collection of points that satisfy the equation, and could be a curve or surface depending on the circumstance. It is represented symbolically as either
$$\{ (x,1)\ \vert\ x\in\mathbb{R}\}\qquad\text{or}\qquad\{ (x,y)\in\mathbb{R}^2\ \vert\ y=1\}$$
in 2D or
$$\{ (x,1,z)\ \vert\ x,z\in\mathbb{R}\}\qquad\text{or}\qquad\{ (x,y,z)\in\mathbb{R}^3\ \vert\ y=1\}$$
in 3D.
Exercise 12.1.1¶
Sketch a plot of each of the following:
- $x^2 + y^2 = 1$ in $\mathbb{R}^2$
- $x^2 + y^2 = 1$ and $z = 1$ in $\mathbb{R}^3$
- $x^2 + y^2 = 1$ in $\mathbb{R}^3$
Check Your Work
The cylinder in 3D is a "true" cylinder of infinite height in both directions. For drawing the image it is necessary to truncate the surface. Also, only the surface on the sides of the cylinder are plotted; it is hollow and has no top or bottom. Imagine the circle in the middle plot being copied for every possible height $z$.12.1.4 Measuring Distance¶
We use the notation $P(x,y,z)$ for a point named $P$ with coordinates $(x,y,z)$. If we want to talk about the distance between two points $|P_1 P_2|$, we use a formula that should remind you of the Pythagorean theorem
Distance in 3D Space¶
$$ |P_1 P_2| = \sqrt{ (x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2} $$
To find the distance between two points, simply plug the coordinates into this formula. It does not matter which point is $P_1$ or $P_2$, since a distance measure is symmetric.
Exercise 12.1.2¶
Determine the distance between the points $P = (1,3,2)$ and $Q = (-3,2,-2)$.
Check Your Work
$$ |PQ| = \sqrt{(1-(-3))^2 + (3-2)^2 + (2-(-2))^2} = \sqrt{4^2 + 1 + 4^2} = \sqrt{33} $$
A sphere is the locus of points which are all equidistant from a single point, the center of the sphere. Using the distance formula, we can determine the equation for a sphere centered at $C(h,k,l)$ setting the distance between $C$ and an arbitrary point $P(x,y,z)$ equal to a fixed value $r$:
$$ |PC| = r = \sqrt{(x-h)^2 + (y-k)^2 + (z-l)^2} \quad \Rightarrow \quad (x-h)^2 + (y-k)^2 + (z-l)^2 = r^2 $$
Equation of a Sphere¶
The equation of a sphere of radius $r$ centered at point $(h,k,l)$ is given by $$ (x-h)^2 + (y-k)^2 + (z-l)^2 = r^2 $$
Exercise 12.1.3¶
Given the equation
$$ x^2 + 4x + y^2 - 2y + z^2 = -1 $$
determine the solution set and sketch its graph. ( Hint: Complete the square! )
Check Your Work
$$ \begin{align*} x^2 + 2\cdot\color{#0066CC}{2}x \color{#0066CC}{+2^2}\color{#CC0099}{-2^2} + y^2 - 2\cdot\color{#006666}{1}y \color{#006666}{+1^2} \color{#9900FF}{-1^2} + z^2 &= -1 \\ \\ x^2 + 2\cdot\color{#0066CC}{2}x \color{#0066CC}{+2^2} + y^2 - 2\cdot\color{#006666}{1}y \color{#006666}{+1^2} + z^2 &= -1 \color{#CC0099}{+2^2}\color{#9900FF}{+1^2}\\ \\ (x\color{#0066CC}{+2})^2 + (y\color{#006666}{-1})^2 + z^2 &= -1+4+1 \\ \\ (x+2)^2 + (y-1)^2 + z^2 &= 2^2 \end{align*}$$
After completing the square, the equation tells us that this is sphere of radius $2$ centered at $(-2,1,0)$.
Exercise 12.1.4¶
Given the equation
$$ x^2 + 4x + y^2 - 2y + z^2 = -10 $$
determine the solution set and sketch its graph.
Check Your Work
The left hand side is the same as before, so we have$$ \begin{align*} x^2 + 2\cdot\color{#0066CC}{2}x \color{#0066CC}{+2^2}\color{#CC0099}{-2^2} + y^2 - 2\cdot\color{#006666}{1}y \color{#006666}{+1^2} \color{#9900FF}{-1^2} + z^2 &= -10 \\ \\ x^2 + 2\cdot\color{#0066CC}{2}x \color{#0066CC}{+2^2} + y^2 - 2\cdot\color{#006666}{1}y \color{#006666}{+1^2} + z^2 &= -10 \color{#CC0099}{+2^2}\color{#9900FF}{+1^2}\\ \\ (x\color{#0066CC}{+2})^2 + (y\color{#006666}{-1})^2 + z^2 &= -10+4+1 \\ \\ (x+2)^2 + (y-1)^2 + z^2 &= -5 \end{align*}$$
Which has no solutions, since the left hand side must be a positive quantity and there is a negative value on the right hand side. Since there is no valid solution set, there is no graph to sketch.
12.1.5 Inequalities in 3D¶
The surfaces in the previous examples have been mostly 2D objects, they only have a surface and are not filled in. In particular, the sphere in Exercise 3 is hollow. This is because the solutions is expressed as
$$ (x+2)^2 + (y-1)^2 + z^2 = 4 $$
which is an equation. If we wanted a solid sphere, it would be necessary to use an inequality so include the interior points in the solution set
$$ (x+2)^2 + (y-1)^2 + z^2 \leq 4 $$
We can examine other types of solids by utilizing inequalities in different ways.
Exercise 12.1.5¶
Plot the solution set for
$$ 1 \leq (x+2)^2 + (y-1)^2 + z^2 \leq 4 \quad\text{and}\quad z\leq 0 $$
Check Your Work
Your use of this self-initiated mediated course material is subject to our Creative Commons License 4.0