Unit vectors

From Robotics
Jump to: navigation, search
← Back: Vector algebra Overview: Vector algebra Next: Simple arithmetic operations

Review.png

There are exercises as selftest for this article.

Matlab.png

You can use MATLAB for the content of this article.

A unit vector is a vector with magnitude 1. The unit vector to a given vector \vec{\mathbf{a}} can be determined by dividing the given vector by its magnitude |\vec{\mathbf{a}}|:

Unitvector.png

\vec{\textbf{e}}_{a} = \frac{\vec{\textbf{a}}}{|\vec{\textbf{a}}|} =
\frac{\vec{\textbf{a}}}{\sqrt{a_x^2 + a_y^2 + a_z^2}} = 
\frac{1}{\sqrt{a_x^2 + a_y^2 + a_z^2}} \begin{bmatrix} a_x\\ a_y\\ a_z \end{bmatrix}

The vector \vec{\mathbf{e}}_{a} has the magnitude 1 (so |\vec{\mathbf{e}}_a|=1) and is pointed to the direction of \vec{\mathbf{a}}. So every vector can be described by its magnitude (so a scalar value) and the corresponding unit vector. Therefore \vec{\mathbf{a}} can also be written as follows:


\vec{\textbf{a}} = \frac{\vec{\textbf{a}}}{|\vec{\textbf{a}}|} |\vec{\textbf{a}}| = \vec{\textbf{e}}_{a} |\vec{\textbf{a}}|

How arithmetic operations like fractions are handled exactly, is described in the article about simple arithmetic operations.

Example: Determination of the unit vector to a given vectorMatlab.png see MATLAB code

Hint: For detailed information about the handling of arithmetic operations please have a look on the article about simple arithmetic operations

To the given vector \vec{\mathbf{b}} the corresponding unit vector shall be determined:


\vec{\mathbf{b}}=\begin{bmatrix} 3\\ 0\\ 4 \end{bmatrix}

\vec{\textbf{e}}_{b} = \frac{\vec{\textbf{b}}}{|\vec{\textbf{b}}|} =
\frac{1}{\sqrt{3^2 + 0^2 + 4^2}} \begin{bmatrix} 3\\ 0\\ 4 \end{bmatrix} =
\frac{1}{\sqrt{25}} \begin{bmatrix} 3\\ 0\\ 4 \end{bmatrix} =
\frac{1}{5} \begin{bmatrix} 3\\ 0\\ 4 \end{bmatrix} =
\begin{bmatrix} \frac{3}{5}\\ 0\\ \frac{4}{5} \end{bmatrix}

The calculation of the magnitude shows thats it equals 1 indeed:


|\vec{\textbf{e}}_{b}| =
\sqrt{\left(\frac{3}{5}\right)^2 + 0^2 + \left(\frac{4}{5}\right)^2} =
\sqrt{\frac{9}{25} + \frac{16}{25}} = \sqrt{\frac{25}{25}} = \sqrt{1} = 1

Literature

  • Manfred Albach, Grundlagen der Elektrotechnik 1: Erfahrungssätze, Bauelemente, Gleichstromschaltungen, 3. Edition (Pearson Studium, 2011)