Laboratory 3
Projections, Lines, and Planes
Introduction
In this lab, we explore the properties of projections. We shall also study equations of lines and planes in space.
Example 3.1, Projections
Let
and
be two nonzero vectors (two or three dimensional). The projection of
onto
is the vector that has the same direction as
and together with
forms a right triangle. The scalar projection of
onto
is defined to be the magnitude of the vector projection, and is called the component of
along
.
We can derive a formula that gives us the component of one vector in the direction of another. Indeed, let
and
be two nonzero vectors in the plane.
Then the projection of the vector
in the direction of
is the black vector in the figure above, while the component of
in the direction of
is the length of the black vector. Basic trigonometry tells us that the length of the black vector is the same as
; however we know that we can find
from the dot product as
. Thus the component of
in the direction of
is
. For convenience, we define the following command to obtain the component of the vector
in the direction
.
The vector projection of
onto
is the vector that points in the same direction as
, but whose length is the component of
in the direction of
. Since the vector
points in the same direction as
but has length 1, we can define the projection of
in the direction of
as follows.
To see these ideas in action, let us set
and
. Then we can find the component of
in the direction of
and the projection of
in the direction of
as follows.
To see this geometrically, we once again load the following 2d and 3d vector drawing commands.
We can then plot
,
, and the projection of
in the
direction as follows.
Which vector is
, which is
, and which is the projection of
in the direction of
?
The projection and component operations are also defined for vectors in three dimensions. Suppose that
and
. Then we can find the projection and component of
in the direction of
as follows.
Experiment 3.1
1. Let
and
. Find the projection of
in the direction of
, as well as the component of
in the direction of
. Graph
,
, and the projection of
in the
direction, and label the results.
2. Let
and
. Find the projection of
in the direction of
, as well as the component of
in the direction of
. Graph
,
, and the projection of
in the
direction, and label the results.
3. Let
and
. Find the projection of
in the direction of
, as well as the component of
in the direction of
. Graph
,
, and the projection of
in the
direction, and label the results.
4. Let
and
. Find the projection of
in the direction of
, as well as the component of
in the direction of
. Graph
,
, and the projection of
in the
direction, and label the results
Example 3.2, Lines and Planes
Lines
Let
be the line in three dimensional space determined by a point
on the line and the direction vector
of the line. Then any point
on the line has the form
for some real number
.
Suppose that we wanted to represent the line through the point
in the direction
. An unknown point on this line
would have the form
, and would satisfy
. We can represent this in Mathematica as follows. First we define the points.
Our equation is then
We used double equals "==" instead of "=" because we want to let Mathematica know that this equality is to hold for all values of
. As a consequence, we conclude that our line has the equations
,
,
. We can then plot the graph of this line with the aid of the Mathematica command ParametricPlot3D in the following fashion.
Note the use of the Mathematica command Evaluate in the argument of the ParametricPlot3D command.
Planes
A plane in three dimensional space determined by a point
on the plane and a vector
normal to the plane, is described by the vector equation
where
is an arbitrary point on the plane. Suppose that we want to find the plane that passes through the point
and is normal to the vector
. First we define the points.
Then we write the equation of the plane just as we did for the line, using double equals "==".
We can simplify the result using the command Simplify.
There are two ways we can draw the graph of the resulting plane. The first method is to use the command Plot3D, which returns the graph of a surface in the form
. To apply this command, we first solve the equation of our plane for
.
We can then see that
. We then plot the result.
The first argument of the Plot3D command is the function whose graph we want; the second two arguments are the ranges of the two independent variables, typically
and
. After that follow the options used for the plot; we have used the option BoxRatios->Automatic so that the scale would be the same on each of the three axes. We shall discuss the command Plot3D in more detail in later labs.
The command Plot3D works well provided the plane can be written as
, but not all planes can be written in this fashion. In particular, the equation of a plane whose normal vector is perpendicular to the
-axis can not be written in this fashion. There is an alternative however. We know that our plane has the equation
. We can rewrite this as
. Given any function
, we can plot the solution of
by using a contour plot. The appropriate Mathematica command is called ContourPlot3D. We must first load the package.
Because we want to plot
, we use the Contours->{4} option. In general, if we want to plot
, we would use the option Contours->{c}.
Note that the two planes we have generated are the same, even though the hatched lines on the planes are drawn differently.
Applications
Let us put all of these ideas together, and find the equation of the plane passing through the point
and perpendicular to the line through
and the point
. We shall also find the line through
and
, and we shall also plot both the line and the plane on the same graph. First we name our points.
Next we find the vector from
to
. This is the direction vector for our line, and it is also the normal vector for our plane.
Every point on our line has the form
for some real number
.
Thus the parametric form of our line is
,
,
. The graph of our line can then be found as before; we call the result A.
If
is in our plane, then
, so the equation of the plane is
Thus, the equation of our plane is
. We can graph this using either ContourPlot3D or Plot3D. We shall use the latter, and call the result B.
We can show the both the plane and the line together using the Show command.
Experiment 3.2
1. Find the equation of the plane passing through the point
and perpendicular to the line through
and the point
. Then find the equation of the line through
and
, and plot both the plane and the line on the same graph.
2. Find the equation of the plane passing through the point
and perpendicular to the line through
and the point
. Then find the equation of the line through
and
, and plot both the plane and the line on the same graph.
Example 3.3, Intersection of Two Planes
Now we shall use the ideas of the previous two parts to find an equation for the line of intersection of the two planes given by
and
.
Let
and
be normal vectors for each of the two planes. From the equations of the planes, we see that
and
. Notice that the normal vectors are not parallel, therefore the intersection of the planes must be a line. Any direction vector of the line of intersection must be orthogonal to the normal vector of each of the two planes. Thus the line of the intersection lies in both planes and is perpendicular to both
and
. Consequently,
is a direction vector for the line of intersection.
Now we need to find a point on both planes. Suppose
is a point on both planes; then we know that is must satisfy the equations of each plane. As a consequence,
,
.
These are two equations in three variables, so we expect that there are an infinite number of solutions, one for each value of
. To see that this is the case, let us solve these two equations for
and
, and call the result sol.
We can then choose any value of
we wish, and use the above to find the corresponding values of
and
that solve the equations of both planes. For simplicity, let us set
. Then
We see that
,
, and
solves the equations of both planes, and hence lies on both planes. Let us call this point
.
Then every point on our line must have the form
for some real number
.
Finally, we plot the equations of the two planes, as well as the line on the same graph. We shall use the options DisplayFunction->Identity and DisplayFunction->$DisplayFunction so that we do not see the intermediate steps.
Next, let
be the graph of our line. Note that we use the Hue option and the Thickness option so that our line is more easily seen in the combined graph.
Finally, we show the net result.
Experiment 3.3a
1. Find an equation for the line of intersection of two planes given by
and
. Check your work by graphing both planes and the line of intersection.
2. Find an equation for the line of intersection of two planes given by
and
. Check your work by graphing both planes and the line of intersection.
Experiment 3.3b
1.Find an equation for the line of intersection between the plane through
,
,
and the plane through
,
and
. Check your work by graphing both planes and the line of intersection.
2.Find an equation for the line of intersection between the plane through
,
,
and the plane through
,
and
. Check your work by graphing both planes and the line of intersection.
Example 3.4, Distance between a Point and a Plane
Let us find the distance between the point
and the plane given by
.
Let
be the point in the plane so that the distance between the point
and the plane is the same as the distance between
and
. We would like to find the distance between
and
. We know that the vector from
to
points in the same direction as the normal vector to the plane, and we know that the normal is given by
. If we could find a point
in the plane, then we see from the figure above that the distance from
to
will be exactly the component of the vector
in the direction of
. Since
has the same direction as
, it is sufficient to find the component of
in the direction of
. To find our point in the plane, let
and
, and obtain the point
.
We begin by defining our variables.
The distance we want is the component of
in the direction of
, or more precisely the absolute value of the component of
in the direction of
; we have to take the absolute value because
might point in the direction from
to
, or it might point in the opposite direction.
We conclude that the distance from the point to the plane is
.
Experiment 3.4
1.Find the distance between the point
and the plane given by
.
2.Find the distance between the point
and the plane given by
.
Example 3.5, Distance between a Point and a Line
Let us find the distance between the point
and the line given by
,
, and
.
Let
be the point on the line closest to
. Choose another point
on the line; we can do this by setting
in the parametric form of the line; this gives us the point
. Because
is the point on the line closest to
, we know that the triangle
is a right triangle. Thus, if we let
be the vector from
to
, the distance from
to the line is
.
Let
be a vector that points in the same direction as the line; we know that it points in the same direction as the vector from
to
; thus the angle
in our figure is the angle between
and
. However, we know that
, so that the distance between the point and the line is
.
Thus the distance from the point to the line is
.
Experiment 3.5
1. Find the distance between the point
and the line given by
,
, and
.
2. Find the distance between the point
and the line given by
,
, and
.
Example 3.6, Distance between Two Skew Lines
Let us find the distance between the line through
,
and the line through
,
.
We imagine a plane which contains the line
, and is parallel to the line
. The distance between the two lines then is just the distance from any point on the
to the plane.
Let us find the equation of the plane containing
and parallel to
. We know that this plane contains the line
, so the normal to our plane must be perpendicular to the vector from
to
. On the other hand, because the plane is parallel to the line through
and
, we also know that the normal vector must be perpendicular to the vector from
to
. Thus, the normal vector for our plane is
.
To find the distance between a point on the line
and the plane, we simply need find a point on the line and a point on the plane, and then take the absolute value of the component of the vector between these two points in the direction of the normal. However, we know that
is on the line
, while
is in the plane, so we can let our vector
be the vector from
to
.
The distance from the line to the plane is then just the absolute value of the component of
in the direction of
.
As the distance between the plane and the line is the same as the distance between the lines, we conclude that the distance between the two lines is
.
Experiment 3.6
1.Find the distance between the line through
,
and the line through
,
.
2.Find the distance between the line through
,
and the line through
,
.
Credits
These laboratories were created by Raouf Boules, Geoff Goodson, Ohoe Kim and Mike O'Leary for use in the Calculus courses of Towson University. Commercial use is prohibited without permission of the authors. Non-commercial use is permitted, provided this credit section is retained.
Created by Mathematica (August 20, 2004)