Direction Cosines & Ratios: Definition & Calculations

Instructor: Betsy Chesnutt

Betsy teaches college physics, biology, and engineering and has a Ph.D. in Biomedical Engineering

Direction cosines and ratios are a way to represent the direction of a 3D vector. In this lesson, learn how to calculate and understand direction cosines and ratios.

What are vectors?

When you want to define the position of an object in space, there are two ways that you can do this. You can give the coordinates of the object (relative to some origin), or you can give the total distance to the object and the angle that a line connecting the origin and the object makes with one or more of the coordinate axes.

This is pretty easy to do when you are dealing with two-dimensional distances. For example, if you have an object with coordinates of (3,4) in the xy plane, you could find the distance to the object (r) was 5 using the Pythagorean theorem, and you could use the tangent function to find the angle r makes with the x-axis.

2d coordinates

The total distance, r, is known as the magnitude of the position vector. A vector is any mathematical quantity that has both a magnitude and a direction, including this vector that represents the position of an object in space. Just like we did here, all vectors can be represented in two ways, either with coordinates or with a magnitude and direction.

While you can use simple geometry to find the magnitude and direction of a 2D vector, things start to become a bit more complicated when you move from two to three dimensions. Now, you have three axes, and therefore, three coordinates are required to define the position of the object. To represent the vector with a magnitude and direction, you have to not only calculate the magnitude of the distance, but also the angle that it makes with ALL THREE axes.

Direction Ratios and Unit Vectors

If you know the coordinates of a point in 3D space and want the distance to that point, you can calculate the magnitude of the position vector using the three coordinates that you know:

magnitude of a 3D vector

Once you have the magnitude, you can calculate a unit vector that describes the direction of the vector. To find the components of the unit vector, divide the original three components of the vector by the magnitude you just calculated.

unit vectors

This unit vector has a magnitude of exactly one and is always in the same direction as the original vector. The three components of the unit vector are known as direction ratios because they represent the ratio of each coordinate to the total magnitude.

direction ratios

Now that you know how to find the direction ratios, what would you do if you knew the unit vector direction ratios and the magnitude of the vector and wanted to find the three components?

In this case, all you have to do is multiply the magnitude by each of the direction ratios in the unit vector to find the x, y, and z components of the vector.

unit vector to coordinates

Direction Cosines

How do the direction ratios you just found relate to the angles that the vector makes with each coordinate axis?

To unlock this lesson you must be a Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use

Become a member and start learning now.
Become a Member  Back
What teachers are saying about
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account