0:00 / 0:00

Magnitude of a 2D Vector

We can calculate the magnitude (a.k.a. length or size) of a vector in 2D using Pythagorean's Theorem:

Write it Down
The length of the vector v=[v1, v2]\vec{v}=\left[v_1,\ v_2\right] is
v=[v1, v2]=v1 2+v2 2||\vec v||=||[v_1,\ v_2]||=\sqrt{v_1^{\ 2}+v_2^{\ 2}}


Example
Find the lengths of the vectors v=[3, 4]\vec{v}=[-3,\ 4] and u=[0, 1]\vec{u}=\left[0,\ -1\right]
v=(3)2+(4)2=25=5\left|\left|\vec{v}\right|\right|=\sqrt{\left(-3\right)^2+\left(4\right)^2}=\sqrt{25}=5
u=02+(1)2=1=1\left|\left|\vec{u}\right|\right|=\sqrt{0^2+\left(-1\right)^2}=\sqrt{1}=1

Magnitude of a 3D Vector

We can calculate the magnitude of a vector in 3D using an extension of this formula.

Write it Down
The length of the vector u=[u1, u2, u3]\vec{u}=\left[u_1,\ u_2,\ u_3\right] is
u=[u1, u2, u3]=u1 2+u2 2+u3 2\left|\left|\vec{u}\right|\right|=\left|\left|\left[u_1,\ u_2,\ u_3\right]\right|\right|=\sqrt{u_1^{\ 2}+u_2^{\ 2}+u_3^{\ 2}}


Practice: Magnitude of a Vector

An aircraft's location is 200 miles from base, at a direction of 30° W of S, at an altitude of 35,000 ft. Find the distance between the aircraft and the base.

Note: 1 mile = 5280 feet
0:00 / 0:00

Unit Vector

A unit vector is a vector that has a magnitude of 1.

Example
Show that the following vectors are all unit vectors
u=[1, 0]\vec{u}=\left[1,\ 0\right] is a unit vector
u=12+02=1\left|\left|\vec{u}\right|\right|=\sqrt{1^2+0^2}=1




v=[12, 12]\vec{v}=\left[\frac{1}{\sqrt{2}},\ -\frac{1}{\sqrt{2}}\right] is a unit vector
v=(12)2+(12)2=12+12=1=1\left|\left|\vec{v}\right|\right|=\sqrt{\left(\frac{1}{\sqrt{2}}\right)^2+\left(-\frac{1}{\sqrt{2}}\right)^2}=\sqrt{\frac{1}{2}+\frac{1}{2}}=\sqrt{1}=1




w=[0, 35, 45]\vec{w}=\left[0,\ \frac{3}{5},\ -\frac{4}{5}\right] is a unit vector
w=02+(35)2+(45)2=925+1625=1=1\left|\left|\vec{w}\right|\right|=\sqrt{0^2+\left(\frac{3}{5}\right)^2+\left(-\frac{4}{5}\right)^2}=\sqrt{\frac{9}{25}+\frac{16}{25}}=\sqrt{1}=1

PAGE BREAK

Finding a Unit Vector in a Certain Direction

Given a vector v\vec v, the unit vector in the same direction as v\vec v is v^=vv\displaystyle \hat v=\frac{\vec v}{||\vec v||}
Example
Find the unit vector in the same direction as u=[1, 2, 3]\vec u=\left[1,\ 2,\ -3\right]
u^=[1, 2, 3] [1, 2, 3] \displaystyle \hat u=\frac{[1,\ 2,\ -3]}{||\ [1,\ 2,\ -3]\ ||}
u^=[1, 2, 3]12+22+(3)2\displaystyle \hat u=\frac{[1,\ 2,\ -3]}{\sqrt {1^2+2^2+(-3)^2}}
u^=[1, 2, 3]14\displaystyle \hat u=\frac{[1,\ 2,\ -3]}{\sqrt {14}} or [114, 214, 314]\left[\frac{1}{\sqrt{14}},\ \frac{2}{\sqrt{14}},\ -\frac{3}{\sqrt{14}}\right]


PAGE BREAK

Special Unit Vectors

In 2D, we have the following special unit vectors:
  • i=[1, 0]\vec i=[1,\ 0] → unit vector along the positive xx-axis
  • j=[0, 1]\vec j=[0,\ 1] → unit vector along the positive yy-axis
In 3D, we have the following special unit vectors:
  • i=[1, 0, 0]\vec i=[1,\ 0,\ 0] → unit vector along the positive xx-axis
  • j=[0, 1, 0]\vec j=[0,\ 1,\ 0] → unit vector along the positive yy-axis
  • k=[0, 0, 1]\vec k=[0,\ 0,\ 1] → unit vector along the positive zz-axis

Example
2i3j+k=2\vec i-3\vec j+\vec k=
[2, -3, 1]

Practice: Unit Vector

Find the unit vector in the same direction as i5k\vec i-5\vec k.
0:00 / 0:00

Directional Cosine for 3D Vectors

Given any vector v=[v1, v2, v3]\vec v=[v_1,\ v_2,\ v_3] in 3D, we can define the following angles:
  • α\alpha is the angle v\vec{v} forms with the xx- axis
  • β\beta is the angle v\vec{v} forms with the yy- axis
  • γ\gamma is the angle v\vec{v} forms with the zz- axis

If v\vec{v} is a unit vector, then v=[cosα, cosβ, cosγ]\vec{v}=\left[\cos\alpha,\ \cos\beta,\ \cos\gamma\right] ⟶ these 3 components are called the directional cosines of the vector v\vec{v}.

General Directional Cosines

Given any vector v=[v1, v2, v3]\vec{v}=\left[v_1,\ v_2,\ v_3\right],
  • cosα=v1v\displaystyle\cos\alpha=\frac{v_1}{\left|\left|\vec{v}\right|\right|}
  • cosβ=v2v\displaystyle\cos\beta=\frac{v_2}{\left|\left|\vec{v}\right|\right|}
  • cosγ=v3v\displaystyle\cos\gamma=\frac{v_3}{\left|\left|\vec{v}\right|\right|}