On this page
"Find a unit vector that makes equal angles with the coordinate axes" is a short, standard question in Class 12 vector algebra and useful practice for JEE Main. Many students write 45° without thinking, because that is the answer for a line halfway between two axes on a flat page. In three dimensions the answer changes. Below is the reasoning, a worked solution and a quick check you can run in the exam hall.
What are direction cosines of a vector?
The NCERT Class 12 Mathematics textbook (Chapter 10, Vector Algebra) defines them like this. If a vector makes angles α, β and γ with the positive x, y and z axes, then cos α, cos β and cos γ are its direction cosines, written l, m and n.
The same chapter notes that l² + m² + n² = 1 for every vector (NCERT, Chapter 10). It also states that lî + mĵ + nk̂ is the unit vector in that direction. That one identity solves the whole problem.
If you want a fuller refresher on finding l, m and n from any vector or line, read our guide to direction cosines and direction ratios, step by step.
How do you find the unit vector making equal angles with the axes?
Let the angle with each axis be α. Then l = m = n = cos α.
Use l² + m² + n² = 1. This gives 3cos²α = 1.
So cos²α = 1/3, and cos α = ±1/√3.
The unit vector is lî + mĵ + nk̂ = ±(1/√3)(î + ĵ + k̂).
The angle with each axis is α = cos⁻¹(1/√3) for the + sign, or cos⁻¹(−1/√3) for the − sign.
To check, the magnitude of (î + ĵ + k̂)/√3 is √(1/3 + 1/3 + 1/3) = 1, so it really is a unit vector. NCERT asks you to show that î + ĵ + k̂ is equally inclined to OX, OY and OZ (Exercise 10.2, Question 14, in the same chapter). Dividing that vector by its length √3 gives exactly this answer.
Numerically, cos⁻¹(1/√3) is about 54.7°, a value known in NMR spectroscopy as the magic angle (Wikipedia: Magic angle). The opposite vector, −(î + ĵ + k̂)/√3, makes about 125.3° with each axis, which is 180° − 54.7°. Most questions accept both signs, so give both unless the question says "acute angles".
That cube picture comes from the same magic angle page. It also shows why 45° fails: a face diagonal makes 45° with two edges but 90° with the third, while the body diagonal sits at 54.7° to all three.
Why is the angle not 45°?
In two dimensions, a line equally inclined to the x and y axes needs only cos²α + cos²α = 1. That gives cos α = 1/√2, which is 45°. Your memory of 45° comes from there.
In three dimensions there is a third square in the sum. Suppose all three angles were 45°. Then l² + m² + n² = 1/2 + 1/2 + 1/2 = 3/2, which breaks the rule that the sum must be 1 (NCERT, Chapter 10). So no vector makes 45° with all three axes. Sharing the total of 1 three ways leaves 1/3 for each square, and that forces the larger angle.
The same identity handles the common twist. Say a vector makes 45° with the x axis and 60° with the y axis. Then cos²γ = 1 − 1/2 − 1/4 = 1/4. So cos γ = ±1/2, and γ is 60° or 120°.
A 30-second check before you move on
Run these four checks on any direction-cosine answer.
Squares: do l², m² and n² add up to exactly 1? If not, the answer is wrong.
Signs: have you written both ± options, or justified dropping one?
Form: did the question ask for a unit vector, the angle, or the direction cosines? "(1/√3, 1/√3, 1/√3)" and "cos⁻¹(1/√3)" are different answers.
No 45° trap: if three equal angles came out as 45°, you used the 2D rule by mistake.
The next questions in this chapter use the same tools. Try the angle between two lines in 3D from direction ratios, or finding the unit vector along the sum of two vectors.
If you keep reaching for the right formula but setting it up wrongly, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. If direction cosines themselves still feel shaky, the Fermi Concept Library gives every concept in mathematics its own lesson and its place in the map.



