Key Points
- For , one set of direction ratios is .
- For the line through and , one set is .
- A line has infinitely many sets: multiply any set by a non-zero number to get another.
- Lines are parallel when their ratios are proportional, and perpendicular when .
Why Does a Line in 3D Need Three Numbers to Say Which Way It Points?
On a flat page, one number, the slope, says which way a line runs, but in space it cannot. Slope is rise over run, and a laser pointed from one corner of a room to the far ceiling leans along the length, the width and the height at once.
Direction ratios fix this with three numbers:
- They record how far the line travels along x, y and z compared with each other.
- A cable that goes 6 m east, 2 m north and drops 3 m has direction ratios .
- A cable going 12 east, 4 north and dropping 6 runs the same way: only the proportion matters.

What Is a Direction Ratio?
A set of direction ratios of a line is any three numbers , , , not all zero, that are proportional to the line's direction cosines. In symbols, , where , , are the cosines of the angles the line makes with the positive x-, y- and z-axes.
- Everyday version: any vector along the line gives a set. For , the ratios are .
- , and all describe the same line; the direction cosines are the one set scaled to length 1.
- , , are the unit vectors along the axes: see components of a vector and vectors.
How Do You Find the Direction Ratios of a Line?
Read them from a vector, or subtract the coordinates of two points on the line.
From a vector :
From two points and , subtract start from end:
- is the trip from to : a displacement (a move), with no interest in total length.
- From to : 2 along x, 4 along y, 4 up. Ratios , or .

- is fine: the same line travelled the other way.
What Is the Relationship Between Direction Ratios and Direction Cosines?
Direction cosines are the one set of direction ratios scaled to length 1. They are , , . Divide each ratio by :
and then, always, .
- has length 6 and has length 3, but both give the cosines .
- Scaling the ratios scales the length too, so the division cancels it. Ratios can be any multiple; cosines are unique (up to sign).

Why dividing by the length gives a cosine
- Put with its tail at and head at . Drop a perpendicular from to the x-axis; it lands at .
- Triangle has a right angle at , with and hypotenuse .
- So . The y- and z-axes give and the same way.

The angles themselves are covered on the direction cosine page.
In the tool below:
- Press "(2, 4, 4): length 6". The last readout line divides the components by 6: .
- Drag the head until the vector is : the cosines do not move.
Try It Yourself
Use the vector lab to see Direction Ratios at work: drag, change the numbers and watch what happens.
What Are the Properties of Direction Ratios?
A few properties follow straight from the word "ratio".
- Not unique. Any non-zero multiple of is another set for the same line.
- No units. Metres over metres is a pure number, so is the same in metres or feet.
- Never all zero. has no direction, so it cannot describe a line.
- Signs carry the sense. Flipping all three signs gives the same line travelled the other way.
What zeros and signs tell you
- One zero. has , so : perpendicular to the x-axis.
- Two zeros. has , : parallel to the z-axis.
- Zero in the symmetric equation of a line : a 0 denominator means "that coordinate never changes".
How Direction Ratios Test Parallel and Perpendicular Lines
Parallel lines have proportional direction ratios; perpendicular lines have .
- Parallel: if , the lines point the same (or opposite) way.
- Perpendicular: the angle between two lines comes from the dot product:
- The absolute value takes the acute angle, since a line has no preferred direction.
- exactly when the top is zero, and scaling either set cannot change zero.
- The same formula gives the angle between two lines and the angle between vectors.

Lines can also be skew: not parallel, yet never meeting. Spotting that needs a point on each line too, which is where the vector form of a line comes in.
Examples of Direction Ratios
The examples go from reading ratios off a vector to testing two lines.
Example 1
Find two sets of direction ratios for the line along , and its direction cosines.
- The components give . Doubling gives .
- Length , so the cosines are .
Example 2
Find the direction cosines of a line with direction ratios .
- Do not divide by the biggest entry: squares to 2.25, not 1.
- Divide by the length, : , or every sign flipped.
- Check: . ✓
Example 3
Find the direction ratios of the line through and .
- .
- Dividing by 2 gives the simpler set . Both are correct.
Example 4
Do , and describe the same line direction? Give the shared direction cosines.
- and : all proportional, so yes.
- Normalise : length 3, cosines . The negative set reads the line the other way.
Example 5
A line has direction ratios . Find the angles it makes with the three axes.
- Length: , so , , .
- , so , as the zero promised.
- , so ; , so .
Example 6
Are the lines with direction ratios and perpendicular? If not, find the angle between them.
- , not 0, so not perpendicular.
- , so .
Only short of a right angle, which no sketch would show.

What Are the Most Common Mistakes With Direction Ratios?
All three forget that only the proportion matters, or rush the arithmetic.
Mistake 1: Treating direction ratios as unique
Where it slips in: You get , the answer key says , and you think one is wrong.
Don't do this: "Correct" your answer, or mark the key wrong.
The correct way: Check for a multiple: , so both are right.
Mistake 2: Dividing by the wrong number to get direction cosines
Where it slips in: Converting in a hurry, dividing by the biggest entry or by .
Don't do this: Write for the ratios .
The correct way: Divide by , then confirm .
Mistake 3: Mixing the subtraction order between coordinates
Where it slips in: Finding ratios from two points, one coordinate at a time.
Don't do this: Compute for the first slot and for the second.
The correct way: Use end minus start in all three slots; a half-reversed triple is a different line.
Where Are Direction Ratios Used?
Anywhere a direction in space is stored, compared or turned into an angle.
- Cables and braces. A zip line from a tower top to an anchor , in metres, has ratios , or .
- It is m long, with cosines . It drops at an angle whose sine is : about .
- Lines and planes. A line is fixed by a point and direction ratios; a plane by a point and its normal's ratios (see the equation of a plane).
- Computer graphics. A ray from a camera through a pixel stores "pixel minus camera", a set of direction ratios.

Conclusion
- Direction ratios are any three numbers, not all zero, in proportion to the direction cosines.
- Find them from a vector's components, or by end minus start between two points.
- Divide by to get direction cosines, and check their squares add to 1.
- Proportional ratios mean parallel lines; means perpendicular lines.
Read More
Research Behind This Article
- OpenStax, Calculus Volume 3, Section 2.3: The Dot Product (direction angles, direction cosines and the identity cos²α + cos²β + cos²γ = 1). openstax.org
- OpenStax, Calculus Volume 3, Section 2.5: Equations of Lines and Planes in Space (direction vectors, parametric and symmetric equations, parallel and skew lines). openstax.org
- OpenStax, Calculus Volume 3, Section 2.2: Vectors in Three Dimensions (components, length and unit vectors in 3D). openstax.org
- OpenStax, University Physics Volume 1, Section 2.2: Coordinate Systems and Components of a Vector (resolving a vector along axes). openstax.org
- Euclid, Elements, Book I, Proposition 47 (the Pythagorean theorem, behind the length ), D. E. Joyce, Clark University. mathcs.clarku.edu
Quick Quiz: Check Yourself
Three levels, questions with figures, instant feedback with the reason.
Was this article helpful?
Your feedback helps us write better content
Frequently Asked Questions
Can direction ratios be negative?
How many sets of direction ratios does one line have?
Do direction ratios have units?
