Mini-Project
Calculus and Mathematica
workshop

Name:  Roberta Jones

Title:  Three Dimensions

Description:  This lesson introduces the idea of the relationship between a system of three equation with three variables and its graph in three-space.

Three Dimensions

INTRODUCTION

When an equation appears which has two variables in it, such as:

  y= 4x + 2, we know that this can be pictured using the Cartesian Coordinate system.  Two axis are drawn, they are labeled x and y, points are plotted and a line is drawn.

Clear[x]f[x_] = 4 x + 2Plot[f[x], {x, -3, 10}, AxesLabel -> {"x", "y"}]

Question:  What happens when there are three variables in the equation?  Can a picture of the equation still be drawn?
Answer:  Yes, but another axis must be added and instead of a line, the equation becomes a plane.

THE AXIS AND THE PLANE

The third axis is called the "z" axis.  It is drawn at right angles to the other two axes.  This creates a three dimensional figure divided into eight parts.  Can you visualize it?  To sketch this figure on paper, draw one axis at a 45  degree angle to the others.  It will look like this:

a1 = Graphics[Line[{{-1.85, -1.85}, {3, 3}}]]; label = Graphics[Text["x", {-2, -2}]]; labelx2 = Graphics[Text["2", {-1.1, -1.3}]]; labelx1 = Graphics[Text["1", {- .3, - .65}]]; labelx3 = Graphics[Text["-1", {1,  .65}]]; x1 = Graphics[Line[{{-1.4, -1.3}, {-1.15, -1.3}}]]; 
    x2 = 
      Graphics[Line[{{- .75, - .65}, {- .5, - .65}}]]x3 = Graphics[Line[{{ .55,  .65}, { .80,  .65}}]]Show[a1, label, labelx2, labelx1, labelx3, x1, x2, x3, 
      AxesLabel -> {"y", "z"}, 
      PlotRange -> {{-2, 3}, {-2, 3}}, Axes -> {0, 0}, 
      AspectRatio -> 1]

Notice that it is the x axis that is drawn at the 45 degree angle.  This is simply convention.  
Let's look at how the plane is represented.

a1 = Graphics[Line[{{-1.85, -1.85}, {3, 3}}]]; label = Graphics[Text["x", {-2, -2}]]; labelx2 = Graphics[Text["2", {-1.1, -1.3}]]; labelx1 = Graphics[Text["1", {- .3, - .65}]]; labelx3 = Graphics[Text["-1", {1,  .65}]]; x1 = Graphics[Line[{{-1.4, -1.3}, {-1.15, -1.3}}]]; 
    x2 = 
      Graphics[Line[{{- .75, - .65}, {- .5, - .65}}]]x3 = Graphics[Line[{{ .55,  .65}, { .80,  .65}}]]plane = Graphics[Polygon[{{0, 2}, {1, 0}, {-1.3, -1.3}}]]Show[a1, label, labelx2, labelx1, labelx3, x1, x2, x3, plane, 
      AxesLabel -> {"y", "z"}, 
      PlotRange -> {{-2, 3}, {-2, 3}}, Axes -> {0, 0}, 
      AspectRatio -> 1]

This represents the graph of x + 2y + z = 2
As you can see, it is nothing but a triangle.  Try to think of this not as a triangle, but as a piece of a plane.  The plane is cutting through three other planes and all you are seeing a a piece of it.
This is one way to represent a plane--using a triangle.

Here is another way:

a1 = Graphics[Line[{{-1.85, -1.85}, {3, 3}}]]; label = Graphics[Text["x", {-2, -2}]]; labelx2 = Graphics[Text["2", {-1.1, -1.3}]]; labelx1 = Graphics[Text["1", {- .3, - .65}]]; labelx3 = Graphics[Text["-1", {1,  .65}]]; x1 = Graphics[Line[{{-1.4, -1.3}, {-1.15, -1.3}}]]; 
    x2 = 
      Graphics[Line[{{- .75, - .65}, {- .5, - .65}}]]x3 = Graphics[Line[{{ .55,  .65}, { .80,  .65}}]]plane = 
      Graphics[Polygon[{{ .257, 3.26}, { .257,  .257}, {-1.3, -1.3}, {
              -1.3, 1.7}}]]Show[a1, label, labelx2, labelx1, labelx3, x1, x2, x3, plane, 
      AxesLabel -> {"y", "z"}, 
      PlotRange -> {{-2, 3}, {-2, 3}}, Axes -> {0, 0}, 
      AspectRatio -> 1]

Although this looks like a parallelogram, it is the representation of a plane.  In this case think of this plane as the xz-coordinate plane, that is, it contains all the values of x and all the values of z.  The value of y in this plane is always 0.  Can you see why?

Once you see what the graph looks like, let's try to draw it by hand.  The line where the graph cuts the xy-plane is called the graph of the xy-trace.  It is obtained by setting z = 0.  Similarly, the yz-trace and the xz-trace are found by letting x and y equal zero, respectively.  By drawing these three traces, you get a reasonalbe picture of the plane.  Let's use the equation
   2x + 3y + 4z = 12    for our example.
   
   First draw the xy-trace.

Clear[f, x]f[x_] =  .242 x -  .968xztrace = 
      Plot[f[x], {x, -1.3, 4}, PlotStyle -> {Thickness[ .01]}, 
        DisplayFunction -> Identity]

a1 = Graphics[Line[{{-1.85, -1.85}, {3, 3}}]]; label = Graphics[Text["x", {-2, -2}]]; labelx2 = Graphics[Text["6", {-1.1, -1.3}]]; labelx1 = Graphics[Text["3", {- .3, - .65}]]; labelx3 = Graphics[Text["-3", {1,  .65}]]; x1 = Graphics[Line[{{-1.4, -1.3}, {-1.15, -1.3}}]]; 
    x2 = Graphics[Line[{{- .75, - .65}, {- .5, - .65}}]]; 
    x3 = Graphics[Line[{{ .55,  .65}, { .80,  .65}}]]; labelx4 = Graphics[Text["xy-trace", {1.6, -1.0}]]; labelx5 = Graphics[Text["2x + 3y = 12", {1.6, -1.3}]]; Show[a1, label, labelx2, labelx1, labelx3, labelx4, labelx5, x1, x2, 
      x3, xztrace, AxesLabel -> {"y", "z"}, 
      PlotRange -> {{-2, 4}, {-2, 3}}, Axes -> {0, 0}, 
      AspectRatio -> 1, DisplayFunction -> $DisplayFunction]

Do you see what the x and y intercepts are?  Can you explain this?  How was the equation for the xy-trace obtained?
Remember to think of this line lying in the xy-plane.
Now let's draw the other two traces, the xz-trace and the yz trace.

Clear[g, x]g[x_] = 3.246 x + 3xztrace = 
      Plot[g[x], {x, -1.3, 0}, PlotStyle -> {Thickness[ .01]}, 
        DisplayFunction -> Identity]

a1 = Graphics[Line[{{-1.85, -1.85}, {3, 3}}]]; label = Graphics[Text["x", {-2, -2}]]; labelx2 = Graphics[Text["6", {-1.1, -1.3}]]; labelx1 = Graphics[Text["3", {- .3, - .65}]]; labelx3 = Graphics[Text["-3", {1,  .65}]]; x1 = Graphics[Line[{{-1.4, -1.3}, {-1.15, -1.3}}]]; 
    x2 = Graphics[Line[{{- .75, - .65}, {- .5, - .65}}]]; 
    x3 = Graphics[Line[{{ .55,  .65}, { .80,  .65}}]]; labelx4 = Graphics[Text["xz-trace", {-1.5, 2.09}]]; labelx5 = Graphics[Text["2x + 4z = 12", {-1.5, 1.71}]]; 
    Show[a1, label, labelx2, labelx1, labelx3, labelx4, labelx5, x1, x2, 
      x3, xztrace, AxesLabel -> {"y", "z"}, 
      PlotRange -> {{-2, 3}, {-2, 3}}, Axes -> {0, 0}, 
      AspectRatio -> 1, DisplayFunction -> $DisplayFunction]

Clear[h, x]h[x_] = - .75 x + 3yztrace = 
      Plot[h[x], {x, 4, 0}, PlotStyle -> {Thickness[ .01]}, 
        DisplayFunction -> Identity]

a1 = Graphics[Line[{{-1.85, -1.85}, {1, 1}}]]; label = Graphics[Text["x", {-2, -2}]]; labelx2 = Graphics[Text["6", {-1.1, -1.3}]]; labelx1 = Graphics[Text["3", {- .3, - .65}]]; labelx3 = Graphics[Text["-3", {1,  .65}]]; x1 = Graphics[Line[{{-1.4, -1.3}, {-1.15, -1.3}}]]; 
    x2 = Graphics[Line[{{- .75, - .65}, {- .5, - .65}}]]; 
    x3 = Graphics[Line[{{ .55,  .65}, { .80,  .65}}]]; labelx4 = Graphics[Text["yz-trace", {2.27, 2.86}]]; labelx5 = Graphics[Text["3y + 4z = 12", {2.27, 2.56}]]; Show[a1, label, labelx2, labelx1, labelx3, labelx4, labelx5, x1, x2, 
      x3, yztrace, AxesLabel -> {"y", "z"}, 
      PlotRange -> {{-2, 4}, {-2, 3}}, Axes -> {0, 0}, 
      AspectRatio -> 1, DisplayFunction -> $DisplayFunction]

Now let's look at all three together.

a1 = Graphics[Line[{{-1.85, -1.85}, {1, 1}}]]; label = Graphics[Text["x", {-2, -2}]]; labelx2 = Graphics[Text["6", {-1.1, -1.3}]]; labelx1 = Graphics[Text["3", {- .3, - .65}]]; labelx3 = Graphics[Text["-3", {1,  .65}]]; x1 = Graphics[Line[{{-1.4, -1.3}, {-1.15, -1.3}}]]; 
    x2 = Graphics[Line[{{- .75, - .65}, {- .5, - .65}}]]; 
    x3 = Graphics[Line[{{ .55,  .65}, { .80,  .65}}]]; labelx4 = Graphics[Text["yz-trace", {2.27, 2.86}]]; labelx5 = Graphics[Text["3y + 4z = 12", {2.27, 2.56}]]; Show[a1, label, labelx2, labelx1, labelx3, x1, x2, x3, yztrace, 
      xytrace, xztrace, AxesLabel -> {"y", "z"}, 
      PlotRange -> {{-2, 4}, {-2, 3}}, Axes -> {0, 0}, 
      AspectRatio -> 1, DisplayFunction -> $DisplayFunction]

You try to draw the representation of an equation with three variables.
Try to draw 2x - 3y + z = 12

a1 = Graphics[Line[{{-1.85, -1.85}, {3, 3}}]]; label = Graphics[Text["x", {-2, -2}]]; labelx2 = Graphics[Text["6", {-1.1, -1.3}]]; labelx1 = Graphics[Text["3", {- .3, - .65}]]; labelx3 = Graphics[Text["-3", {1,  .65}]]; x1 = Graphics[Line[{{-1.4, -1.3}, {-1.15, -1.3}}]]; 
    x2 = 
      Graphics[Line[{{- .75, - .65}, {- .5, - .65}}]]x3 = Graphics[Line[{{ .55,  .65}, { .80,  .65}}]]plane = 
      Graphics[Polygon[{{-4, 0}, {0, 12}, {-1.3, -1.3}}]]Show[a1, label, labelx2, labelx1, labelx3, x1, x2, x3, plane, 
      AxesLabel -> {"y", "z"}, 
      PlotRange -> {{-4, 2}, {-2, 12}}, Axes -> {0, 0}, 
      AspectRatio -> 1]

Did your picture look something like this?  The x-intercept is 6, the y-intercept is -4 and the z-intercept is 12.

Try one more.
3x + 5y - 3z = 15

a1 = Graphics[Line[{{-1.85, -1.85}, {3, 3}}]]; label = Graphics[Text["x", {-2, -2}]]; labelx2 = Graphics[Text["6", {-1.1, -1.3}]]; labelx1 = Graphics[Text["3", {- .3, - .65}]]; labelx3 = Graphics[Text["-3", {1,  .65}]]; x1 = Graphics[Line[{{-1.4, -1.3}, {-1.15, -1.3}}]]; 
    x2 = 
      Graphics[Line[{{- .75, - .65}, {- .5, - .65}}]]x3 = Graphics[Line[{{ .55,  .65}, { .80,  .65}}]]plane = 
      Graphics[Polygon[{{0, -6}, {2, 0}, {-1.3, -1.3}}]]Show[a1, label, labelx2, labelx1, labelx3, x1, x2, x3, plane, 
      AxesLabel -> {"y", "z"}, 
      PlotRange -> {{-2, 3}, {-7, 3}}, Axes -> {0, 0}, 
      AspectRatio -> 1]

This is what it should look like.

Now let's turn to some special cases.  Sometimes graphs will be 
 perpendicular to a coordinate plane.  Here is an equation where that would happen.

x + 3z  =  6

How is this equation different than the ones we have been using?
Here is what the graph would look like.

a1 = Graphics[Line[{{-1.85, -1.85}, {3, 3}}]]; label = Graphics[Text["x", {-2, -2}]]; labelx2 = Graphics[Text["2", {-1.1, -1.3}]]; labelx1 = Graphics[Text["1", {- .3, - .65}]]; labelx3 = Graphics[Text["-1", {1,  .65}]]; x1 = Graphics[Line[{{-1.4, -1.3}, {-1.15, -1.3}}]]; 
    x2 = 
      Graphics[Line[{{- .75, - .65}, {- .5, - .65}}]]x3 = Graphics[Line[{{ .55,  .65}, { .80,  .65}}]]plane = 
      Graphics[Polygon[{{-1.3, -1.3}, {0, 2}, {3, 2}, {2.3, 
              -1.3}}]]Show[a1, label, labelx2, labelx1, labelx3, x1, x2, x3, plane, 
      AxesLabel -> {"y", "z"}, 
      PlotRange -> {{-2, 5}, {-2, 3}}, Axes -> {0, 0}, 
      AspectRatio -> 1];

To which coordinate plane is x + 3z = 6  perpendicular?

If you said the xz plane, then you would have been correct.  Do you see a relationship between the picture and the equation?
Let's look at another one.

y + 2z  =  4  

To which plane will this plane be perpendicular?
Can you draw it?

a1 = Graphics[Line[{{-1.85, -1.85}, {3, 3}}]]; label = Graphics[Text["x", {-2, -2}]]; labelx2 = Graphics[Text["2", {-1.1, -1.3}]]; labelx1 = Graphics[Text["1", {- .3, - .65}]]; labelx3 = Graphics[Text["-1", {1,  .65}]]; x1 = Graphics[Line[{{-1.4, -1.3}, {-1.15, -1.3}}]]; 
    x2 = 
      Graphics[Line[{{- .75, - .65}, {- .5, - .65}}]]x3 = Graphics[Line[{{ .55,  .65}, { .80,  .65}}]]plane = 
      Graphics[Polygon[{{0, 2}, {4, 0}, {1.94, -1.75}, {-2, 0}}]]Show[a1, label, labelx2, labelx1, labelx3, x1, x2, x3, plane, 
      AxesLabel -> {"y", "z"}, 
      PlotRange -> {{-2, 5}, {-2, 3}}, Axes -> {0, 0}, 
      AspectRatio -> 1];

Conclusions thus far should be:
1.  The graph of a linear equations with three variables is a plane in space.
2.  If all three variables are present in the equation, the plane intersects all three coorinate planes
3.  If two variables are present in the equation, the plane is perpendicular to one coordinate plane and parallel to an axis

Let's look at what happens when there is only one variable in the equation.

The equation  y = 4 looks like this in 3-space.

a1 = Graphics[Line[{{-1.85, -1.85}, {1, 1}}]]; label = Graphics[Text["x", {-2, -2}]]; labelx2 = Graphics[Text["2", {-1.1, -1.3}]]; labelx1 = Graphics[Text["1", {- .3, - .65}]]; labelx3 = Graphics[Text["-1", {1,  .65}]]; x1 = Graphics[Line[{{-1.4, -1.3}, {-1.15, -1.3}}]]; 
    x2 = 
      Graphics[Line[{{- .75, - .65}, {- .5, - .65}}]]x3 = Graphics[Line[{{ .55,  .65}, { .80,  .65}}]]plane = 
      Graphics[{GrayLevel[ .75], 
          Polygon[{{4, 0}, {4, 5}, { .9, - .3}, { .9, -6.19}}]}]Show[a1, label, labelx2, labelx1, labelx3, x1, x2, x3, plane, 
      AxesLabel -> {"y", "z"}, 
      PlotRange -> {{-2, 6}, {-8, 6}}, Axes -> {0, 0}, 
      AspectRatio -> 1];

Describe this plane.

You should have said that the plane is perpendicular to the xy-coordinate plane and the yz plane and parallel to the xz plane.

Try to graph the plane  z = 2.

a1 = Graphics[Line[{{-1.85, -1.85}, {1, 1}}]]; label = Graphics[Text["x", {-2, -2}]]; labelx2 = Graphics[Text["2", {-1.1, -1.3}]]; labelx1 = Graphics[Text["1", {- .3, - .65}]]; labelx3 = Graphics[Text["-1", {1,  .65}]]; x1 = Graphics[Line[{{-1.4, -1.3}, {-1.15, -1.3}}]]; 
    x2 = 
      Graphics[Line[{{- .75, - .65}, {- .5, - .65}}]]x3 = Graphics[Line[{{ .55,  .65}, { .80,  .65}}]]plane = 
      Graphics[{GrayLevel[ .75], 
          Polygon[{{-1, 1}, {4, 1}, {7, 4}, {2, 4}}]}]Show[a1, label, labelx2, labelx1, labelx3, x1, x2, x3, plane, 
      AxesLabel -> {"y", "z"}, 
      PlotRange -> {{-2, 8}, {-8, 6}}, Axes -> {0, 0}, 
      AspectRatio -> 1];

These ideas will be used when you learn how to solve a system of three equations with three variables.  Practice drawing more planes. 
Page 137 in your book has more problems to try.