Vector operations

A vector carries two pieces of information at once — how much and which way — and everything in Class 12 vector algebra, from the dot product to the equation of a line in space, is built on top of the small toolkit covered here: writing a vector in component form using i^,j^,k^\hat i, \hat j, \hat k, finding its magnitude and direction, and combining two or more vectors by addition, subtraction, and scalar multiplication. This is the opening theme of the optional Vector Algebra unit (Section B), and it is deliberately computational — proofs of geometry theorems using vectors sit outside the syllabus. Get comfortable here first: direction cosines, position vectors, and the scalar-multiple test for collinear points reappear constantly once products of vectors are introduced.

The core insight

A vector in component form a⃗=a1i^+a2j^+a3k^\vec a = a_1\hat i + a_2\hat j + a_3\hat k is added, subtracted, and scaled term-by-term, its magnitude is ∣a⃗∣=a12+a22+a32|\vec a| = \sqrt{a_1^2+a_2^2+a_3^2}, and its direction is fixed by direction cosines l,m,nl,m,n satisfying l2+m2+n2=1l^2+m^2+n^2=1.

The core idea

A vector a⃗\vec a in three dimensions is written in component form using the unit vectors i^,j^,k^\hat i, \hat j, \hat k along the xx, yy, zz axes:

a⃗=a1i^+a2j^+a3k^.\vec a = a_1\hat i + a_2\hat j + a_3\hat k.

Its magnitude — a nonnegative scalar, never a vector — is

∣a⃗∣=a12+a22+a32.|\vec a| = \sqrt{a_1^2 + a_2^2 + a_3^2}.

where: a1,a2,a3a_1, a_2, a_3 are the scalar components of a⃗\vec a along the three axes.

Direction cosines and ratios. The direction cosines l,m,nl, m, n of a⃗\vec a are the cosines of the angles it makes with the xx, yy, zz axes, so l=a1/∣a⃗∣l = a_1/|\vec a|, m=a2/∣a⃗∣m = a_2/|\vec a|, n=a3/∣a⃗∣n = a_3/|\vec a|, and they always satisfy l2+m2+n2=1l^2+m^2+n^2=1 (proved below). Any numbers merely proportional to l,m,nl, m, n — that is, proportional to a1,a2,a3a_1, a_2, a_3 — are direction ratios; they fix the direction but need not satisfy the identity.

Special vectors. a⃗\vec a is a unit vector if ∣a⃗∣=1|\vec a| = 1, and the unit vector along any nonzero a⃗\vec a is a^=a⃗/∣a⃗∣\hat a = \vec a/|\vec a|. The zero vector 0⃗\vec 0 has zero magnitude and no defined direction. Two vectors are equal only if they share both magnitude and direction. Two nonzero vectors are parallel (or collinear) if one is a scalar multiple of the other: b⃗=ka⃗\vec b = k\vec a.

Points to vectors. If P(x1,y1,z1)P(x_1,y_1,z_1) and Q(x2,y2,z2)Q(x_2,y_2,z_2) are two points, PQ⃗=(x2−x1)i^+(y2−y1)j^+(z2−z1)k^\vec{PQ} = (x_2-x_1)\hat i + (y_2-y_1)\hat j + (z_2-z_1)\hat k; note PQ⃗=−QP⃗\vec{PQ} = -\vec{QP}. The position vector of PP is OP⃗\vec{OP}, measured from the origin OO.

Addition, subtraction, scalar multiplication all act component-wise: for a⃗=a1i^+a2j^+a3k^\vec a = a_1\hat i+a_2\hat j+a_3\hat k and b⃗=b1i^+b2j^+b3k^\vec b = b_1\hat i+b_2\hat j+b_3\hat k,

a⃗±b⃗=(a1±b1)i^+(a2±b2)j^+(a3±b3)k^,ka⃗=ka1i^+ka2j^+ka3k^.\vec a \pm \vec b = (a_1\pm b_1)\hat i + (a_2\pm b_2)\hat j + (a_3\pm b_3)\hat k, \qquad k\vec a = ka_1\hat i + ka_2\hat j + ka_3\hat k.

where: kk is a real scalar; ka⃗k\vec a scales the magnitude by ∣k∣|k| and flips the direction when k<0k<0. The negative −a⃗-\vec a has the same magnitude as a⃗\vec a but points the opposite way.

Figure
Two vectors a and b added tip to tail to give the resultant vector a plus b by the triangle law
Triangle law of vector addition a b a + b Place b at the tip of a; the resultant runs from the tail of a to the tip of b
Derivation AWhy the direction cosines satisfy l squared plus m squared plus n squared equals 1

The goal is to show, starting only from the definitions l=a1/∣a⃗∣l=a_1/|\vec a|, m=a2/∣a⃗∣m=a_2/|\vec a|, n=a3/∣a⃗∣n=a_3/|\vec a| and the magnitude formula ∣a⃗∣=a12+a22+a32|\vec a|=\sqrt{a_1^2+a_2^2+a_3^2}, that these three ratios always satisfy the identity l2+m2+n2=1l^2+m^2+n^2=1 for any nonzero vector a⃗\vec a, which is why the identity can be used as a quick check on any set of direction cosines a student computes.

Step 1. Write each direction cosine as a ratio of a component to the magnitude: l=a1∣a⃗∣l = \dfrac{a_1}{|\vec a|}, m=a2∣a⃗∣m = \dfrac{a_2}{|\vec a|}, n=a3∣a⃗∣n = \dfrac{a_3}{|\vec a|}. These are exactly the definitions given above — nothing new is assumed yet.

Step 2. Square each ratio and add them together: l2+m2+n2=a12∣a⃗∣2+a22∣a⃗∣2+a32∣a⃗∣2=a12+a22+a32∣a⃗∣2l^2+m^2+n^2 = \dfrac{a_1^2}{|\vec a|^2} + \dfrac{a_2^2}{|\vec a|^2} + \dfrac{a_3^2}{|\vec a|^2} = \dfrac{a_1^2+a_2^2+a_3^2}{|\vec a|^2}. All three fractions share the same denominator ∣a⃗∣2|\vec a|^2, so they combine into a single fraction.

Step 3. Substitute the magnitude formula. Since ∣a⃗∣2=a12+a22+a32|\vec a|^2 = a_1^2+a_2^2+a_3^2 by definition, the numerator and denominator of the fraction from Step 2 are identical: l2+m2+n2=a12+a22+a32a12+a22+a32=1l^2+m^2+n^2 = \dfrac{a_1^2+a_2^2+a_3^2}{a_1^2+a_2^2+a_3^2} = 1.

Step 4. Read the result. The identity holds for every nonzero vector regardless of its individual components, which is why it is used as a built-in consistency check: if a computed set of l,m,nl, m, n does not satisfy l2+m2+n2=1l^2+m^2+n^2=1, an arithmetic error has been made somewhere upstream.

Worked example

Let a⃗=2i^−j^+3k^\vec a = 2\hat i - \hat j + 3\hat k and b⃗=−i^+4j^−2k^\vec b = -\hat i + 4\hat j - 2\hat k, the same vectors used to introduce this topic. Find a⃗−2b⃗\vec a - 2\vec b, the magnitude and direction cosines of a⃗\vec a, and then use those results to test whether a⃗\vec a is parallel to c⃗=−4i^+2j^−6k^\vec c = -4\hat i + 2\hat j - 6\hat k.

Step 1 — subtract a scalar multiple. 2b⃗=−2i^+8j^−4k^2\vec b = -2\hat i + 8\hat j - 4\hat k, so a⃗−2b⃗=(2−(−2))i^+(−1−8)j^+(3−(−4))k^=4i^−9j^+7k^\vec a - 2\vec b = (2-(-2))\hat i + (-1-8)\hat j + (3-(-4))\hat k = 4\hat i - 9\hat j + 7\hat k.

Step 2 — magnitude and direction cosines of a⃗\vec a. ∣a⃗∣=22+(−1)2+32=14|\vec a| = \sqrt{2^2+(-1)^2+3^2} = \sqrt{14}, so l=214l = \dfrac{2}{\sqrt{14}}, m=−114m = \dfrac{-1}{\sqrt{14}}, n=314n = \dfrac{3}{\sqrt{14}}. Check: l2+m2+n2=4+1+914=1l^2+m^2+n^2 = \dfrac{4+1+9}{14} = 1, confirming the identity from the derivation.

Step 3 — test a⃗\vec a against c⃗\vec c for a scalar multiple. c⃗=−4i^+2j^−6k^=−2(2i^−j^+3k^)=−2a⃗\vec c = -4\hat i+2\hat j-6\hat k = -2(2\hat i-\hat j+3\hat k) = -2\vec a. Since c⃗\vec c is a scalar multiple of a⃗\vec a with k=−2k=-2, the two vectors are parallel (in fact anti-parallel, since k<0k<0).

Answer: a⃗−2b⃗=4i^−9j^+7k^\vec a - 2\vec b = 4\hat i - 9\hat j + 7\hat k; ∣a⃗∣=14|\vec a| = \sqrt{14} with direction cosines (214,−114,314)\left(\dfrac{2}{\sqrt{14}}, \dfrac{-1}{\sqrt{14}}, \dfrac{3}{\sqrt{14}}\right); and c⃗=−2a⃗\vec c = -2\vec a, so a⃗∥c⃗\vec a \parallel \vec c.

Common traps

  • Treating a⃗\vec a and ∣a⃗∣|\vec a| as interchangeable — one is a vector, the other a nonnegative scalar; never add a vector to a number.
  • Reporting direction ratios as if they were direction cosines without dividing by ∣a⃗∣|\vec a| — only direction cosines satisfy l2+m2+n2=1l^2+m^2+n^2=1.
  • Getting the order wrong in PQ⃗\vec{PQ}: it is final point minus initial point, and PQ⃗=−QP⃗\vec{PQ} = -\vec{QP}.
  • Assuming equal magnitude means equal vectors — direction must match too, and for collinearity the scalar multiple must be checked component-by-component, not just approximately.

Ask the tutor: if you want to see how this same direction-cosine and collinearity toolkit extends once the dot and cross products are introduced, ask the AI tutor to walk through a mixed problem.

What is actually the difference between direction cosines and direction ratios?

Direction cosines are the specific numbers l=a1/∣a⃗∣l = a_1/|\vec a|, m=a2/∣a⃗∣m = a_2/|\vec a|, n=a3/∣a⃗∣n = a_3/|\vec a| obtained by dividing each component by the vector's magnitude, and they always satisfy l2+m2+n2=1l^2+m^2+n^2=1. Direction ratios are any three numbers proportional to a1,a2,a3a_1, a_2, a_3 — for instance the raw components themselves — that fix the same direction but are not normalised, so they generally do not satisfy that identity. If a question just says find the direction, giving direction ratios is fine unless it specifically asks for direction cosines.

Why does the scalar-multiple test prove three points are collinear?

Two vectors are parallel exactly when one is a scalar multiple of the other, because scaling a vector only changes its length (and possibly flips it), never its line of action. If AB⃗=k AC⃗\vec{AB} = k\,\vec{AC} for some scalar kk, then BB and CC both lie on the line through AA in the direction of that common vector, so all three points share one line — that is the definition of collinear. The test fails to prove collinearity if the ratios of corresponding components are not all equal, since then no single kk works.

Do I need to memorise the direction cosine identity proof for the exam?

The proof itself is short enough that it is worth knowing it can be derived, but most questions simply ask you to compute l,m,nl, m, n from a given vector and use l2+m2+n2=1l^2+m^2+n^2=1 as a self-check, not to reproduce the derivation. Where it does matter is in mixed problems that give you two of l,m,nl, m, n and ask for the third — there you substitute into the identity and solve, which only works if you trust it always equals exactly 1.

Before this

Where this leads