VC.02 Perpendicularity
 BASICS

\(Off[General::spell]; 
\(Off[General::spell1]; \)\)\(Off[ParametricPlot3D::ppcom]; 
Off[ParametricPlot::ppcom]; 

    Off[Plot::plnr]; 
SetOptions[Limit, Analytic -> True]; \)

CMView = {2.7, 1.6, 1.2};

Vector Drawer

BeginPackage["Vector3D`", "Graphics`Colors`"];

\(Axes3D::"usage" = 
      "Axes3D[a, b] creates a Graphics3D object of cartesian axes with x, y, and z running from -a/3 to a, and with axes labels b units beyond the tips of the axes.  Axes3D[a] is Axes3D[a, a/8]."; 

    \(Perpend::"usage" = 
      "Perpend[a] returns a unit vector which is perpendicular to the vector a."; \)\)Arrow::"usage" = 
      "Arrow[a] produces a 2 or 3 dimensional vector from the origin to a. \
Arrow[a, Tail -> tail] gives a vector from tail to a."; Vector::"usage" = 
      "Vector[a, b] gives a 2D or 3D vector from a to b."; ArrowHead::"usage" = 
      "ArrowHead[a, vec] produces an arrowhead with its tip placed at the \
point a, pointing in the direction of the vector vec."; Tail::"usage" = 
      "Tail -> point puts the tail of the vector at point."; Norm::"usage" = 
      "Norm[vec] returns the Euclidean length of vec."; Normalize::"usage" = 
      "Normalize[vec] returns a unit vector in the direction of vec, \
provided vec is nonzero."; Aperture::"usage" = 
      "Aperture is the ratio of the radius of the base to the length of the \
head of a vector."; TipSize::"usage" = 
      "TipSize specifies an absolute size for the inner tip length of the \
head of a vector."; TipRatio::"usage" = 
      "TipRatio is the ratio of the inner length of the arrowhead to the \
length of the shaft of a vector."; HeadRatio::"usage" = 
      "HeadRatio is the ratio of the outer length of the arrowhead to the \
length of the shaft of a vector."; HeadSize::"usage" = 
      "HeadSize specifies an absolute size for the head of a vector."; 
    ScaleFactor::"usage" = 
      "ScaleFactor specifies the amount to scale a vector in length and may \
be either a number or a pure function."; ZeroVectorPointSize::"usage" = 
      "ZeroVectorPointSize is the size of the point used to represent a \
zero vector."; Options[Vector] = 
      Options[Arrow] = 
        Options[ArrowHead] = {HeadRatio -> 0.18, 
            TipRatio -> 0.14, Aperture -> 0.3, 
            ScaleFactor -> 1, HeadType -> Polygon, 
            ShaftQ -> True, EdgesQ -> True, 
            VectorColor -> RGBColor[0, 0, 1], ShaftWidth -> 0.005, 
            ZeroVectorPointSize -> 0.01}; Begin["`Private`"]; SetOptions[ParametricPlot, AspectRatio -> Automatic]; SetOptions[Plot, AspectRatio -> Automatic]; SetOptions[Graphics, AspectRatio -> Automatic]; Axes3D[u_, v_] := 
      Graphics3D[{{Blue, Line[{{-(u/3), 0, 0}, {u, 0, 0}}]}, 
          Text["x", {u + v, 0, 0}], {Blue, 
            Line[{{0, -(u/3), 0}, {0, u, 0}}]}, 
          Text["y", {0, u + v, 0}], {Blue, 
            Line[{{0, 0, -(u/3)}, {0, 0, u}}]}, 
          Text["z", {0, 0, u + v}]}]; Axes3D[u_] := Axes3D[u, (u/8)]; Norm[a_?VectorQ] := N[(Sqrt[a . a])]; Normalize[a_?VectorQ] := If[a . a == 0, a, (a/Norm)[a]]; Perpend[a_?VectorQ] := 
      Normalize[{a[[2]], 
            -a[[1]]}] /; 
        Length[a] == 2Perpend[a_?VectorQ] := 
      Normalize[
          If[a[[1]] == 0, {1, 0, 0}, {0, 
              a[[3]], 
              -a[[2]]}]] /; 
        Length[a] == 3Base3D = 
      Table[{Cos[((2 k π)/8.) ], Sin[((2 k π)/8.) ]}, {k, 0, 
          8}]; Vector[from_?VectorQ, to_?VectorQ, opts___] := 
      Module[{sq, sw, ht, hs, hr, tr, ap, sf, vc, zvps, diff = to - from, 
            tip}, {sq, sw, ht, hs, hr, ts, tr, ap, sf, vc, zvps} = 
            {ShaftQ, ShaftWidth, HeadType, HeadSize, HeadRatio, TipSize, 
                  TipRatio, Aperture, ScaleFactor, VectorColor, 
                  ZeroVectorPointSize} /. {opts} /. Options[Vector]; 
          If[from == to, 
            Return[Graphics[{PointSize[zvps], vc, Point[from]}]]]; 
          diff = If[NumberQ[N[sf]], sf diff, sf[diff]]; tip = from + diff; 
          If[NumberQ[hs], hr = (hs/Norm)[diff]; tr = 0.75 hr]; 
          If[NumberQ[ts], tr = (ts/Norm)[diff]]; 
          Graphics[{
              If[sq, {vc, Thickness[sw], Line[{from, tip - tr diff}]}, {}], 
              With[{trans = ap hr Norm[diff] Perpend[diff]}, {vc, 
                  Thickness[sw], 
                  ht[{tip, tip - hr diff + trans, tip - tr diff, 
                      tip - hr diff - trans, tip}]}]}]] /; 
        Length[from] == Length[to] == 2Vector[from_?VectorQ, to_?VectorQ, opts___] := 
      Module[{sq, eq, sw, hs, hr, tr, ap, sf, vc, zvps, diff = to - from, 
            tip}, {sq, eq, sw, hs, hr, ap, sf, vc, zvps} = 
            {ShaftQ, EdgesQ, ShaftWidth, HeadSize, HeadRatio, Aperture, 
                  ScaleFactor, VectorColor, ZeroVectorPointSize} /. {opts}
                   /. Options[Vector]; 
          If[from == to, 
            Return[Graphics3D[{PointSize[zvps], vc, Point[from]}]]]; 
          diff = If[NumberQ[N[sf]], sf diff, sf[diff]]; tip = from + diff; 
          If[NumberQ[hs], hr = (hs/Norm)[diff]]; tr = (hr/2); 
          Graphics3D[{
              If[sq, {vc, Thickness[sw], Line[{from, tip - tr diff}]}, {}], 
              If[eq, {}, EdgeForm[]], {SurfaceColor[vc], 
                With[{temp = Perpend[diff]}, 
                  (Polygon[Append[#1, tip]]&)/@
                    Partition[
                      (tip - hr diff + #1&)/@
                        ((ap hr Norm[diff] Base3D) . {temp, 
                              Normalize[temp\[Cross]diff]}), 2, 1]]}}]] /; 
        Length[from] == Length[to] == 3Arrow[a_, Tail -> b_, opts___] := Vector[b, a + b, opts]Arrow[a_, opts___] := Vector[Table[0, {Length[a]}], a, opts]\(ArrowHead[a_, b_, opts___] := 
      Vector[a - b, a, ShaftQ -> False, opts]; 

End[]; 

    \(EndPackage[]; \)\)

Graphics`Colors`GosiaGreen = RGBColor[0,  0.392187,  0];

B.1)  The cross product X×Y of two 3D vectors is perpendicular to both X and Y

Take two vectors X and Y from the same dimension.
Testing for perpendicularity by checking whether 
       X . Y = 0 
is quick and easy.
In three dimensions another product comes to the front.  This product is also related to perpendicularity.
To calculate the cross product 
       X×Y for X = {1, 2, 3} and Y = {-2, 0, 7}, 
you make a matrix with 
       {i, j, k} 
in the top (horizontal) row, with X in the middle (horizontal) row, and with Y in the bottom row:

X = {1, 2, 3}; Y = {-2, 0, 7}; \(Clear[i, j, k]; 
MatrixForm[{{i, j, k}, X, Y}]\)

Next, take the determinant of this matrix:

Det[{{i, j, k}, X, Y}]

To arrive at the cross product X×Y, you replace 
       i by {1, 0, 0}, 
replace 
       j by {0, 1, 0} 
and replace 
       k by {0, 0, 1}:

XcrossY = 
      Det[{{i, j, k}, X, Y}] /. {i -> {1, 0, 0}, j -> {0, 1, 0}, 
          k -> {0, 0, 1}}

Mathematica also knows how to calculate the cross product X×Y:

XcrossY  =  Cross[X,  Y]

Here are two new vectors X and Y in 3D:

X = {1, 1, 0}; Y = {1, 2, 0}; \(threedims = Axes3D[1, 0.2]; 

    \(XandY = 
      Show[threedims, Arrow[X, Tail -> {0, 0, 0}], 
        Arrow[Y, Tail -> {0, 0, 0}], Graphics3D[Text["X", X\/2]], 
        Graphics3D[Text["Y", Y\/2]], BoxRatios -> Automatic, 
        ViewPoint -> CMView, PlotRange -> All]; \)\)

Now throw in the cross product X×Y:

\(Clear[i, j, k]; 
XcrossY = Cross[X, Y]; 

    Show[XandY, 
      Arrow[XcrossY, Tail -> {0, 0, 0}, VectorColor -> Red], 
      ViewPoint -> CMView, BoxRatios -> Automatic, 
      PlotRange -> All]; \)

Golly, X×Y appears to be perpendicular to X and to Y.
Try it again with new vectors and a new place to hang the tails:

X = {1, -2, 1}; Y = {1, 3, -1}; newtail = {1, -1, 2}; XandY = 
      Show[threedims, Arrow[X, Tail -> newtail], 
        Arrow[Y, Tail -> newtail], 
        Graphics3D[Text["X", newtail + (X/2)]], 
        Graphics3D[Text["Y", newtail + (Y/2)]], ViewPoint -> CMView, 
        PlotRange -> All, BoxRatios -> Automatic];

Now throw in the cross product X×Y:

\(Clear[i, j, k]; 
XcrossY = Cross[X, Y]; 

    Show[XandY, 
      Arrow[XcrossY, Tail -> newtail, VectorColor -> Red], 
      ViewPoint -> CMView, BoxRatios -> Automatic, 
      PlotRange -> All]; \)

Again, the cross product X×Y appears to be perpendicular to both X and Y.
Rerun this with new vectors X and Y and new tails.

B.1.a.i)

For the record, explain why it is that when you take any two three-dimensional vectors X and Y, then their cross product 
       X×Y  
is perpendicular to both X and Y.

Clear the vectors and test with the dot product:

\(Clear[X, x, Y, y, i, j, k]; 
X = {x[1], x[2], x[3]}; 

    \(Y = {y[1], y[2], y[3]}; \)\)\(XcrossY = Cross[X, Y]; 
Expand[X . XcrossY]\)

Ah-ha! 
No matter what X is, the vector X×Y is perpendicular to X.

Expand[Y . XcrossY]

No matter what Y is, X×Y is perpendicular to Y.
That's all there is to it.
Ah, the joy of automated algebra!

B.2)  Planes in 3D

Just as a line is determined by a point and one direction vector, a plane in three dimensions is determined by a point and TWO direction vectors. 
Here's how you plot part of the plane determined by the following point and two direction vectors:

point = {1, 0, 1}; vector1 = {-1, 1, 0}; \(vector2 = {0.3, 1, \(-1\)}; 

Clear[planeplotter, u, v]; 

    planeplotter[u_, v_] = point + u\ vector1 + v\ vector2; 

    \({ulow, uhigh} = {\(-2\), 2}; \)\)\({vlow, vhigh} = {\(-3\), 3}; 


    plane = ParametricPlot3D[
        Evaluate[planeplotter[u, v]], {u, ulow, uhigh}, {v, vlow, vhigh}, 
        DisplayFunction -> Identity]; 
threedims = Axes3D[6, 0.2]; 


    planeplot = 
      Show[threedims, plane, Axes -> Automatic, PlotRange -> All, 
        ViewPoint -> CMView, BoxRatios -> Automatic, 
        DisplayFunction -> $DisplayFunction]; \)

Look at the plane together with the point and the two vectors that determine this particular plane:

scalefactor = 2; Show[planeplot, 
      Arrow[ vector1, Tail -> point, VectorColor -> Blue, 
        ScaleFactor -> scalefactor], 
      Arrow[scalefactor vector2, Tail -> point, 
        VectorColor -> Blue, ScaleFactor -> scalefactor], 
      Graphics3D[{PointSize[0.04], Point[point]}], 
      BoxRatios -> Automatic];

There you are.
The plane is what you get by sticking the tails of vector1 and vector2 at the point and nailing a flat piece of plywood onto the braces made from those vectors.  The function
       planeplotter[u, v] = point +  u vector1 +  v vector2
plots the plane by moving to the given point and then adding on multiples of the two determining vectors.
Try it for a different point and a different pair of vectors:

point = {0, -1, 0}; vector1 = {0, 0, 1}; \(vector2 = {1, 0, 1}; 

Clear[planeplotter, u, v]; 

    planeplotter[u_, v_] = point + u\ vector1 + v\ vector2; 

    \({ulow, uhigh} = {\(-3\), 3}; \)\)\({vlow, vhigh} = {\(-3\), 3}; 


    plane = ParametricPlot3D[
        Evaluate[planeplotter[u, v]], {u, ulow, uhigh}, {v, vlow, vhigh}, 
        PlotPoints -> {2, 2}, DisplayFunction -> Identity]; 

    threedims = Axes3D[2, 0.2]; 
\(scalefactor = 2; \)\)Show[plane, threedims, 
      Arrow[ vector1, Tail -> point, VectorColor -> Blue, 
        ScaleFactor -> scalefactor], 
      Arrow[ vector2, Tail -> point, VectorColor -> Blue, 
        ScaleFactor -> scalefactor], 
      Graphics3D[{PointSize[0.04], Point[point]}], Axes -> Automatic, 
      PlotRange -> All, ViewPoint -> CMView, Boxed -> False, 
      BoxRatios -> Automatic, DisplayFunction -> $DisplayFunction];

B.2.a)

Plot an elliptical piece of the plane plotted above.

That's not too hard; you just modify the plotting function as follows:

point = {0, -1, 0}; vector1 = {0, 0, 1}; vector2 = {1, 0, 1}; \(Clear[planeplotter, r, t]; 

    planeplotter[r_, t_] = 
      point + 4\ r\ Cos[t]\ vector1 + 6\ r\ Sin[t]\ vector2; 

    \({rlow, rhigh} = {0, 1}; \)\){tlow, thigh} = {0, 2 π}; plane = 
      ParametricPlot3D[
        Evaluate[planeplotter[r, t]], {r, rlow, rhigh}, {t, tlow, thigh}, 
        PlotPoints -> {2, Automatic}, DisplayFunction -> Identity]; 
    scalefactor = 3; \(threedims = Axes3D[5, 0.2]; 

    \(elliptical = 
      Show[plane, threedims, 
        Arrow[vector1, Tail -> point, VectorColor -> Blue, 
          ScaleFactor -> scalefactor], 
        Arrow[vector2, Tail -> point, VectorColor -> Blue, 
          ScaleFactor -> scalefactor], 
        Graphics3D[{PointSize[0.04], Point[point]}], Axes -> Automatic, 
        PlotRange -> All, ViewPoint -> CMView, Boxed -> False, 
        BoxRatios -> Automatic, 
        DisplayFunction -> $DisplayFunction]; \)\)

No sweat.

B.2.b) Normal vector to a plane

A normal vector for a given plane is a vector perpendicular to that plane.
How do you come up with a normal (perpendicular) vector for a plane determined by a point and two direction vectors?

To get a normal vector for a plane, just take the cross product of two direction (non-parallel) vectors.
Try it; you'll like it:

point = {0, 0, -2}; vector1 = {-1, 2, 1}; vector2 = {-2, -1, -2}; \(Clear[i, j, k]; 
normal = Cross[vector1, vector2]; 

    Clear[x, y, z, r, t]; 
Clear[planeplotter, r, t]; 

    planeplotter[r_, t_] = 
      point + 3\ r\ Cos[t]\ vector1 + 5\ r\ Sin[t]\ vector2; 

    \({rlow, rhigh} = {0, 1}; \)\){tlow, thigh} = {0, 2 π}; plane = 
      ParametricPlot3D[
        Evaluate[planeplotter[r, t]], {r, rlow, rhigh}, {t, tlow, thigh}, 
        PlotPoints -> {2, Automatic}, DisplayFunction -> Identity]; 
    scalefactor = 3; \(threedims = Axes3D[14, 0.8]; 


    Show[plane, threedims, 
      Arrow[\ vector1, Tail -> point, VectorColor -> Blue, 
        ScaleFactor -> scalefactor], 
      Arrow[\ vector2, Tail -> point, VectorColor -> Blue, 
        ScaleFactor -> scalefactor], 
      Arrow[normal, Tail -> point, VectorColor -> Red, 
        ScaleFactor -> scalefactor], 
      Graphics3D[{PointSize[0.04], Point[point]}], Axes -> Automatic, 
      PlotRange -> All, ViewPoint -> CMView, Boxed -> False, 
      BoxRatios -> Automatic, 
      AxesLabel -> {"x", "y", "z"}, 
      DisplayFunction -> $DisplayFunction]; \)

Lookin' fairly good. 
If you want the normal to point the other way, just multiply the normal calculated above by -1:

Show[plane, threedims, 
      Arrow[ vector1, Tail -> point, VectorColor -> Blue, 
        ScaleFactor -> scalefactor], 
      Arrow[ vector2, Tail -> point, VectorColor -> Blue, 
        ScaleFactor -> scalefactor], 
      Arrow[ (-normal), Tail -> point, VectorColor -> Red, 
        ScaleFactor -> scalefactor], 
      Graphics3D[{PointSize[0.04], Point[point]}], Axes -> Automatic, 
      PlotRange -> All, ViewPoint -> CMView, Boxed -> False, 
      BoxRatios -> Automatic, AxesLabel -> {"x", "y", "z"}, 
      DisplayFunction -> $DisplayFunction];

Lookin' great.

B.2.c) xyz-equation of a plane

How do you get the xyz-equation for a plane specified by a given point and two direction vectors?

You get it from the given point and the normal vector.
To see what's involved, go with the plane determined by the following point and direction vectors:

\(Clear[x, y, z]; 
point = {1, 2, 3}; 
\(vector1 = {2, 4, \(-1.2\)}; 
    \)\)vector2 = {-1, 1.5, 0}; \(Clear[i, j, k]; 
normal = Cross[vector1, vector2]\)

Saying that {x, y, z} is on this plane is the same as saying that when you stick the tail of the normal at the given point {1, 2, 3}, then the normal is perpendicular to the vector with tail at {1, 2, 3} and tip at {x, y, z}.
So saying that {x, y, z} is on this plane is the same as saying that
       ({x, y, z} - point) . normal = 0:

xyzeqn = ({x, y, z} - point) . normal == 0

Notice how the given point {1, 2, 3} and the normal vector {1.8, 1.2, 7} are conveniently displayed in the plane equation.
You can solve this equation for z:

zsolved = Solve[xyzeqn, z]

And you can use this to plot the part of the plane over any rectangle in the xy-plane you like.

\(Clear[f]; 

    f[x_, y_] = z /. zsolved[[1]]\)

Here comes the plot of the part of this plane over the rectangle 
       -4 ≤ x ≤ 4 and 0 ≤ y ≤ 6 
in the xy-plane:

plane = 
      Plot3D[f[x, y], {x, -4, 4}, {y, 0, 6}, PlotPoints -> {2, 2}, 
        DisplayFunction -> Identity]; Show[plane, 
      Arrow[vector1, Tail -> point, VectorColor -> Blue], 
      Arrow[vector2, Tail -> point, VectorColor -> Blue], 
      Arrow[normal, Tail -> point, VectorColor -> Red], 
      Graphics3D[{PointSize[0.04], Point[point]}], Axes -> Automatic, 
      PlotRange -> All, AxesLabel -> {"x", "y", "z"}, 
      ViewPoint -> CMView, Boxed -> False, 
      BoxRatios -> Automatic, DisplayFunction -> $DisplayFunction];

Bingo.

B.2.d)

A normal vector and a point also determine a plane. 
To see what the plane is, put the tail of the normal vector at the point. The plane is what you get by putting a flat plywood sheet at the tail of the normal vector and aligning the plywood sheet to be perpendicular to the normal vector.
In fact, if the normal vector and the point are related to the xyz-equation for the plane by:

\(Clear[R, S, T, a, b, c, x, y, z]; 
normal = {R, S, T}; 

    \(point = {a, b, c}; \)\)xyzequation = ({x, y, z} - {a, b, c}) . normal == 0

Explain where this comes from, and use it to plot the plane passing through the point {4, 2, 1} with normal vector {2, -1, 1.5}.

Take another look:

normal = {R, S, T}; point = {a, b, c}; xyzequation = ({x, y, z} - point) . normal == 0

This comes from the fact that saying that 
-> {x, y, z} is on the plane passing through the given point {a, b, c} with normal vector {R, S, T} 
is the same as saying that 
-> the vector running from the given point {a, b, c} to {x, y, z} is perpendicular to the normal vector {R, S, T}. 
This is the same as saying:

xyzequation = ({x, y, z} - point) . normal == 0

To plot the plane passing through the point {4, 2, 1} with normal vector {2, -0.8, 1.5}, go with:

normal = {2, -0.8, 1.5}; point = {4, 2, 1}; xyzequation = ({x, y, z} - point) . normal == 0

Here comes the plot:

zsolved = Solve[xyzequation, z]

\(Clear[f]; 

    f[x_, y_] = z /. zsolved[[1]]\)

plane = 
      Plot3D[f[x, y], {x, -1, 7}, {y, -4, 6}, 
        DisplayFunction -> Identity]; scalefactor = 4; Show[plane, 
      Arrow[normal, Tail -> point, VectorColor -> Red, 
        ScaleFactor -> scalefactor ], 
      Graphics3D[{PointSize[0.04], Point[point]}], Axes -> Automatic, 
      AxesLabel -> {"x", "y", "z"}, PlotRange -> All, 
      ViewPoint -> CMView, Boxed -> False, 
      BoxRatios -> Automatic, DisplayFunction -> $DisplayFunction];

The flat plywood sheet is perpendicular to the normal vector at the point:

point

And that's all there is to it.

B.3)  Normal vectors for curved surfaces in 3D

Here is a curved surface in three dimensions given in parametric form:

\(Clear[x, y, z, u, v]; 
x[u_, v_] = u + v\/3; 
\(y[u_, v_] = v - u\/4; 
    \)\)z[u_, v_] = (1/3) (10 - (u^2) - (v^2)); {ulow, uhigh} = {-2, 2}; {vlow, vhigh} = {-2, 2}; surf = 
      ParametricPlot3D[
        Evaluate[{x[u, v], y[u, v], z[u, v]}], {u, ulow, uhigh}, {v, vlow, 
          vhigh}, DisplayFunction -> Identity]; surface = Insert[surf, EdgeForm[], {1, 1}]; surfaceplot = 
      Show[surface, Axes -> Automatic, PlotRange -> All, 
        ViewPoint -> CMView, BoxRatios -> Automatic, 
        AxesLabel -> {"x", "y", "z"}, 
        DisplayFunction -> $DisplayFunction];

B.3.a)

Take a point on the surface and say how to build a vector that is perpendicular to the surface at that point. 
Show off your work with a sample plot.

Any point on the surface can be described by 
       {x[u, v], y[u, v], z[u, v]} 
for specific choices of u and v.
Here's the point you get by setting u = 0.2 and v = 1.3:

uset = 0.2; vset = 1.3; \(Clear[surfacepoint]; 

    surfacepoint[u_, v_] = {x[u, v], y[u, v], z[u, v]}; 

    surfacepoint[uset, vset]\)

To build the perpendicular vector at this point on the surface, look at the point and two curves in the surface that meet at this point:

\(Clear[ucurve, vcurve]; 
ucurve[u_] = surfacepoint[u, vset]; 

    \(vcurve[v_] = surfacepoint[uset, v]; \)\)ucurveplot = 
      ParametricPlot3D[ucurve[u], {u, ulow, uhigh}, 
        DisplayFunction -> Identity]; vcurveplot = 
      ParametricPlot3D[vcurve[v], {v, vlow, vhigh}, 
        DisplayFunction -> Identity]; pointplot = 
      Graphics3D[{PointSize[0.04], Point[surfacepoint[uset, vset]]}]; firstlook = 
      Show[surfaceplot, ucurveplot, vcurveplot, pointplot, 
        DisplayFunction -> $DisplayFunction];

Now throw in the tangent vectors to each curve at the point in question:

utanvector=ucurve'[uset];vtanvector=vcurve'[vset];\(tangents = {Arrow[utanvector, Tail -> surfacepoint[uset, vset]], 
        Arrow[vtanvector, Tail -> surfacepoint[uset, vset]]}; 

    \(secondlook = Show[firstlook, tangents]; \)\)

To build a vector perpendicular to the surface at the point in question, all you gotta do is take the cross product of the two tangent vectors:

\(Clear[i, j, k]; 
normal = Cross[utanvector, vtanvector]; 

    proudlook = 
      Show[secondlook, 
        Arrow[normal, Tail -> surfacepoint[uset, vset], 
          VectorColor -> Red], BoxRatios -> Automatic]; \)

There it is! 
Proud and perpendicular.
Most folks don't bother to show the curves and the tangents:

cleanplot = 
      Show[surfaceplot, 
        Arrow[normal, Tail -> surfacepoint[uset, vset], 
          VectorColor -> Red]];

Math folks like to call this the normal vector at the point at the tail of the vector. 
Play with this by rerunning with your own choices of set points
       {u, v} = {uset, vset}.

B.3.b)

What can you use this normal vector for?

You can use it to see what happens when you bounce light off a surface. You'll have a chance to give this a try later.

B.3.c.i)

Say, all that talk about what you do to get the normal vector was pretty windy.
Can you give some concise code that efficiently produces the normal vector at a desired point without all the wind?

Be happy to.
To get the concise code that will work on any surface given in parametric form, just review what went on in part a) and try it out on a plot of the surface 
       z = f[x, y] = -x y:

\(Clear[f, x, y, z, u, v]; 
f[x_, y_] = \(-x\)\ y; 

    \(x[u_, v_] = u\ Cos[v]; \)\)y[u_, v_] = u Sin[v]; z[u_, v_] = f[x[u, v], y[u, v]]; {ulow, uhigh} = {0, 1.5}; {vlow, vhigh} = {0, 2 π}; surface = 
      ParametricPlot3D[
        Evaluate[{x[u, v], y[u, v], z[u, v]}], {u, ulow, uhigh}, {v, vlow, 
          vhigh}, DisplayFunction -> Identity]; \(threedims = Axes3D[2, 0.2]; 

    \(surfaceplot = 
      Show[threedims, surface, Axes -> Automatic, PlotRange -> All, 
        ViewPoint -> CMView, DisplayFunction -> $DisplayFunction]; 
    \)\)

Here's a fairly quick way of throwing in the normal vector at the following point:

{uset, vset} = {0.5, ((15 π)/16)}; \(Clear[surfacepoint]; 

    surfacepoint[u_, v_] = {x[u, v], y[u, v], z[u, v]}; 

    N[surfacepoint[uset, vset]]\)

Here comes the normal:

\(Clear[ucurve, vcurve]; 
ucurve[u_] = surfacepoint[u, vset]; 

    \(vcurve[v_] = surfacepoint[uset, v]; \)\)utanvector=ucurve'[uset];vtanvector=vcurve'[vset];\(Clear[i, j, k]; 
normal = Cross[utanvector, vtanvector]; 

    scalefactor = 3; 

    onenormal = 
      Show[surfaceplot, 
        Arrow[normal, Tail -> surfacepoint[uset, vset], 
          VectorColor -> Red, ScaleFactor -> scalefactor\ ], 
        ViewPoint -> CMView]; \)

Just fine, thank you.