Skip to content

Vector magnitude, direction and unit vectors

A vector combines a magnitude, which tells you its size, with a direction. For example,

a=(34)\mathbf a=\begin{pmatrix}3\\4\end{pmatrix}

means a displacement of 33 units in the positive xx direction and 44 units in the positive yy direction. Its magnitude is 55, but the vector itself is not the number 55: it also records where the displacement points.

This lesson develops three closely related skills:

  1. finding the magnitude and direction of a vector;
  2. producing a unit vector in a required direction;
  3. constructing a vector when its magnitude and direction are known.

You should be able to:

  • use column vectors and i\mathbf i, j\mathbf j, k\mathbf k notation;
  • apply Pythagoras’ theorem in two and three dimensions;
  • use exact surds;
  • solve right angled triangles using sine, cosine and tangent;
  • interpret angles in all four quadrants.

Review vectors in two and three dimensions, vector arithmetic or trigonometric graphs if necessary.

For

a=(xy)=xi+yj,\mathbf a=\begin{pmatrix}x\\y\end{pmatrix}=x\mathbf i+y\mathbf j,

the horizontal and vertical components are perpendicular. Pythagoras’ theorem therefore gives

a=x2+y2.\boxed{|\mathbf a|=\sqrt{x^2+y^2}}.

The notation a|\mathbf a| means the magnitude or length of a\mathbf a. Some textbooks use a\lVert\mathbf a\rVert instead. Both quantities are scalars and are never negative.

Find the magnitude of

p=(512).\mathbf p=\begin{pmatrix}-5\\12\end{pmatrix}.

Substitute both components into the formula:

p=(5)2+122=25+144=13.\begin{aligned} |\mathbf p| &=\sqrt{(-5)^2+12^2}\\ &=\sqrt{25+144}\\ &=\boxed{13}. \end{aligned}

The negative sign affects the direction, but not the length. Squaring makes its contribution positive.

Let q=7i4j\mathbf q=7\mathbf i-4\mathbf j. Find q|\mathbf q|.

The components are 77 and 4-4, so

q=72+(4)2=65.|\mathbf q|=\sqrt{7^2+(-4)^2}=\sqrt{65}.

Since 6565 has no square factor greater than 11,

q=65.\boxed{|\mathbf q|=\sqrt{65}}.

Do not replace this by a rounded decimal unless the question asks for one. The exact answer remains useful in later algebra.

Find the exact magnitude of a=6i3j\mathbf a=-6\mathbf i-3\mathbf j.

Answer a=(6)2+(3)2=45=35.|\mathbf a|=\sqrt{(-6)^2+(-3)^2}=\sqrt{45}=\boxed{3\sqrt5}.

For

a=(xyz)=xi+yj+zk,\mathbf a=\begin{pmatrix}x\\y\\z\end{pmatrix}=x\mathbf i+y\mathbf j+z\mathbf k,

Pythagoras can be applied twice. First combine the xx and yy components, then include the perpendicular zz component:

a=x2+y2+z2.\boxed{|\mathbf a|=\sqrt{x^2+y^2+z^2}}.

Worked example 3: magnitude in three dimensions

Section titled “Worked example 3: magnitude in three dimensions”

Find the magnitude of

v=2i3j+6k.\mathbf v=2\mathbf i-3\mathbf j+6\mathbf k. v=22+(3)2+62=4+9+36=49=7.\begin{aligned} |\mathbf v| &=\sqrt{2^2+(-3)^2+6^2}\\ &=\sqrt{4+9+36}\\ &=\sqrt{49}\\ &=\boxed{7}. \end{aligned}

The same formula works for a displacement between two points after finding the displacement vector using finish minus start.

Worked example 4: distance between points in space

Section titled “Worked example 4: distance between points in space”

Points A(1,2,4)A(1,-2,4) and B(5,1,2)B(5,1,-2) are given. Find ABAB.

First find the vector from AA to BB:

AB=(511(2)24)=(436).\overrightarrow{AB} =\begin{pmatrix}5-1\\1-(-2)\\-2-4\end{pmatrix} =\begin{pmatrix}4\\3\\-6\end{pmatrix}.

The distance is the magnitude of this vector:

AB=AB=42+32+(6)2=61.AB=|\overrightarrow{AB}| =\sqrt{4^2+3^2+(-6)^2} =\sqrt{61}.

Hence

AB=61.\boxed{AB=\sqrt{61}}.

Multiplying a vector by a scalar kk multiplies its magnitude by k|k|:

ka=ka.\boxed{|k\mathbf a|=|k|\,|\mathbf a|}.

The absolute value is essential. If k<0k<0, the vector reverses direction, but its length is still positive.

For example, if a=6|\mathbf a|=6, then

3a=18,12a=3.|3\mathbf a|=18, \qquad \left|-\frac12\mathbf a\right|=3.

Suppose a=(21)\mathbf a=\begin{pmatrix}2\\-1\end{pmatrix} and ka=15|k\mathbf a|=15. Find the possible values of kk.

First,

a=22+(1)2=5.|\mathbf a|=\sqrt{2^2+(-1)^2}=\sqrt5.

Therefore

k5=15.|k|\sqrt5=15.

Dividing by 5\sqrt5 gives

k=155=35.|k|=\frac{15}{\sqrt5}=3\sqrt5.

Hence

k=35ork=35.\boxed{k=3\sqrt5\quad\text{or}\quad k=-3\sqrt5}.

There are two answers because opposite vectors have the same magnitude.

A unit vector has magnitude 11. To turn any non-zero vector a\mathbf a into a unit vector pointing in the same direction, divide by its magnitude:

a^=aa.\boxed{\widehat{\mathbf a}=\frac{\mathbf a}{|\mathbf a|}}.

The hat is a common notation for a unit vector, although notation varies. The reasoning is

aa=aa=1.\left|\frac{\mathbf a}{|\mathbf a|}\right| =\frac{|\mathbf a|}{|\mathbf a|}=1.

This process is called normalising the vector.

Worked example 6: unit vector in the same direction

Section titled “Worked example 6: unit vector in the same direction”

Find a unit vector in the direction of

d=(25).\mathbf d=\begin{pmatrix}-2\\5\end{pmatrix}.

First calculate its magnitude:

d=(2)2+52=29.|\mathbf d|=\sqrt{(-2)^2+5^2}=\sqrt{29}.

Now divide every component by 29\sqrt{29}:

d^=129(25)=(2/295/29).\boxed{ \widehat{\mathbf d} =\frac1{\sqrt{29}}\begin{pmatrix}-2\\5\end{pmatrix} =\begin{pmatrix}-2/\sqrt{29}\\5/\sqrt{29}\end{pmatrix}}.

A check confirms that

d^=429+2529=1.|\widehat{\mathbf d}| =\sqrt{\frac4{29}+\frac{25}{29}}=1.

Worked example 7: a specified magnitude and direction

Section titled “Worked example 7: a specified magnitude and direction”

Find the vector of magnitude 1010 in the same direction as

a=3i4j.\mathbf a=3\mathbf i-4\mathbf j.

Since a=5|\mathbf a|=5, the unit vector in its direction is

aa=35i45j.\frac{\mathbf a}{|\mathbf a|} =\frac35\mathbf i-\frac45\mathbf j.

Multiply the unit vector by the required magnitude:

10(35i45j)=6i8j.10\left(\frac35\mathbf i-\frac45\mathbf j\right) =\boxed{6\mathbf i-8\mathbf j}.

Its magnitude is 62+(8)2=10\sqrt{6^2+(-8)^2}=10, as required.

Find a vector of magnitude 1212 in the opposite direction to (43)\begin{pmatrix}4\\-3\end{pmatrix}.

Answer

The given vector has magnitude 55, so a unit vector in the opposite direction is

15(43)=(4/53/5).-\frac15\begin{pmatrix}4\\-3\end{pmatrix} =\begin{pmatrix}-4/5\\3/5\end{pmatrix}.

Multiplying by 1212 gives

(48/536/5).\boxed{\begin{pmatrix}-48/5\\36/5\end{pmatrix}}.

The direction of a two dimensional vector is often given by an angle θ\theta measured anticlockwise from the positive xx axis. For

a=(xy),\mathbf a=\begin{pmatrix}x\\y\end{pmatrix},

the component triangle suggests

tanθ=yx.\tan\theta=\frac yx.

However, tan1(y/x)\tan^{-1}(y/x) alone does not identify the correct quadrant. A calculator may return an acute or negative principal value even when the vector points into the second or third quadrant.

A reliable method is:

  1. inspect the signs of xx and yy to identify the quadrant;
  2. find the reference angle α=tan1(y/x)\alpha=\tan^{-1}(|y/x|);
  3. convert α\alpha into the required direction angle.
Signs of (x,y)(x,y)QuadrantDirection angle
(+,+)(+,+)firstθ=α\theta=\alpha
(,+)(-,+)secondθ=180α\theta=180^\circ-\alpha
(,)(-,-)thirdθ=180+α\theta=180^\circ+\alpha
(+,)(+,-)fourthθ=360α\theta=360^\circ-\alpha

If your calculator provides an atan2(y,x)\operatorname{atan2}(y,x) function, it handles the quadrant using both components. Convert a negative result to an angle from 00^\circ to 360360^\circ by adding 360360^\circ.

Worked example 8: direction in the second quadrant

Section titled “Worked example 8: direction in the second quadrant”

Find the direction of a=(47)\mathbf a=\begin{pmatrix}-4\\7\end{pmatrix}, measured anticlockwise from the positive xx axis.

The signs (,+)(-,+) place the vector in the second quadrant. Its reference angle is

α=tan1(74)60.255.\alpha=\tan^{-1}\left(\frac74\right)\approx60.255^\circ.

Therefore

θ=18060.255=119.745.\theta=180^\circ-60.255^\circ=119.745^\circ.

To one decimal place, the direction is

119.7.\boxed{119.7^\circ}.

The rough size makes sense: the vector points up and left, so its direction must lie between 9090^\circ and 180180^\circ.

Worked example 9: direction in the fourth quadrant

Section titled “Worked example 9: direction in the fourth quadrant”

Find the direction of 5i12j5\mathbf i-12\mathbf j.

The vector lies in the fourth quadrant. The reference angle is

α=tan1(125)67.380.\alpha=\tan^{-1}\left(\frac{12}{5}\right)\approx67.380^\circ.

Hence

θ=36067.380=292.6\theta=360^\circ-67.380^\circ =\boxed{292.6^\circ}

to one decimal place.

Find the direction of (333)\begin{pmatrix}-3\\-3\sqrt3\end{pmatrix}, measured anticlockwise from the positive xx axis.

Answer

Both components are negative, so the vector is in the third quadrant. The reference angle is

α=tan1(333)=tan1(3)=60.\alpha=\tan^{-1}\left(\frac{3\sqrt3}{3}\right) =\tan^{-1}(\sqrt3)=60^\circ.

Thus

θ=180+60=240.\boxed{\theta=180^\circ+60^\circ=240^\circ}.

Forming a vector from magnitude and direction

Section titled “Forming a vector from magnitude and direction”

Suppose a vector has magnitude rr and direction angle θ\theta, measured anticlockwise from the positive xx axis. Resolving it horizontally and vertically gives

a=(rcosθrsinθ)\boxed{ \mathbf a =\begin{pmatrix}r\cos\theta\\r\sin\theta\end{pmatrix}}

or, equivalently,

a=rcosθi+rsinθj.\boxed{\mathbf a=r\cos\theta\,\mathbf i+r\sin\theta\,\mathbf j}.

The vector (cosθsinθ)\begin{pmatrix}\cos\theta\\\sin\theta\end{pmatrix} has magnitude 11 because

cos2θ+sin2θ=1.\sqrt{\cos^2\theta+\sin^2\theta}=1.

Multiplying it by rr gives the required magnitude.

Worked example 10: magnitude and direction to components

Section titled “Worked example 10: magnitude and direction to components”

A force has magnitude 20 N20\ \mathrm N and acts at 3535^\circ above the positive horizontal. Write the force as a column vector.

The horizontal component is adjacent to the angle and the vertical component is opposite:

F=(20cos3520sin35)N.\mathbf F =\begin{pmatrix}20\cos35^\circ\\20\sin35^\circ\end{pmatrix}\mathrm N.

Therefore

F(16.411.5)N\boxed{ \mathbf F\approx \begin{pmatrix}16.4\\11.5\end{pmatrix}\mathrm N}

to 33 significant figures. Both components are positive, as expected from the stated direction.

Find the vector of magnitude 88 with direction 150150^\circ.

a=(8cos1508sin150)=(8(3/2)8(1/2))=(434).\begin{aligned} \mathbf a &=\begin{pmatrix}8\cos150^\circ\\8\sin150^\circ\end{pmatrix}\\ &=\begin{pmatrix}8(-\sqrt3/2)\\8(1/2)\end{pmatrix}\\ &=\boxed{\begin{pmatrix}-4\sqrt3\\4\end{pmatrix}}. \end{aligned}

The signs provide a useful check: 150150^\circ lies in the second quadrant, so the xx component should be negative and the yy component positive.

A bearing is measured clockwise from north and written with three figures. This differs from the usual mathematical direction angle, which is measured anticlockwise from the positive xx axis.

If i\mathbf i points east and j\mathbf j points north, a vector of magnitude rr on a bearing β\beta has components

a=rsinβi+rcosβj.\boxed{ \mathbf a =r\sin\beta\,\mathbf i+r\cos\beta\,\mathbf j}.

Sine gives the east component because the bearing angle is measured from the north axis. This is the reverse of the usual rcosθr\cos\theta, rsinθr\sin\theta order.

An aircraft flies at 240 kmh1240\ \mathrm{km\,h^{-1}} on a bearing of 120120^\circ. Write its velocity in east and north components.

v=240sin120i+240cos120j=240(32)i+240(12)j=1203i120j kmh1.\begin{aligned} \mathbf v &=240\sin120^\circ\,\mathbf i +240\cos120^\circ\,\mathbf j\\ &=240\left(\frac{\sqrt3}{2}\right)\mathbf i +240\left(-\frac12\right)\mathbf j\\ &=\boxed{120\sqrt3\,\mathbf i-120\mathbf j\ \mathrm{km\,h^{-1}}}. \end{aligned}

A bearing of 120120^\circ points south east, so positive east and negative north components are sensible.

Worked example 13: components to a bearing

Section titled “Worked example 13: components to a bearing”

A velocity is

v=5i+12j ms1,\mathbf v=-5\mathbf i+12\mathbf j\ \mathrm{m\,s^{-1}},

where i\mathbf i points east and j\mathbf j points north. Find its speed and bearing.

The speed is

v=(5)2+122=13 ms1.|\mathbf v|=\sqrt{(-5)^2+12^2}=13\ \mathrm{m\,s^{-1}}.

The vector points north west. Its angle west of north is

α=tan1(512)22.620.\alpha=\tan^{-1}\left(\frac5{12}\right)\approx22.620^\circ.

Bearings increase clockwise, so the bearing is

36022.620=337.380.360^\circ-22.620^\circ=337.380^\circ.

Thus the velocity has speed 13 ms1\boxed{13\ \mathrm{m\,s^{-1}}} on a bearing of 337\boxed{337^\circ} to the nearest degree.

A displacement of 3030 km is made on a bearing of 210210^\circ. Find its east and north components exactly.

Answer d=30sin210i+30cos210j=30(12)i+30(32)j=15i153j km.\begin{aligned} \mathbf d &=30\sin210^\circ\,\mathbf i+30\cos210^\circ\,\mathbf j\\ &=30\left(-\frac12\right)\mathbf i +30\left(-\frac{\sqrt3}{2}\right)\mathbf j\\ &=\boxed{-15\mathbf i-15\sqrt3\mathbf j\ \mathrm{km}}. \end{aligned}

The bearing points south west, so both components are negative.

An equation such as a=c|\mathbf a|=c becomes an ordinary scalar equation after squaring. Remember that squaring can lead to two possible values of an unknown component.

Worked example 14: find an unknown component

Section titled “Worked example 14: find an unknown component”

The vector

p=(k4)\mathbf p=\begin{pmatrix}k\\4\end{pmatrix}

has magnitude 41\sqrt{41}. Find kk.

Use the magnitude formula:

k2+42=41.\sqrt{k^2+4^2}=\sqrt{41}.

Squaring both sides gives

k2+16=41,k^2+16=41,

so

k2=25.k^2=25.

Therefore

k=5ork=5.\boxed{k=5\quad\text{or}\quad k=-5}.

Both vectors have the same length but point in different directions.

Worked example 15: use a direction condition

Section titled “Worked example 15: use a direction condition”

The vector a=(k8)\mathbf a=\begin{pmatrix}k\\-8\end{pmatrix} has magnitude 1010 and points into the fourth quadrant. Find kk.

The magnitude condition gives

k2+(8)2=102,k^2+(-8)^2=10^2,

so

k2=36k^2=36

and initially k=±6k=\pm6. In the fourth quadrant the horizontal component is positive and the vertical component negative. Therefore

k=6.\boxed{k=6}.

The direction information selects one of the two algebraic possibilities.

  • A vector and its magnitude are different types of quantity. a\mathbf a is a vector, while a|\mathbf a| is a non-negative scalar.
  • Negative components do not make a negative magnitude. Every component is squared in the magnitude formula.
  • Dividing by a magnitude produces length 11. Multiplying by the magnitude usually does not.
  • Opposite direction requires a negative sign. The unit vector opposite to a\mathbf a is a/a-\mathbf a/|\mathbf a|.
  • An inverse tangent gives only a reference angle unless the quadrant is handled. Check the signs of both components.
  • Bearings start from north, not east. For east and north components use rsinβr\sin\beta and rcosβr\cos\beta respectively.
  • Exact values should remain exact. Keep 13\sqrt{13} or 434\sqrt3 unless a decimal accuracy is requested.
  1. Find the magnitude of a=(122)\mathbf a=\begin{pmatrix}1\\-2\\2\end{pmatrix}.
  2. Find a unit vector in the direction from P(2,1)P(2,-1) to Q(4,7)Q(-4,7).
  3. A vector has magnitude 1414 and direction 225225^\circ. Find its exact components.
  4. A vector has components 8i+15j8\mathbf i+15\mathbf j. Find its magnitude and its direction anticlockwise from the positive xx axis.
Answers
a=12+(2)2+22=3.|\mathbf a|=\sqrt{1^2+(-2)^2+2^2}=\boxed{3}.
  1. First,
PQ=(427(1))=(68),PQ=10.\overrightarrow{PQ}=\begin{pmatrix}-4-2\\7-(-1)\end{pmatrix} =\begin{pmatrix}-6\\8\end{pmatrix}, \qquad |\overrightarrow{PQ}|=10.

Hence the required unit vector is

110(68)=(3/54/5).\boxed{\frac1{10}\begin{pmatrix}-6\\8\end{pmatrix} =\begin{pmatrix}-3/5\\4/5\end{pmatrix}}.
a=(14cos22514sin225)=(7272).\begin{aligned} \mathbf a &=\begin{pmatrix}14\cos225^\circ\\14\sin225^\circ\end{pmatrix}\\ &=\boxed{\begin{pmatrix}-7\sqrt2\\-7\sqrt2\end{pmatrix}}. \end{aligned}
  1. The magnitude is
82+152=17.\sqrt{8^2+15^2}=\boxed{17}.

The vector is in the first quadrant, so

θ=tan1(158)61.9.\theta=\tan^{-1}\left(\frac{15}{8}\right) \approx\boxed{61.9^\circ}.

For a=(xy)\mathbf a=\begin{pmatrix}x\\y\end{pmatrix} and b=(xyz)\mathbf b=\begin{pmatrix}x\\y\\z\end{pmatrix},

a=x2+y2,b=x2+y2+z2.|\mathbf a|=\sqrt{x^2+y^2}, \qquad |\mathbf b|=\sqrt{x^2+y^2+z^2}.

For any non-zero vector a\mathbf a,

unit vector in its direction=aa.\text{unit vector in its direction}=\frac{\mathbf a}{|\mathbf a|}.

A two dimensional vector of magnitude rr and standard direction angle θ\theta is

(rcosθrsinθ).\begin{pmatrix}r\cos\theta\\r\sin\theta\end{pmatrix}.

When finding a direction, identify the quadrant before interpreting an inverse tangent. When working with bearings, remember that the angle is measured clockwise from north.

Next, use these ideas to calculate position vectors and distance and then apply vectors in vector modelling. For physical applications involving velocity, see two dimensional motion with vectors.