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
