Finding a Unit Vector

The unit vector formula

A unit vector has magnitude 1. To find the unit vector pointing the same way as any vector a⃗\vec{a}, divide by its own magnitude:

a^=a⃗∣a⃗∣\hat{a} = \dfrac{\vec{a}}{|\vec{a}|}

For a⃗=a1i^+a2j^+a3k^\vec{a} = a_1\hat{i} + a_2\hat{j} + a_3\hat{k} the magnitude is ∣a⃗∣=a12+a22+a32|\vec{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}, so the unit vector of a vector in component form is:

a^=a1i^+a2j^+a3k^a12+a22+a32\hat{a} = \dfrac{a_1\hat{i} + a_2\hat{j} + a_3\hat{k}}{\sqrt{a_1^2 + a_2^2 + a_3^2}}

The three basic unit vectors i^\hat{i}, j^\hat{j} and k^\hat{k} point along the xx-, yy- and zz-axes. The zero vector is the one vector with no unit vector, because it has no direction and ∣0⃗∣=0|\vec{0}| = 0.

Worked example

Find the unit vector in the direction of a⃗=i^+j^+2k^\vec{a} = \hat{i}+\hat{j}+2\hat{k}.

Solution: ∣a⃗∣=12+12+22=6|\vec{a}| = \sqrt{1^2+1^2+2^2} = \sqrt{6}, so:

a^=16(i^+j^+2k^)\hat{a} = \dfrac{1}{\sqrt{6}}(\hat{i}+\hat{j}+2\hat{k})

Check: (16)2+(16)2+(26)2=1+1+46=1\left(\dfrac{1}{\sqrt{6}}\right)^2 + \left(\dfrac{1}{\sqrt{6}}\right)^2 + \left(\dfrac{2}{\sqrt{6}}\right)^2 = \dfrac{1 + 1 + 4}{6} = 1.

Worked example: between two points

Find the unit vector in the direction of PQ→\overrightarrow{PQ} where P(1,2,3)P(1,2,3) and Q(4,5,6)Q(4,5,6).

Solution: PQ→\overrightarrow{PQ} is found by subtracting coordinates: (4−1,5−2,6−3)=(3,3,3)=3i^+3j^+3k^(4-1, 5-2, 6-3) = (3,3,3) = 3\hat{i}+3\hat{j}+3\hat{k}. Its magnitude is 27=33\sqrt{27} = 3\sqrt{3}, so:

PQ^=3(i^+j^+k^)33=13(i^+j^+k^)\hat{PQ} = \dfrac{3(\hat{i}+\hat{j}+\hat{k})}{3\sqrt{3}} = \dfrac{1}{\sqrt{3}}(\hat{i}+\hat{j}+\hat{k})

Worked example: scaling to a target magnitude

Find a vector in the direction of a⃗=i^−2j^\vec{a} = \hat{i}-2\hat{j} with magnitude 7.

Solution: First find the unit vector, then scale it up to magnitude 7. ∣a⃗∣=1+4=5|\vec{a}| = \sqrt{1+4} = \sqrt{5}:

7a^=7⋅i^−2j^5=75i^−145j^7\hat{a} = 7\cdot\dfrac{\hat{i}-2\hat{j}}{\sqrt{5}} = \dfrac{7}{\sqrt{5}}\hat{i} - \dfrac{14}{\sqrt{5}}\hat{j}

Worked example: along the sum of two vectors

Find the unit vector in the direction of a⃗+b⃗\vec{a} + \vec{b}, where a⃗=2i^+4j^−5k^\vec{a} = 2\hat{i} + 4\hat{j} - 5\hat{k} and b⃗=i^+2j^+3k^\vec{b} = \hat{i} + 2\hat{j} + 3\hat{k}.

Solution: Add first, then divide by the magnitude of the sum:

a⃗+b⃗=3i^+6j^−2k^,∣a⃗+b⃗∣=9+36+4=7\vec{a} + \vec{b} = 3\hat{i} + 6\hat{j} - 2\hat{k}, \qquad |\vec{a} + \vec{b}| = \sqrt{9 + 36 + 4} = 7a⃗+b⃗∣a⃗+b⃗∣=37i^+67j^−27k^\dfrac{\vec{a} + \vec{b}}{|\vec{a} + \vec{b}|} = \dfrac{3}{7}\hat{i} + \dfrac{6}{7}\hat{j} - \dfrac{2}{7}\hat{k}

Worked example: perpendicular to two vectors

Find a unit vector perpendicular to both a⃗=i^+j^+k^\vec{a} = \hat{i} + \hat{j} + \hat{k} and b⃗=i^−j^\vec{b} = \hat{i} - \hat{j}.

Solution: The cross product a⃗×b⃗\vec{a} \times \vec{b} is perpendicular to both, so divide it by its magnitude:

a⃗×b⃗=∣i^j^k^1111−10∣=i^+j^−2k^,∣a⃗×b⃗∣=6\vec{a} \times \vec{b} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ 1 & 1 & 1 \\ 1 & -1 & 0 \end{vmatrix} = \hat{i} + \hat{j} - 2\hat{k}, \qquad |\vec{a} \times \vec{b}| = \sqrt{6}±16(i^+j^−2k^)\pm\dfrac{1}{\sqrt{6}}(\hat{i} + \hat{j} - 2\hat{k})

There are two answers, pointing opposite ways. Check: (1)(1)+(1)(1)+(−2)(1)=0(1)(1) + (1)(1) + (-2)(1) = 0 and (1)(1)+(1)(−1)+(−2)(0)=0(1)(1) + (1)(-1) + (-2)(0) = 0, so it is perpendicular to both.

Unit vectors and direction cosines

The components of a unit vector are its direction cosines: if a^\hat{a} makes angles α\alpha, β\beta, γ\gamma with the axes, then a^=cos⁡α i^+cos⁡β j^+cos⁡γ k^\hat{a} = \cos\alpha\,\hat{i} + \cos\beta\,\hat{j} + \cos\gamma\,\hat{k}, which is why cos⁡2α+cos⁡2β+cos⁡2γ=1\cos^2\alpha + \cos^2\beta + \cos^2\gamma = 1. For the first example, the direction cosines are 16\dfrac{1}{\sqrt{6}}, 16\dfrac{1}{\sqrt{6}} and 26\dfrac{2}{\sqrt{6}}.

Common mistakes

  • Dividing by the squared magnitude. Divide by ∣a⃗∣=a12+a22+a32|\vec{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}, not by a12+a22+a32a_1^2 + a_2^2 + a_3^2.
  • Not checking the answer. The squares of a unit vector's components must add to 1. 12i^+12j^+12k^\tfrac{1}{2}\hat{i} + \tfrac{1}{2}\hat{j} + \tfrac{1}{2}\hat{k} fails: its magnitude is 32\tfrac{\sqrt{3}}{2}.
  • Giving one answer for "perpendicular to both". b⃗×a⃗\vec{b} \times \vec{a} points the opposite way, so both signs are correct unless the question fixes a direction.
  • Subtracting the wrong way. PQ→=Q−P\overrightarrow{PQ} = Q - P. Using P−QP - Q gives the unit vector pointing back from QQ to PP.

Where this comes up in exams

The 2025-26 CBSE Class XII syllabus lists unit vectors among the types of vectors, along with direction cosines and the scalar and vector products. JEE Main 2026's vector algebra unit lists components of a vector and the scalar and vector products, and JEE Advanced 2026 lists dot and cross products, which the examples above use.

Checked against CBSE Mathematics curriculum, Classes XI-XII (2025-26), JEE (Main) 2026 syllabus (NTA) and JEE (Advanced) 2026 syllabus. Syllabi can change from year to year, so confirm with the latest official notification for your exam.

Continue learning

Dividing by a vector's magnitude is the same normalization step used when finding the projection of one vector onto another.