PYQ Vault

CBSE Class 12 Maths · Vector Algebra

Components and Direction Cosines

A vector is written xi + yj + zk; its magnitude is the square root of x² + y² + z², the vector from P to Q is the position vector of Q minus that of P, and its direction cosines are its components divided by its magnitude.

Why this matters

41 questions, fourteen of them from board papers. In 2022 the board asked for all vectors of length 5√3 equally inclined to the axes, and asked it again twice in 2025. In 2023 it asked for a unit vector along PQ, the direction cosines of BA, the value that makes a vector equally inclined to the axes, the magnitude of a vector, the angle with the z-axis when the other two are given, and to show a triangle isosceles from position vectors. In 2024 it asked for the vector from an initial to a terminal point. In 2026 it asked for a vector of length 14 along QP, the third angle and the components of a unit vector, an unknown coordinate from a length of 25, and a vector of length 3 equally inclined to two axes. The textbook adds Examples 4 to 10, 12 and 26, most of Exercise 10.2, Exercise 10.4 Question 3 and four Miscellaneous questions.

Concept 1 of 3: Components, magnitude and the unit vector

The point P(x,y,z)(x, y, z) has position vector OP→=xi^+yj^+zk^\overrightarrow{OP} = x\hat{i} + y\hat{j} + z\hat{k}. The numbers x,y,zx, y, z are its scalar components; xi^,yj^,zk^x\hat{i}, y\hat{j}, z\hat{k} are its vector components. Its length comes from Pythagoras in three dimensions. Dividing a vector by its own length keeps its direction and makes its length 1.

Definition

  • r⃗=xi^+yj^+zk^\vec{r} = x\hat{i} + y\hat{j} + z\hat{k} has magnitude ∣r⃗∣=x2+y2+z2|\vec{r}| = \sqrt{x^2 + y^2 + z^2}.
  • Scalar components are x,y,zx, y, z; vector components are xi^,yj^,zk^x\hat{i}, y\hat{j}, z\hat{k}.
  • Equal vectors have equal corresponding components. Equal magnitudes alone do not make vectors equal.
  • Unit vector along a⃗\vec{a}: a^=a⃗∣a⃗∣\hat{a} = \dfrac{\vec{a}}{|\vec{a}|}. A vector of magnitude kk along a⃗\vec{a} is ka^k\hat{a}.
  • A unit vector in the XY-plane at angle θ\theta to the x-axis is cos⁡θ i^+sin⁡θ j^\cos\theta\,\hat{i} + \sin\theta\,\hat{j}.

Magnitude and unit vector

∣r⃗∣=x2+y2+z2,a^=a⃗∣a⃗∣|\vec{r}| = \sqrt{x^2 + y^2 + z^2}, \qquad \hat{a} = \dfrac{\vec{a}}{|\vec{a}|}

Worked example

Find the unit vector in the direction of a⃗+b⃗\vec{a} + \vec{b}, where a⃗=3i^−j^+2k^\vec{a} = 3\hat{i} - \hat{j} + 2\hat{k} and b⃗=−i^+3j^−k^\vec{b} = -\hat{i} + 3\hat{j} - \hat{k}.
Practise this conceptself-check · 3 quick reps

The same idea in a real exam question:

CBSE Class 12 · 2026 · 65/5/1 · Q16Easy

Example 1 · Vector Algebra · Components and Direction Cosines

If position vector p⃗\vec{p} of a point (24, n) is such that ∣p⃗∣=25|\vec{p}| = 25, then the value of n is :

Scalar components with a hat

Scalar components are plain numbers (−5-5 and 6). Vector components carry the unit vectors (−5i^-5\hat{i} and 6j^6\hat{j}). Mixing them loses the mark.

Equal length is not equal vector

i^+2j^\hat{i} + 2\hat{j} and 2i^+j^2\hat{i} + \hat{j} both have length 5\sqrt{5}, but they are not equal: their components differ.

Forgetting the plus or minus

Solving x2=16x^2 = 16 gives x=±4x = \pm 4. Keep both values unless the question rules one out.

Concept 2 of 3: The vector joining two points

To go from P to Q, subtract the coordinates of the start from the coordinates of the end. The order matters: PQ→\overrightarrow{PQ} and QP→\overrightarrow{QP} have the same length and opposite signs. Its length is the distance PQ, and dividing by that length gives the unit vector along PQ.

Definition

  • For P(x1,y1,z1)(x_1, y_1, z_1) and Q(x2,y2,z2)(x_2, y_2, z_2): PQ→=(x2−x1)i^+(y2−y1)j^+(z2−z1)k^\overrightarrow{PQ} = (x_2 - x_1)\hat{i} + (y_2 - y_1)\hat{j} + (z_2 - z_1)\hat{k}.
  • Distance: PQ=∣PQ→∣=(x2−x1)2+(y2−y1)2+(z2−z1)2PQ = |\overrightarrow{PQ}| = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}.
  • "Initial point B, terminal point A" means the vector BA→\overrightarrow{BA} = (A) minus (B).
  • Vector of length kk along PQ: kPQ→∣PQ→∣k \dfrac{\overrightarrow{PQ}}{|\overrightarrow{PQ}|}.
  • Side lengths found this way show a triangle is isosceles or right-angled.

Vector from P to Q

PQ→=(x2−x1)i^+(y2−y1)j^+(z2−z1)k^\overrightarrow{PQ} = (x_2 - x_1)\hat{i} + (y_2 - y_1)\hat{j} + (z_2 - z_1)\hat{k}
  • (x1,y1,z1)(x_1, y_1, z_1)the initial point P
  • (x2,y2,z2)(x_2, y_2, z_2)the terminal point Q

Worked example

Find a vector of magnitude 9 units in the direction of AB→\overrightarrow{AB}, where A is (1,0,−2)(1, 0, -2) and B is (3,4,2)(3, 4, 2).
Practise this conceptself-check · 3 quick reps

The same idea in a real exam question:

CBSE Class 12 · 2026 · 65/1/1 · Q23Easy

Example 2 · Vector Algebra · Components and Direction Cosines

Find the vector of magnitude 14 in the direction of QP→\overrightarrow{QP}, where P and Q are the points (1, 3, 2) and (-1, 0, 8) respectively.

Start minus end

QP→\overrightarrow{QP} is P minus Q. Subtracting the other way gives the opposite vector, and every sign in the answer is then wrong.

Initial and terminal swapped

When a question names the terminal point first, read it again: the vector still runs from the initial point to the terminal point.

Concept 3 of 3: Direction cosines and equally inclined vectors

A vector makes angles α,β,γ\alpha, \beta, \gamma with the positive x, y and z axes. Their cosines l,m,nl, m, n are the components of the unit vector along it, so l2+m2+n2=1l^2 + m^2 + n^2 = 1. Any numbers proportional to l,m,nl, m, n, such as the components themselves, are direction ratios. Knowing two angles fixes the third up to a sign.

Definition

  • l=cos⁡αl = \cos\alpha, m=cos⁡βm = \cos\beta, n=cos⁡γn = \cos\gamma are the direction cosines; l2+m2+n2=1l^2 + m^2 + n^2 = 1.
  • For r⃗=ai^+bj^+ck^\vec{r} = a\hat{i} + b\hat{j} + c\hat{k}: direction ratios a,b,ca, b, c; direction cosines a∣r⃗∣,b∣r⃗∣,c∣r⃗∣\dfrac{a}{|\vec{r}|}, \dfrac{b}{|\vec{r}|}, \dfrac{c}{|\vec{r}|}.
  • A unit vector is li^+mj^+nk^l\hat{i} + m\hat{j} + n\hat{k}; a vector of magnitude rr is r(li^+mj^+nk^)r(l\hat{i} + m\hat{j} + n\hat{k}).
  • Equally inclined to the axes: l=m=n=±13l = m = n = \pm\dfrac{1}{\sqrt{3}}.
  • Perpendicular to an axis means the cosine for that axis is 0.

Direction cosines

l2+m2+n2=1,r⃗=∣r⃗∣ (li^+mj^+nk^)l^2 + m^2 + n^2 = 1, \qquad \vec{r} = |\vec{r}|\,(l\hat{i} + m\hat{j} + n\hat{k})
  • l,m,nl, m, ncosines of the angles with the x, y and z axes

Worked example

A vector r⃗\vec{r} of magnitude 6 makes an angle π3\dfrac{\pi}{3} with the x-axis, 2π3\dfrac{2\pi}{3} with the y-axis and an acute angle γ\gamma with the z-axis. Find γ\gamma and r⃗\vec{r}.
Practise this conceptself-check · 3 quick reps

The same idea in a real exam question:

CBSE Class 12 · 2026 · 65/4/1 · 25 (b)Moderate

Example 3 · Vector Algebra · Components and Direction Cosines

A unit vector a⃗\vec{a} is such that it makes an angle π4\dfrac{\pi}{4} with x-axis, π3\dfrac{\pi}{3} with y-axis and an acute angle θ\theta with z-axis. Find θ\theta and the components of a⃗\vec{a}.

Ratios written as cosines

Direction ratios −2,−2,−1-2, -2, -1 are not direction cosines. Divide by the magnitude 3 and check that the squares add up to 1.

Losing the negative root

Equally inclined gives l=m=n=±13l = m = n = \pm\dfrac{1}{\sqrt{3}}. Unless the angles are said to be acute, write both vectors.

Reversing the vector

The direction cosines of BA→\overrightarrow{BA} are those of AB→\overrightarrow{AB} with every sign changed. Read which way the vector runs.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (3)

  • Components, magnitude and the unit vector

    Magnitude and unit vector

    ∣r⃗∣=x2+y2+z2,a^=a⃗∣a⃗∣|\vec{r}| = \sqrt{x^2 + y^2 + z^2}, \qquad \hat{a} = \dfrac{\vec{a}}{|\vec{a}|}
  • The vector joining two points

    Vector from P to Q

    PQ→=(x2−x1)i^+(y2−y1)j^+(z2−z1)k^\overrightarrow{PQ} = (x_2 - x_1)\hat{i} + (y_2 - y_1)\hat{j} + (z_2 - z_1)\hat{k}
  • Direction cosines and equally inclined vectors

    Direction cosines

    l2+m2+n2=1,r⃗=∣r⃗∣ (li^+mj^+nk^)l^2 + m^2 + n^2 = 1, \qquad \vec{r} = |\vec{r}|\,(l\hat{i} + m\hat{j} + n\hat{k})

Watch out for (8)

Test yourself on Vector Algebra

20 past CBSE Class 12 questions from this chapter, timed at 30 minutes and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.