Direction cosines are given short shrift in our schools. One thing I learned incidentally during my PhD was to always avoid sines and cosines whenever possible and instead use direction cosines. In planar geometry, sines and cosines are just fine; but in solid geometry, they are next to impossible to use.

The
direction cosines of a vector are merely the cosines of the angles that the
vector makes with the x, y, and z axes, respectively. We label these angles _{} (angle with the x
axis), _{} (angle with the y
axis), and _{} (angle with the z
axis); and we define

_{}

_{}

_{}

The cosines of the angles can be found by taking dot
products. Thus, if we have a unit
vector given by _{}, the direction cosines are

_{}

_{}

_{}

Since the vector is a unit vector, it also follows that

_{}

A vector is
usually interpreted as passing through a coordinate system’s origin. It provides direction information but not
location information. We can define a
line parametrically by starting with a vector _{}and adding an initial position _{}.

_{}

_{}

_{}

The
orientation of a plane is defined by means of the direction of a perpendicular
vector _{}. The position of the
plane is added by means of some initial conditions _{}. Thus, a plane is
given by the equation

_{}

Usually, the right side of the equation is brought to the left-hand side to obtain

_{}

or more commonly

_{}

Given three
points in space, it is easy to compute the equation of the plane passing
through them. Let us define the three
points by means of three vectors, _{},_{}, and _{}. Let us choose the
third vector as a reference. Then, two
vectors that lie in the plane are

_{}

_{}

The normalized cross product of these two vectors yield the perpendicular to the plane:

_{}

Now we have the perpendicular to the plane, and we can
continue with *Definition of a Plane* using any of the three points as an
initial condition for the plane’s location.

Given the equation of the plane

_{}

we recall that _{}, _{}, and _{}, which are the direction cosines of a vector perpendicular
to the plane. (Note that we had to
normalize the coefficients so that _{}.) Thus, if we know
that the line also passes through _{}, we can proceed to *Definition of a Line* to obtain the
parametric representation of the line:

_{}

_{}

_{}

First, we
define the point in space as _{}, the line as having direction cosines _{}, and a point on the line as _{}. A vector from the
point on the line to the point in space is

_{}

The distance between the point and line can be found with
the aid of the cross product of direction cosines and _{}.

_{}

_{}

This technique works because the line forms one side of a
triangle, _{} describes the
hypotenuse, and we want to know the length of the third side. The included angle of the line and _{} has a sine given by
the cross product. Multiplying by the
length of the hypotenuse yields the distance.

The
shortest distance from a point _{} to a plane will be
along a vector that is perpendicular to the plane. Given the equation of the plane

_{}

we recall that _{}, _{}, and _{} are the direction
cosines of a vector perpendicular to the plane. (Note that we had to normalize the coefficients so that _{}.) We choose the
point as the reference for the vector.
The line that passes through the point and is perpendicular to the plane
is

_{}

_{}

_{}

Distance along this line is measured by

_{}

_{}

_{}

or

_{}

Thus, we have only to find *t* when the line intercepts
the plane. *t* can be positive or
negative depending on whether the vector points toward or away from the
plane. We usually choose the sign so
that distance is positive.

The line and plane intercept when

_{}

Solving for *t* yields

_{}

or

_{}

Thus, the distance from the point to the plane is

_{}

Given one
coordinate system, _{}, a new system can be devised by rotating the old
system. One way to do this is through
quaternions. Here, we use direction
cosines. We assume that we know the
direction cosines of each of the axes in the new system relative to the old
system. The direction cosines of the
new x axis are _{}. Similar notation
exists for the other axes. The new
coordinates can be described in terms of the old coordinates as

_{}

The old coordinates can be described in terms of the new coordinates as

_{}