# Calculus/Curves and Surfaces in Space

 ← Vectors Calculus Multivariable calculus → Curves and Surfaces in Space

For many practical applications you have to work with the mathematical descriptions of lines, planes, curves, and surfaces in 3-dimensional space. This requires some knowledge on vectors and the ability to construct 3-dimensional graphs without using calculators.

## Lines in 3-dimensional space

Although the equation for lines is discussed in previous chapters (see Chapter 7.1), this chapter will explain more in detail about the properties and important aspects of lines, as well as the expansion into general curves in 3-dimensional space.

### Review of parametric equations

Recall in Chapter 5.1, parametric equations use a different variable to express the relation between two variables. For example, look at the following equation of a circle:

${\displaystyle x^{2}+y^{2}=1}$

If we express variables ${\displaystyle x}$ and ${\displaystyle y}$ with a new variable ${\displaystyle t}$, and we know that ${\displaystyle \cos ^{2}t+\sin ^{2}t=1}$, we can rewrite the original equation into:

${\displaystyle x=\cos t}$

${\displaystyle y=\sin t}$

The equation above is the parametric form of a circle with a radius of ${\displaystyle 1}$.

Now, let's talk about lines in 3-dimensional space.

### Equations for lines in 3-dimensional space

A line in space is defined by two points in space, which I will call ${\displaystyle P_{1}}$ and ${\displaystyle P_{2}}$. Let ${\displaystyle \mathbf {r} _{0}}$ be the vector from the origin to ${\displaystyle P_{1}}$, and ${\displaystyle \mathbf {r} _{2}}$ the vector from the origin to ${\displaystyle P_{2}}$. Given these two points, every other point ${\displaystyle P}$ on the line can be reached by

${\displaystyle \mathbf {r} =\mathbf {r} _{0}+\mathbf {v} t}$

where ${\displaystyle \mathbf {v} }$ is the vector from ${\displaystyle P_{1}}$ and ${\displaystyle P_{2}}$:

${\displaystyle \mathbf {v} =\mathbf {r} _{0}-\mathbf {r} _{2}}$

To intuitively understand the equation of a line, imagine that there is a line going through the end point of the vector ${\displaystyle \mathbf {r} _{0}}$ and stretches in the direction of the vector ${\displaystyle \mathbf {v} }$. Just view it as a vector version of the point-slope form. For example, assume there is a line in 3-dimensional space with the equation:

${\displaystyle \mathbf {r} =\langle 2,5,4\rangle +\langle 1,1,1\rangle t}$

We can graph the line by first finding the point ${\displaystyle (2,5,4)}$. Then, we stretch the line in the direction parallel with the vector ${\displaystyle \langle 1,1,1\rangle }$. The final graph is the graph of the line ${\displaystyle \mathbf {r} =\langle 2,5,4\rangle +\langle 1,1,1\rangle t}$. Sometimes the direction vector ${\displaystyle \mathbf {v} }$ is unknown. However, it can be easily solved by finding another point on the line. In this case, the point ${\displaystyle (5,8,7)}$ is on the line. By calculating the vector between the two points, we can find out that the direction vector is ${\displaystyle \langle 3,3,3\rangle }$. Thus, the equation for the line can be written as

${\displaystyle \mathbf {r} =\langle 2,5,4\rangle +\langle 3,3,3\rangle t_{1}}$

which is equivalent with the original equation ${\displaystyle \mathbf {r} =\langle 2,5,4\rangle +\langle 1,1,1\rangle t}$ because if we let ${\displaystyle t=3t_{1}}$, the original equation will turn into the equation above. Therefore, there are infinitely many ways to write an equation of a line in 3-dimensional space using the vector form. Now, there is a parametric form of expressing a line. Recall that there is another way to write down vectors: ${\displaystyle a\mathbf {i} +b\mathbf {j} +c\mathbf {k} }$. So, we can rewrite the original equation ${\displaystyle \mathbf {r} =\langle 2,5,4\rangle +\langle 1,1,1\rangle t}$ into:

${\displaystyle \mathbf {r} =\langle 2+t,5+t,4+t\rangle =(2+t)\mathbf {i} +(5+t)\mathbf {j} +(4+t)\mathbf {k} }$

Then, we assign the respective parts to the corresponding ${\displaystyle x,y,z}$ axes

${\displaystyle x=2+t}$

${\displaystyle y=5+t}$

${\displaystyle z=4+t}$

This is the parametric form of the equation for lines.

The final common way to notate lines is the symmetric equations, which is just another slight transformation from the parametric form:

${\displaystyle x-2=y-5=z-4}$

To summarize, there are basically three ways to write the equation for a line that passes through the point ${\displaystyle (x_{0},y_{0},z_{0})}$ with the direction ${\displaystyle \langle a,b,c\rangle }$.

Vector Equation Parametric Equations Symmetric Equations
${\displaystyle \mathbf {r} =\langle x_{0},y_{0},z_{0}\rangle +\langle a,b,c\rangle t}$
${\displaystyle x=x_{0}+at}$

${\displaystyle y=y_{0}+bt}$

${\displaystyle z=z_{0}+ct}$

${\displaystyle {\frac {x-x_{0}}{a}}={\frac {y-y_{0}}{b}}={\frac {z-z_{0}}{c}}}$

### Relations between two lines

There are lines which intersect each other and those which do not. There can be parallel, perpendicular, and skew lines, which will be discussed in this part.

Intersection

Assume there are two lines with the equations:

${\displaystyle L_{1}:\langle 2,5,4\rangle +\langle 1,1,1\rangle t}$ or in parametric form ${\displaystyle L_{1}:{\begin{cases}x=2+t\\y=5+t\\z=4+t\end{cases}}}$

${\displaystyle L_{2}:\langle 5,-1,0\rangle +\langle -{\frac {1}{2}},4,3\rangle s}$ or in parametric form ${\displaystyle L_{2}:{\begin{cases}x=5-{\frac {1}{2}}s\\y=-1+4s\\z=3s\end{cases}}}$

To find out if they intersect or not, we just need to solve the system of equations

${\displaystyle {\begin{cases}2+t=5-{\frac {1}{2}}s\\5+t=-1+4s\\4+t=3s\end{cases}}}$

If the system of equations has only one solution, then the two lines intersect at one point. If the system of equations has infinitely many solutions, then the two lines are the same. If the system of equations does not have a solution, then the two lines do not intersect at all. In this case, there is a solution:

${\displaystyle {\begin{cases}t=2\\s=2\end{cases}}}$

Thus the two lines intersect at point ${\displaystyle (4,7,6)}$. If we want to further know the angle between the two lines, we can apply the dot product formula. The angle between the two lines should be:

${\displaystyle \theta =\arccos({\frac {\mathbf {v_{1}} \,\cdot \,\mathbf {v_{2}} }{\|\mathbf {v_{1}} \|\|\mathbf {v_{2}} \|}})}$

Parallel

To spot two parallel lines in 3-dimensional space, we just need to look at the direction vector ${\displaystyle \mathbf {v} }$. If the direction vectors of the two lines ${\displaystyle \mathbf {v_{1}} ,\mathbf {v_{2}} }$ have such relationship that ${\displaystyle \mathbf {v_{2}} =k\mathbf {v_{1}} ,k\in \mathbb {R} }$, then the two lines are parallel with each other. For example, the two lines ${\displaystyle L_{1}:\langle 2,5,4\rangle +\langle 1,1,1\rangle t}$ and ${\displaystyle L_{2}:\langle 5,-1,0\rangle +\langle -3,-3,-3\rangle s}$ are parallel with each other because ${\displaystyle {\frac {\langle -3,-3,-3\rangle }{-3}}=\langle 1,1,1\rangle }$.

Perpendicular

To have two lines perpendicular with each other, those two lines must intersect first. If they do intersect, recall the dot product of vectors. The dot product states that:

${\displaystyle \mathbf {a} \,\cdot \,\mathbf {b} =\|\mathbf {a} \|\|\mathbf {b} \|\cos \theta }$

If two lines are perpendicular with each other, ${\displaystyle \theta ={\frac {\pi }{2}}}$, which results in ${\displaystyle \mathbf {a} \,\cdot \,\mathbf {b} =\|\mathbf {a} \|\|\mathbf {b} \|\cos {\frac {\pi }{2}}=0}$.

So, if we continue this flow of thought, we can find that if we choose two vectors on each line, have a dot product between them, and the result is zero, then we can safely say that the two lines are perpendicular with each other. However, there is a more convenient way to simplify the process. Instead of finding two vectors on each line, we just need to apply the dot product on the two direction vectors because the direction vectors are calculated from points on the respective lines.

So if we have two lines:

${\displaystyle L_{1}:\langle 2,5,4\rangle +\langle 1,1,1\rangle t}$ and ${\displaystyle L_{2}:\langle 6,6,5\rangle +\langle -2,1,1\rangle s}$

They are perpendicular with each other because

${\displaystyle {\begin{cases}2+t=6-2s\\5+t=6+s\\4+t=5+s\end{cases}}}$ has one and only solution: ${\displaystyle {\begin{cases}t=2\\s=1\end{cases}}}$, which means they intersect. And ${\displaystyle \langle 1,1,1\rangle \,\cdot \,\langle -2,1,1\rangle =0}$

Thus ending the proof.

Skew lines

Skew lines are lines that do not intersect and are not parallel with each other. For example, lines ${\displaystyle L_{1}:\langle 2,5,4\rangle +\langle 1,1,1\rangle t}$ and ${\displaystyle L_{2}:\langle 5,-1,0\rangle +\langle 3,-3,-3\rangle s}$ are skew lines.

Distance between two skew lines

To solve this problem, we need to know more about planes in 3-dimensional space, which will be discussed below.

## Planes in 3-dimensional space

### Introduction

The same idea can be used to describe a plane in 3-dimensional space, which is uniquely defined by three points (which do not lie on a line) in space (${\displaystyle P_{1},P_{2},P_{3}}$). Let ${\displaystyle \mathbf {x} _{i}}$ be the vectors from the origin to ${\displaystyle P_{i}}$. Then

${\displaystyle \mathbf {x} =\mathbf {x} _{1}+\lambda \mathbf {a} +\mu \mathbf {b} }$

with:

${\displaystyle \mathbf {a} =\mathbf {x} _{2}-\mathbf {x} _{1}\,\,{\text{and}}\,\,\mathbf {b} =\mathbf {x} _{3}-\mathbf {x} _{1}}$

Note that the starting point does not have to be ${\displaystyle \mathbf {x} _{1}}$, but can be any point in the plane. Similarly, the only requirement on the vectors ${\displaystyle \mathbf {a} }$ and ${\displaystyle \mathbf {b} }$ is that they have to be two non-collinear vectors in our plane.

Recall that in 2-dimensional vectors, if there are two vectors ${\displaystyle \mathbf {i} ,\mathbf {j} }$, any vector on the Cartesian plane can be expressed in terms of the vectors ${\displaystyle \mathbf {i} ,\mathbf {j} }$ by ${\displaystyle a\mathbf {i} +b\mathbf {j} \quad (a,b\in \mathbb {R} )}$. Using the same method, we can deduce that

the ${\displaystyle \lambda \mathbf {a} +\mu \mathbf {b} }$ part tells us that the graph should be a plane, and the ${\displaystyle \mathbf {x} -\mathbf {x} _{1}}$ part describes the "slope" and the axes intersections

However, there two other ways to express a plane in 3-dimensional space: the vector equation and the scalar equation.

### Vector and scalar equations for planes

The vector equation for planes requires us to understand the power of the dot product. We already knew that when the dot product of two vectors is zero, the two vectors should be perpendicular with each other. Now, imagine a vector ${\displaystyle \mathbf {n} }$ in 3-dimensional space. If we graph out all the vectors ${\displaystyle \Delta \mathbf {r} }$ that are perpendicular with ${\displaystyle \mathbf {n} }$, what will the result be?

The result should be a plane with a vector perpendicular with the plane. Thus, the vector equation for planes is simply ${\displaystyle \mathbf {n} \,\cdot \,\Delta \mathbf {r} =0}$.

the vector ${\displaystyle \mathbf {n} }$ is the normal vector, which is perpendicular with the plane

the vector ${\displaystyle \Delta \mathbf {r} =\mathbf {r} -\mathbf {r_{0}} }$ is the variable vector where ${\displaystyle \mathbf {r} =\langle x,y,z\rangle }$ (unknown points on the plane) and ${\displaystyle \mathbf {r_{0}} =\langle x_{0},y_{0},z_{0}\rangle }$ (a given point on the plane). This expressions simply means all the vectors on the plane.

Of course, the vector equation for planes can be rewritten as ${\displaystyle \mathbf {n} \,\cdot \,(\mathbf {r} -\mathbf {r_{0}} )=0}$ or ${\displaystyle \mathbf {n} \,\cdot \,\mathbf {r} =\mathbf {n} \,\cdot \,\mathbf {r_{0}} }$, depending on the writer.

To find out the scalar equation, we just need to calculate the dot product and do some simplifications. So, let's assume that

${\displaystyle \mathbf {n} =\langle a,b,c\rangle }$, ${\displaystyle \mathbf {r} =\langle x,y,z\rangle }$, and ${\displaystyle \mathbf {r_{0}} =\langle x_{0},y_{0},z_{0}\rangle }$ According to the vector equation

${\displaystyle \mathbf {n} \,\cdot \,(\mathbf {r} -\mathbf {r_{0}} )=0}$

Thus, we have

${\displaystyle \langle a,b,c\rangle \,\cdot \,\langle x-x_{0},y-y_{0},z-z_{0}\rangle =0}$

After some algebraic manipulations, we can get

${\displaystyle ax+by+cz-(ax_{0}+by_{0}+cz_{0})=0}$

Since the ${\displaystyle ax_{0}+by_{0}+cz_{0}}$ is a constant, we just let ${\displaystyle ax_{0}+by_{0}+cz_{0}=-d}$. As a result, the scalar equation for planes is ${\displaystyle ax+by+cz+d=0}$

Note that the constants ${\displaystyle a,b,c}$ are the same as the ${\displaystyle \mathbf {i} ,\mathbf {j} ,\mathbf {k} }$ components of the normal vector. This property will be extremely useful when discussing the relations between two planes. Also, ${\displaystyle -d=\mathbf {n} \,\cdot \,\mathbf {r_{0}} }$.

${\displaystyle \blacksquare }$

To summarize, there are three ways to notate a plane in 3-dimensional space, with the latter two more commonly used:

Expansion from the equation for lines Vector equation Scalar equation
${\displaystyle \mathbf {x} =\mathbf {x} _{1}+\lambda \mathbf {a} +\mu \mathbf {b} }$ ${\displaystyle \mathbf {n} \,\cdot \,(\mathbf {r} -\mathbf {r_{0}} )=0}$ ${\displaystyle ax+by+cz+d=0}$

### Relations between two planes

Parallel

The normal vector is important because it determined the how the plane is shaped. So when we are discussing the relations between two planes, we are actually trying to find out the connections between the normal vectors of the two planes. In this case, assume there are two planes in the 3-dimensional space: ${\displaystyle a_{1}x+b_{1}y+c_{1}z+d_{1}=0}$ and ${\displaystyle a_{2}x+b_{2}y+c_{2}z+d_{2}=0}$. The normal vectors for the planes should be:

${\displaystyle \mathbf {n_{1}} =\langle a_{1},b_{1},c_{1}\rangle ,\,\mathbf {n_{2}} =\langle a_{2},b_{2},c_{2}\rangle }$

Since normal vectors are perpendicular with their corresponding planes, if the normal vectors are parallel with each other, the respective planes should also be parallel with each other. Thus,

If ${\displaystyle \mathbf {n_{1}} =k\mathbf {n_{2}} \quad (k\in \mathbb {R} )}$, then ${\displaystyle a_{1}x+b_{1}y+c_{1}z+d_{1}=0}$ and ${\displaystyle a_{2}x+b_{2}y+c_{2}z+d_{2}=0}$ are parallel with each other.

Perpendicular

If the normal vectors are perpendicular with each other, the respective planes will be perpendicular. In other words, if ${\displaystyle \mathbf {n_{1}} \perp \mathbf {n_{2}} }$, then the planes are perpendicular with each other.

Intersection

To fully understand how to find the intersection between two lines, we should be familiar with the normal vector and its potential. If the two planes are not parallel and are not basically the same plane, then they must intersect with each other. The intersection should form a line. Imagine there are two planes ${\displaystyle a_{1}x+b_{1}y+c_{1}z+d_{1}=0}$ and ${\displaystyle a_{2}x+b_{2}y+c_{2}z+d_{2}=0}$, and their respective normal vectors ${\displaystyle \mathbf {n_{1}} \neq k\mathbf {n_{2}} \quad (k\in \mathbb {R} )}$ (which means they are not parallel).

Because normal vectors are perfectly perpendicular to all vectors on the plane, the opposite is also true: all vectors on the plane are perpendicular to their respective normal vectors. This is why ${\displaystyle \mathbf {n} \,\cdot \,(\mathbf {r} -\mathbf {r_{0}} )=0}$ is the vector equation of the plane. Since the intersection of the two planes is a line, we can say that the direction vector ${\displaystyle \mathbf {v} }$ should be on both planes.

Because ${\displaystyle \mathbf {v} }$ is on both planes, ${\displaystyle \mathbf {v} }$ should be perpendicular with both normal vectors

${\displaystyle \mathbf {v} \perp \mathbf {n_{1}} ,\,\mathbf {v} \perp \mathbf {n_{2}} }$

Recall that the cross product of two vectors will result in a new vector that is perpendicular with both the original vectors. We can calculate the cross product of ${\displaystyle \mathbf {n_{1}} ,\mathbf {n_{2}} }$ to create ${\displaystyle \mathbf {v} }$.

${\displaystyle \mathbf {n_{1}} \times \mathbf {n_{2}} ={\begin{vmatrix}\mathbf {i} &\mathbf {j} &\mathbf {k} \\a_{1}&b_{1}&c_{1}\\a_{2}&b_{2}&c_{2}\end{vmatrix}}=(b_{1}c_{2}-b_{2}c_{1})\mathbf {i} -(a_{1}c_{2}-a_{2}c_{1})\mathbf {j} +(a_{1}b_{2}-a_{2}b_{1})\mathbf {k} }$

So the direction vector for the line is ${\displaystyle \mathbf {v} =\mathbf {n_{1}} \times \mathbf {n_{2}} =\langle b_{1}c_{2}-b_{2}c_{1},a_{1}c_{2}-a_{2}c_{1},a_{1}b_{2}-a_{2}b_{1}\rangle }$

We still need to know a point on the line to finish the equation because ${\displaystyle \mathbf {r} =\mathbf {r} _{0}+\mathbf {v} t}$. To find a point, simply let ${\displaystyle z=0}$ and solve for ${\displaystyle x,y}$ in the following system of equations

${\displaystyle {\begin{cases}a_{1}x+b_{1}y+d_{1}=0\\a_{2}x+b_{2}y+d_{2}=0\end{cases}}\Rightarrow {\begin{cases}x={\frac {b_{1}d_{2}-b_{2}d_{1}}{a_{1}b_{2}-a_{2}b_{1}}}\\y={\frac {a_{1}d_{2}-a_{2}d_{1}}{a_{2}b_{1}-a_{1}b_{2}}}\end{cases}}}$

Because the solution is too complicated to write down, we will let ${\displaystyle x={\frac {b_{1}d_{2}-b_{2}d_{1}}{a_{1}b_{2}-a_{2}b_{1}}}=x_{0}}$ and ${\displaystyle y={\frac {a_{1}d_{2}-a_{2}d_{1}}{a_{2}b_{1}-a_{1}b_{2}}}=y_{0}}$. Thus, the point ${\displaystyle (x_{0},y_{0},0)}$ is on both planes (recall that we let ${\displaystyle z=0}$) and ${\displaystyle \mathbf {P_{0}} =\langle x_{0},y_{0},0\rangle }$.

Now, we know a point on the line ${\displaystyle (x_{0},y_{0},0)}$ and the direction vector ${\displaystyle \mathbf {v} =\mathbf {n_{1}} \times \mathbf {n_{2}} =\langle b_{1}c_{2}-b_{2}c_{1},a_{1}c_{2}-a_{2}c_{1},a_{1}b_{2}-a_{2}b_{1}\rangle }$, the intersection between the two planes is: ${\displaystyle L:\langle {\frac {b_{1}d_{2}-b_{2}d_{1}}{a_{1}b_{2}-a_{2}b_{1}}},{\frac {a_{1}d_{2}-a_{2}d_{1}}{a_{2}b_{1}-a_{1}b_{2}}},0\rangle +\langle b_{1}c_{2}-b_{2}c_{1},a_{1}c_{2}-a_{2}c_{1},a_{1}b_{2}-a_{2}b_{1}\rangle t}$

For those who prefer a cleaner expression:

${\displaystyle L:\langle x_{0},y_{0},0\rangle +\langle b_{1}c_{2}-b_{2}c_{1},a_{1}c_{2}-a_{2}c_{1},a_{1}b_{2}-a_{2}b_{1}\rangle t}$

${\displaystyle L:\mathbf {P_{0}} +(\mathbf {n_{1}} \times \mathbf {n_{2}} )t}$

And if we want to know the angle between the planes, similar to how we find out the angle between two lines, we apply the dot product:

${\displaystyle \theta =\arccos({\frac {\mathbf {n_{1}} \,\cdot \,\mathbf {n_{2}} }{\|\mathbf {n_{1}} \|\|\mathbf {n_{2}} \|}})}$

${\displaystyle \blacksquare }$

Distance between two parallel planes

The distance between two non-parallel planes is zero because they intersect. So, we should focus on the distance between parallel planes. Before we do that, it will be more convenient if we know the distance from a point to a plane.

Let the distance be ${\displaystyle D}$, the point be ${\displaystyle P=(x_{1},y_{1},z_{1})}$, the plane be ${\displaystyle ax+by+cz+d=0}$.

Knowing the equation for the plane can help us know the normal vector, since the normal vector is perpendicular to the plane, the exact direction we need. ${\displaystyle \mathbf {n} =\langle a,b,c\rangle }$.

Now, we start solving. First, assume there is point ${\displaystyle P_{0}=(x_{0},y_{0},z_{0})}$ on the plane ${\displaystyle ax+by+cz+d=0}$. Then, we create a vector from ${\displaystyle P_{0}}$ to ${\displaystyle P}$: ${\displaystyle {\overrightarrow {P_{0}P}}=\langle x_{1}-x_{0},y_{1}-y_{0},z_{1}-z_{0}\rangle }$. We will also let the angle between vectors ${\displaystyle {\overrightarrow {P_{0}P}}}$ and ${\displaystyle \mathbf {n} }$ be ${\displaystyle \theta }$. If we graph out what it looks like, we can easily understand how the distance is deduced.

${\displaystyle D=|\|{\overrightarrow {P_{0}P}}\|\ \cos \theta |}$ (the absolute value is needed because the distance should always be larger than zero)

However, we do not know ${\displaystyle \theta }$. We can calculate ${\displaystyle \theta }$ by applying the dot product. But, there is a simpler way:

Using some very interesting manipulation, we can get

${\displaystyle D={\frac {|\|\mathbf {n} \|\|{\overrightarrow {P_{0}P}}\|\cos \theta |}{\|\mathbf {n} \|}}}$

As we can see, the nominator is actually the other way of expressing the dot product of two vectors. So, we can stop worrying about not knowing the value of ${\displaystyle \theta }$.

${\displaystyle D={\frac {|\mathbf {n} \ \cdot \ {\overrightarrow {P_{0}P}}|}{\|\mathbf {n} \|}}}$

We can now substitute those vectors with their coordinates. After some algebra, we get

${\displaystyle D={\frac {|\mathbf {n} \ \cdot \ {\overrightarrow {P_{0}P}}|}{\|\mathbf {n} \|}}={\frac {|ax_{1}+by_{1}+cz_{1}-(ax_{0}+by_{0}+cz_{0})|}{\sqrt {a^{2}+b^{2}+c^{2}}}}}$

Since ${\displaystyle P_{0}=(x_{0},y_{0},z_{0})}$ is on the plane, ${\displaystyle ax_{0}+by_{0}+cz_{0}=-d}$. We can further simplify the formula into ${\displaystyle D={\frac {|ax_{1}+by_{1}+cz_{1}+d|}{\sqrt {a^{2}+b^{2}+c^{2}}}}}$, thus finishing our deduction.

There are other ways to write down the formula. For people who prefer simpler notations, the following formulae are also ways to express the distance:

${\displaystyle D={\frac {|\mathbf {n} \ \cdot \ {\overrightarrow {P_{0}P}}|}{\|\mathbf {n} \|}}}$ or ${\displaystyle D=\mathrm {comp} _{\mathbf {n} }{\overrightarrow {P_{0}P}}}$

${\displaystyle \blacksquare }$

After we do some further "investigation" on the distance formula, we can find that only the equation of the plane and one point are needed to calculate the distance between them, which is very convenient because the fewer things we need to solve a problem, the more convenient the problem is. When we try to find the distance between two parallel planes, we just need one point on one plane and the equation for the other plane to solve.

Distance between two skew lines (continue)

Assume that lines ${\displaystyle L_{1},L_{2}}$ are skew lines, we can calculate the distance by assuming that those lines belong in two parallel planes ${\displaystyle P_{1},P_{2}}$ respectively. Then, the problem changes from solving the distance between two skew lines to solving the distance between two parallel planes.

We still need to know the normal vector of both planes. We can simply apply the cross product on the two direction vectors of both lines: ${\displaystyle \mathbf {n} =\mathbf {v_{1}} \times \mathbf {v_{2}} }$. ${\displaystyle \mathbf {n} \neq 0}$ because ${\displaystyle \mathbf {v_{1}} ,\mathbf {v_{2}} }$ are not pointing towards the same direction. Now we can apply the newly deduced distance formula on the two skew lines.

This section of the chapter requires some understanding of conic sections (see Chapter 1.6).

### Cylinders

A cylinder is a surface that consists of all lines that are parallel to a given line and pass through a given plane curve. There are several special cylinders such as the parabolic cylinder and the circular cylinder. For example, the image on the right is a parabolic cylinder. Parabolic cylinder typically has an equation of:

${\displaystyle z=x^{2}}$ etc.

If we want to move the cylinder around without rotating it, we can have the equation:

${\displaystyle z-k=(x-h)^{2}}$, where ${\displaystyle h,k}$ are constants.

It is just like the parabola we have discussed early in Chapter 1.6 but with a new dimension. Circular cylinders, similar to how we derive the parabolic cylinder, looks just like a cylinder with a circle as its "base", with an equation of:

${\displaystyle x^{2}+y^{2}=1}$ etc.

If we want to make the circular cylinder more "elliptic", just like how we derive the equation for an ellipse, the elliptic cylinder has an equation of:

${\displaystyle {\frac {x^{2}}{a^{2}}}+{\frac {y^{2}}{b^{2}}}=1}$, where ${\displaystyle a,b}$ are constants.

It is just like an ellipse on the ${\displaystyle xy}$-plane but infinitely stretched in the ${\displaystyle z}$ direction.

The general equation for quadric surfaces is:

${\displaystyle Ax^{2}+By^{2}+Cz^{2}+Dxy+Eyz+Fxz+Gx+Hy+Iz+J=0}$

where ${\displaystyle A,B,C,D,E,F,G,H,I,J}$ are constants.

It looks similar to the general equation for conic sections (${\displaystyle Ax^{2}+Bxy+Cy^{2}+Dx+Ey+F=0}$), except it has one more variable ${\displaystyle z}$. After some translations and rotations, we can simplify the general equation into the standard equations:

The standard equations for quadric surfaces are:

${\displaystyle Ax^{2}+By^{2}+Cz^{2}+J=0\quad {\text{or}}\quad Ax^{2}+By^{2}+Iz=0}$

where ${\displaystyle A,B,C,I,J}$ are constants.

Of course, depending on the specific quadric surface, there are different forms of standard equations, which we will see in the following discussions.

#### Ellipsoid

Ellipsoids have the equation:

${\displaystyle {\frac {x^{2}}{a^{2}}}+{\frac {y^{2}}{b^{2}}}+{\frac {z^{2}}{c^{2}}}=1}$

It is difficult to sketch quadric surfaces because instead of two variables, there are three, making the process very complicated without the help of calculators. However, there is a way to make us easier to understand. We can analyze each plane to see what the shape looks like, and then combine what we analyzed from each plane to form a rather complete graph of the surface. Take this for example:

${\displaystyle x^{2}+{\frac {y^{2}}{9}}+{\frac {z^{2}}{4}}=1}$

Let us first examine the ${\displaystyle xy}$-plane. To examine the ${\displaystyle xy}$-plane, we need to imagine ${\displaystyle z}$ as a constant. In this case, imagine that ${\displaystyle z=k}$, so

${\displaystyle x^{2}+{\frac {y^{2}}{9}}=1-{\frac {k^{2}}{4}}}$, where ${\displaystyle -2\leq k\leq 2}$.

We can see that in the ${\displaystyle xy}$-plane, the graph will be like an ellipse. We call that the horizontal trace in the plane ${\displaystyle z=k}$ is an ellipse.

Let us furthermore analyze the vertical traces in the planes ${\displaystyle x=k,y=k}$.

${\displaystyle {\frac {y^{2}}{9}}+{\frac {z^{2}}{4}}=1-k^{2}\quad x=k}$, where ${\displaystyle -1\leq k\leq 1}$.

${\displaystyle x^{2}+{\frac {z^{2}}{4}}=1-{\frac {k^{2}}{9}}\quad y=k}$, where ${\displaystyle -3\leq k\leq 3}$.

We can see that on both vertical traces in the planes ${\displaystyle x=k,y=k}$ are ellipses. In other words, the graphs in both ${\displaystyle xz}$-plane and ${\displaystyle yz}$-plane look like ellipses. Since all traces are ellipses, the surface is an ellipsoid with vertices ${\displaystyle (\pm 1,0,0),(0,\pm 3,0),(0,0,\pm 2)}$.

#### Elliptic paraboloid

Elliptic paraboloids have the equation:

${\displaystyle {\frac {z}{c}}={\frac {x^{2}}{a^{2}}}+{\frac {y^{2}}{b^{2}}}}$

There are variations of the equation depending on which trace is an ellipse. For the equation above, the horizontal trace is an ellipse as seen in the image on the right.

Take ${\displaystyle z=x^{2}+y^{2}}$ for example. the horizontal trace, which means ${\displaystyle z=k}$, is:

${\displaystyle x^{2}+y^{2}=k}$, where ${\displaystyle k>0}$.

For both vertical traces, we can see that those traces have the shape of a parabola.

${\displaystyle z=x^{2}+k^{2}\quad y=k}$

${\displaystyle z=y^{2}+k^{2}\quad x=k}$

The vertex for this elliptic paraboloid is ${\displaystyle (0,0,0)}$.

#### Hyperbolic paraboloid

Hyperbolic paraboloids have the equation:

${\displaystyle {\frac {z}{c}}={\frac {x^{2}}{a^{2}}}-{\frac {y^{2}}{b^{2}}}}$

The respective traces are

${\displaystyle {\frac {x^{2}}{a^{2}}}-{\frac {y^{2}}{b^{2}}}={\frac {k}{c}}\quad z=k}$, where ${\displaystyle {\frac {x^{2}}{a^{2}}}-{\frac {y^{2}}{b^{2}}}={\frac {k}{c}}{\text{ when }}k>0\quad {\text{and}}\quad {\frac {y^{2}}{b^{2}}}-{\frac {x^{2}}{a^{2}}}={\frac {k}{c}}{\text{ when }}k<0}$. The horizontal trace is a hyperbola.

${\displaystyle {\frac {z}{c}}={\frac {x^{2}}{a^{2}}}-{\frac {k^{2}}{b^{2}}}\quad y=k}$. The vertical trace is a parabola.

${\displaystyle {\frac {z}{c}}={\frac {k^{2}}{a^{2}}}-{\frac {y^{2}}{b^{2}}}\quad x=k}$. The vertical trace is a parabola.

#### Cone, hyperboloid of one sheet, and hyperboloid of two sheets

Cones have the equation:

${\displaystyle {\frac {z^{2}}{c^{2}}}={\frac {x^{2}}{a^{2}}}+{\frac {y^{2}}{b^{2}}}}$

Note that ${\displaystyle {\frac {x^{2}}{a^{2}}}+{\frac {y^{2}}{b^{2}}}=0}$ when ${\displaystyle z=0}$.

Hyperboloids of one sheet have the equation:

${\displaystyle {\frac {x^{2}}{a^{2}}}+{\frac {y^{2}}{b^{2}}}-{\frac {z^{2}}{c^{2}}}=1}$

Note that ${\displaystyle {\frac {x^{2}}{a^{2}}}+{\frac {y^{2}}{b^{2}}}=1}$ when ${\displaystyle z=0}$.

Hyperboloids of two sheets have the equation:

${\displaystyle -{\frac {x^{2}}{a^{2}}}-{\frac {y^{2}}{b^{2}}}+{\frac {z^{2}}{c^{2}}}=1}$

Note that when ${\displaystyle -c\leq z\leq c}$, there is no real solution for ${\displaystyle x,y}$.

All of the three quadric surfaces have the same respective traces. The horizontal traces are all ellipses and the vertical traces are all hyperbolas.