Maths - Direction Cosines


Vectors can be used to represent direction.

If you are not familiar with this subject you may like to look at the following pages first:

Vector representation of direction

A 3D vector can be used to define a direction. If a vector is used to define direction in this way then the length of the vector is not relevant, therefore we can use a unit length vector.

So if the vector is: (x,y,z)


So for a normalised vector:

x2 + y2 + z2 = 1

The angles from the vector to the coordinate axes are given by:

x,y and z are known as the direction cosines.

Distinction between Direction and Orientation

The direction cosines are not independent of each other, they are related by the equation x2 + y2 + z2 = 1, so direction cosines only have two degrees of freedom and can only represent direction and not orientation.

What this means is that direction cosines do not define how much an object is rotated around the axis of the vector.

Further Reading

For applications of unit length vectors to specify direction see here.

You may be interested in means to represent orientation and rotational quantities such as:

Or you may be interested in how these quantities are used to simulate physical objects:

metadata block
see also:


Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

cover 3D Math Primer - Aimed at complete beginners to vector and matrix algebra.

Other Math Books

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2023 Martin John Baker - All rights reserved - privacy policy.