Maths & numbers

Direction cosines from azimuth and elevation calculator

Convert two pointing angles to the three components of a unit direction vector.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Convert two pointing angles to the three components of a unit direction vector.

THE FORMULAu=(cos(e)cos(a), cos(e)sin(a), sin(e))

A worked example

An azimuth of 60° on the xy plane gives (0.5, √3/2, 0).

Good to know

Azimuth starts at the positive x axis. A compass convention may measure from a different axis.

Read the result

Convert two pointing angles to the three components of a unit direction vector.

The primary result is labeled “X direction cosine”. Keep the input definitions in view when comparing this result with another method.

Try a related calculation

Azimuth starts at the positive x axis. A compass convention may measure from a different axis.

For a related exercise, try the quadratic equation solver.

A few questions, answered

How can I check the default inputs by hand?

An azimuth of 60° on the xy plane gives (0.5, √3/2, 0).

Which rule does this calculator apply?

u=(cos(e)cos(a), cos(e)sin(a), sin(e))

Find your calculator

Start typing to explore the library.