Basic concepts of vectors

A displacement of "5 km" is incomplete without a direction — "5 km northeast" is a vector; "5 km" alone is a scalar. Vectors carry both magnitude and direction, and they are the language the rest of Class 12 vector algebra is written in: before you can add vectors, project one onto another, or compute a dot or cross product, you need to know how to describe a vector algebraically. This section builds that vocabulary — the directed segment AB→\overrightarrow{AB}, the position vector r⃗=xi^+yj^+zk^\vec r = x\hat i+y\hat j+z\hat k that pins a point P(x,y,z)P(x,y,z) relative to a fixed origin, its magnitude ∣r⃗∣|\vec r|, and the direction cosines l,m,nl,m,n that record exactly which way it points. Every later chapter — section formula, dot product, cross product, lines and planes in 3D — leans on this vocabulary without re-explaining it.

The core insight

A vector is fixed by an ordered triple of components (x,y,z)(x,y,z), from which its magnitude x2+y2+z2\sqrt{x^2+y^2+z^2} and its direction cosines l,m,nl,m,n (satisfying l2+m2+n2=1l^2+m^2+n^2=1) are both computed directly.

The core idea

Scalar vs vector. A scalar has magnitude only — mass, temperature, distance, speed. A vector has magnitude and direction — displacement, velocity, force, acceleration. Geometrically a vector is drawn as a directed line segment: if the tail (initial point) is AA and the head (terminal point) is BB, the vector is AB→\overrightarrow{AB}, and its magnitude ∣AB→∣|\overrightarrow{AB}| is the length of segment ABAB. Two arrows of the same length pointing the same way represent the same vector, no matter where in space they are drawn — a vector is defined purely by length and orientation, not by position.

Position vector. To pin a vector to an actual location, fix an origin OO. For a point P(x,y,z)P(x,y,z), the vector OP→\overrightarrow{OP} is the position vector of PP:

r⃗=OP→=xi^+yj^+zk^,\vec r = \overrightarrow{OP} = x\hat i + y\hat j + z\hat k,

where i^,j^,k^\hat i,\hat j,\hat k are the unit vectors along the xx, yy, zz axes (each of magnitude 1). The magnitude of this position vector follows from a 3D extension of Pythagoras:

∣r⃗∣=x2+y2+z2.|\vec r| = \sqrt{x^2+y^2+z^2}.

This single formula is used everywhere downstream — it is exactly how you will later compute ∣a⃗−b⃗∣|\vec a - \vec b|, the distance between two points, or the length of a vector obtained by adding two others.

Direction cosines and direction ratios. Suppose r⃗\vec r makes angles α,β,γ\alpha,\beta,\gamma with the positive xx, yy, zz axes. The cosines of these angles, l=cos⁡αl=\cos\alpha, m=cos⁡βm=\cos\beta, n=cos⁡γn=\cos\gamma, are the direction cosines of the vector — they encode its orientation independent of its length. Any triple of numbers proportional to l,m,nl,m,n — most conveniently the components x,y,zx,y,z themselves — are called direction ratios. Direction ratios are not unique (any nonzero scalar multiple describes the same line direction), but direction cosines are unique for a given direction and always satisfy l2+m2+n2=1l^2+m^2+n^2=1.

Figure
A position vector from the origin to point P with its x y and z components shown as a right angled box, alongside the angles alpha beta gamma it makes with the three axes
Position vector r = OP, its components, and its direction cosines x z y O P(x, y, z) x-component z-component alpha gamma beta r = x i + y j + z k, |r| = square root of x squared plus y squared plus z squared

Direction cosines satisfy l squared plus m squared plus n squared equals one

The goal is to show, using only the magnitude formula for a position vector and the definition of a direction cosine as the ratio of a component to the magnitude, that the three direction cosines of any vector always satisfy l2+m2+n2=1l^2+m^2+n^2=1 — a check that catches almost every arithmetic slip in this topic.

Step 1. Start from a vector r⃗=xi^+yj^+zk^\vec r = x\hat i + y\hat j + z\hat k with magnitude r=∣r⃗∣=x2+y2+z2r = |\vec r| = \sqrt{x^2+y^2+z^2}. By definition, the direction cosines are the components divided by the magnitude: l=xrl = \dfrac{x}{r}, m=yrm = \dfrac{y}{r}, n=zrn = \dfrac{z}{r}. This is exactly saying each direction cosine is "how much of the total length lies along that axis," as a fraction.

Step 2. Square each and add them: l2+m2+n2=x2r2+y2r2+z2r2=x2+y2+z2r2.l^2+m^2+n^2 = \dfrac{x^2}{r^2}+\dfrac{y^2}{r^2}+\dfrac{z^2}{r^2} = \dfrac{x^2+y^2+z^2}{r^2}.

Step 3. Recognize the numerator. Since r2=x2+y2+z2r^2 = x^2+y^2+z^2 by the magnitude formula, the numerator and denominator are identical: l2+m2+n2=r2r2=1.l^2+m^2+n^2 = \dfrac{r^2}{r^2} = 1.

Step 4. Read the result. This identity holds for every vector, regardless of its actual length — because dividing by rr before squaring and adding rescales the vector to a length-1 (unit) vector, and a unit vector's own components must satisfy Pythagoras with total 1. Use l2+m2+n2=1l^2+m^2+n^2=1 as a built-in error check: after computing direction cosines from any vector, plug them back in — if the sum of squares is not 1, a component or the magnitude was computed wrong.

Worked example

Find the magnitude and direction cosines of a⃗=2i^−3j^+6k^\vec a = 2\hat i - 3\hat j + 6\hat k, then verify the identity, and use the same vector to find the angle it makes with the yy-axis.

Step 1. Magnitude: ∣a⃗∣=22+(−3)2+62=4+9+36=49=7.|\vec a| = \sqrt{2^2+(-3)^2+6^2} = \sqrt{4+9+36} = \sqrt{49} = 7.

Step 2. Direction ratios are just the components themselves: 2,−3,62, -3, 6.

Step 3. Direction cosines — divide each component by the magnitude: l=27l = \dfrac{2}{7}, m=−37m = \dfrac{-3}{7}, n=67n = \dfrac{6}{7}.

Step 4. Verify the identity: l2+m2+n2=449+949+3649=4949=1l^2+m^2+n^2 = \dfrac{4}{49}+\dfrac{9}{49}+\dfrac{36}{49} = \dfrac{49}{49} = 1. Checks out.

Step 5. Angle with the yy-axis: m=cos⁡β=−37m = \cos\beta = -\dfrac{3}{7}, so β=cos⁡−1 ⁣(−37)≈115.4∘\beta = \cos^{-1}\!\left(-\dfrac{3}{7}\right) \approx 115.4^\circ. The negative cosine correctly signals an obtuse angle — a⃗\vec a points somewhat "backward" along yy, matching its negative yy-component.

a⃗\vec a has magnitude 7, direction cosines (27,−37,67)\left(\dfrac{2}{7}, -\dfrac{3}{7}, \dfrac{6}{7}\right), and makes an angle of about 115.4∘115.4^\circ with the positive yy-axis.

Competitive stretch

If a vector has direction cosines proportional to 1,2,−21, 2, -2 and magnitude 99, find the vector. First scale to actual direction cosines: r=12+22+(−2)2=9=3r=\sqrt{1^2+2^2+(-2)^2}=\sqrt{9}=3, so l=13,m=23,n=−23l=\tfrac13, m=\tfrac23, n=-\tfrac23. Multiply by the given magnitude 99: components are 9l=39l=3, 9m=69m=6, 9n=−69n=-6, giving v⃗=3i^+6j^−6k^\vec v = 3\hat i+6\hat j-6\hat k. Check: 32+62+62=9+36+36=81=9\sqrt{3^2+6^2+6^2}=\sqrt{9+36+36}=\sqrt{81}=9. ✓

Common traps

  • Treating components as direction cosines directly. (x,y,z)(x,y,z) are direction ratios; you must divide by ∣r⃗∣|\vec r| to get true direction cosines, unless the vector already has magnitude 1.
  • Forgetting direction ratios are not unique. (2,−3,6)(2,-3,6) and (4,−6,12)(4,-6,12) describe the same direction; only direction cosines are unique for a given direction.
  • Writing a⃗=7\vec a = 7. Magnitude is a scalar; a vector cannot equal a bare number. Write ∣a⃗∣=7|\vec a| = 7.
  • Assuming cos⁡−1\cos^{-1} must give an acute angle. A negative direction cosine correctly gives an obtuse angle (greater than 90∘90^\circ) — do not "fix" the sign.

Ask the tutor: want to walk through why dividing by the magnitude always produces a valid set of direction cosines, or practice a few more direction-cosine conversions?

Why do we need position vectors if a vector is already defined by magnitude and direction alone?

A vector on its own only tells you "how far and which way," not "from where." A position vector fixes that gap by always being measured from one agreed origin OO, so OP→\overrightarrow{OP} doubles as both a vector (with magnitude and direction) and a way to pinpoint the exact location of PP in space. Later formulas — like the section formula for a point dividing a segment — are stated entirely in terms of position vectors precisely because they carry location information that a "floating" vector does not.

Are direction ratios and direction cosines basically the same thing?

They describe the same direction but are not numerically the same. Direction ratios are any set of numbers proportional to the direction cosines — you can multiply or divide them by any nonzero constant and still describe the identical direction, so they are not unique. Direction cosines are one specific, unique triple (l,m,n)(l,m,n) for a given direction, always satisfying l2+m2+n2=1l^2+m^2+n^2=1. You get direction cosines from direction ratios by dividing each ratio by the magnitude of the vector they came from.

If two of the three direction cosines are given, can I always find the third?

Yes, up to a sign. Since l2+m2+n2=1l^2+m^2+n^2=1, knowing any two lets you solve n2=1−l2−m2n^2 = 1-l^2-m^2 and take a square root. But a square root gives two possible signs, n=±1−l2−m2n=\pm\sqrt{1-l^2-m^2}, corresponding to a vector that could point at angle γ\gamma or its supplement along the zz-axis. You need extra information — such as knowing the actual vector's zz-component sign, or that γ\gamma is acute — to pick the correct sign.

Before this

Where this leads