# Unit vector

In mathematics, a unit vector in a normed vector space is a vector (often a spatial vector) of length 1. A unit vector is often denoted by a lowercase letter with a circumflex, or "hat", as in ${\hat {\mathbf {v} }}$ (pronounced "v-hat"). The term normalized vector is sometimes used as a synonym for unit vector.
The normalized vector û of a non-zero vector u is the unit vector in the direction of u, i.e.,
    $\mathbf {\hat {u}} ={\frac {\mathbf {u} }{\|\mathbf {u} \|}}=({\frac {u_{1}}{\|\mathbf {u} \|}},{\frac {u_{2}}{\|\mathbf {u} \|}},...,{\frac {u_{n}}{\|\mathbf {u} \|}})$
where ‖u‖ is the norm (or length) of u and ‖u‖=(u$_1$, u$_2$, ..., u$_n$){\textstyle \|\mathbf {u} \|=(u_{1}, u_{2}, ..., u_{n})}.
The proof is the following: ‖u$^^$‖=√( u$_1$/(√(u$_1$$^2$+...+u$_n$$^2$)) $^2$+...+ u$_n$/(√(u$_1$$^2$+...+u$_n$$^2$)) $^2$)=√((u$_1$$^2$+...+u$_n$$^2$)/(u$_1$$^2$+...+u$_n$$^2$))=√1=1{\textstyle \|\mathbf {\hat {u}} \|={\sqrt {{\frac {u_{1}}{\sqrt {u_{1}^{2}+...+u_{n}^{2}}}}^{2}+...+{\frac {u_{n}}{\sqrt {u_{1}^{2}+...+u_{n}^{2}}}}^{2}}}={\sqrt {\frac {u_{1}^{2}+...+u_{n}^{2}}{u_{1}^{2}+...+u_{n}^{2}}}}={\sqrt {1}}=1}
A unit vector is often used to represent directions, such as normal directions. Unit vectors are often chosen to form the basis of a vector space, and every vector in the space may be written as a linear combination form of unit vectors.

## Orthogonal coordinates
### Cartesian coordinates

Unit vectors may be used to represent the axes of a Cartesian coordinate system. For instance, the standard unit vectors in the direction of the x, y, and z axes of a three dimensional Cartesian coordinate system are
    $\mathbf {\hat {x}} ={\begin{bmatrix}1\\0\\0\end{bmatrix}},\,\,\mathbf {\hat {y}} ={\begin{bmatrix}0\\1\\0\end{bmatrix}},\,\,\mathbf {\hat {z}} ={\begin{bmatrix}0\\0\\1\end{bmatrix}}$
They form a set of mutually orthogonal unit vectors, typically referred to as a standard basis in linear algebra.
They are often denoted using common vector notation (e.g., x or ${\vec {x}}$) rather than standard unit vector notation (e.g., x̂). In most contexts it can be assumed that x, y, and z, (or ${\vec {x}},$ ${\vec {y}},$ and ${\vec {z}}$) are versors of a 3-D Cartesian coordinate system. The notations (î, ĵ, k̂), (x̂$_1$, x̂$_2$, x̂$_3$), (ê$_x$, ê$_y$, ê$_z$), or (ê$_1$, ê$_2$, ê$_3$), with or without hat, are also used, particularly in contexts where i, j, k might lead to confusion with another quantity (for instance with index symbols such as i, j, k, which are used to identify an element of a set or array or sequence of variables).
When a unit vector in space is expressed in Cartesian notation as a linear combination of x, y, z, its three scalar components can be referred to as direction cosines. The value of each component is equal to the cosine of the angle formed by the unit vector with the respective basis vector. This is one of the methods used to describe the orientation (angular position) of a straight line, segment of straight line, oriented axis, or segment of oriented axis (vector).

### Cylindrical coordinates

The three orthogonal unit vectors appropriate to cylindrical symmetry are:
* ${\boldsymbol {\hat {\rho }}}$ (also designated $\mathbf {\hat {e}}$ or ${\boldsymbol {\hat {s}}}$), representing the direction along which the distance of the point from the axis of symmetry is measured;
* ${\boldsymbol {\hat {\varphi }}}$, representing the direction of the motion that would be observed if the point were rotating counterclockwise about the symmetry axis;
* $\mathbf {\hat {z}}$, representing the direction of the symmetry axis;
They are related to the Cartesian basis ${\hat {x}}$, ${\hat {y}}$, ${\hat {z}}$ by:
    ${\boldsymbol {\hat {\rho }}}=\cos(\varphi )\mathbf {\hat {x}} +\sin(\varphi )\mathbf {\hat {y}}$
    ${\boldsymbol {\hat {\varphi }}}=-\sin(\varphi )\mathbf {\hat {x}} +\cos(\varphi )\mathbf {\hat {y}}$
    $\mathbf {\hat {z}} =\mathbf {\hat {z}} .$
The vectors ${\boldsymbol {\hat {\rho }}}$ and ${\boldsymbol {\hat {\varphi }}}$ are functions of $\varphi ,$ and are not constant in direction. When differentiating or integrating in cylindrical coordinates, these unit vectors themselves must also be operated on. The derivatives with respect to $\varphi$ are:
    ${\frac {\partial {\boldsymbol {\hat {\rho }}}}{\partial \varphi }}=-\sin \varphi \mathbf {\hat {x}} +\cos \varphi \mathbf {\hat {y}} ={\boldsymbol {\hat {\varphi }}}$
    ${\frac {\partial {\boldsymbol {\hat {\varphi }}}}{\partial \varphi }}=-\cos \varphi \mathbf {\hat {x}} -\sin \varphi \mathbf {\hat {y}} =-{\boldsymbol {\hat {\rho }}}$
    ${\frac {\partial \mathbf {\hat {z}} }{\partial \varphi }}=\mathbf {0} .$

### Spherical coordinates

The unit vectors appropriate to spherical symmetry are: $\mathbf {\hat {r}}$, the direction in which the radial distance from the origin increases; ${\boldsymbol {\hat {\varphi }}}$, the direction in which the angle in the x-y plane counterclockwise from the positive x-axis is increasing; and ${\boldsymbol {\hat {\theta }}}$, the direction in which the angle from the positive z axis is increasing. To minimize redundancy of representations, the polar angle $\theta$ is usually taken to lie between zero and 180 degrees. It is especially important to note the context of any ordered triplet written in spherical coordinates, as the roles of ${\boldsymbol {\hat {\varphi }}}$ and ${\boldsymbol {\hat {\theta }}}$ are often reversed. Here, the American "physics" convention is used. This leaves the azimuthal angle $\varphi$ defined the same as in cylindrical coordinates. The Cartesian relations are:
    $\mathbf {\hat {r}} =\sin \theta \cos \varphi \mathbf {\hat {x}} +\sin \theta \sin \varphi \mathbf {\hat {y}} +\cos \theta \mathbf {\hat {z}}$
    ${\boldsymbol {\hat {\theta }}}=\cos \theta \cos \varphi \mathbf {\hat {x}} +\cos \theta \sin \varphi \mathbf {\hat {y}} -\sin \theta \mathbf {\hat {z}}$
    ${\boldsymbol {\hat {\varphi }}}=-\sin \varphi \mathbf {\hat {x}} +\cos \varphi \mathbf {\hat {y}}$
The spherical unit vectors depend on both $\varphi$ and $\theta$, and hence there are 5 possible non-zero derivatives. For a more complete description, see Jacobian matrix and determinant. The non-zero derivatives are:
    ${\frac {\partial \mathbf {\hat {r}} }{\partial \varphi }}=-\sin \theta \sin \varphi \mathbf {\hat {x}} +\sin \theta \cos \varphi \mathbf {\hat {y}} =\sin \theta {\boldsymbol {\hat {\varphi }}}$
    ${\frac {\partial \mathbf {\hat {r}} }{\partial \theta }}=\cos \theta \cos \varphi \mathbf {\hat {x}} +\cos \theta \sin \varphi \mathbf {\hat {y}} -\sin \theta \mathbf {\hat {z}} ={\boldsymbol {\hat {\theta }}}$
    ${\frac {\partial {\boldsymbol {\hat {\theta }}}}{\partial \varphi }}=-\cos \theta \sin \varphi \mathbf {\hat {x}} +\cos \theta \cos \varphi \mathbf {\hat {y}} =\cos \theta {\boldsymbol {\hat {\varphi }}}$
    ${\frac {\partial {\boldsymbol {\hat {\theta }}}}{\partial \theta }}=-\sin \theta \cos \varphi \mathbf {\hat {x}} -\sin \theta \sin \varphi \mathbf {\hat {y}} -\cos \theta \mathbf {\hat {z}} =-\mathbf {\hat {r}}$
    ${\frac {\partial {\boldsymbol {\hat {\varphi }}}}{\partial \varphi }}=-\cos \varphi \mathbf {\hat {x}} -\sin \varphi \mathbf {\hat {y}} =-\sin \theta \mathbf {\hat {r}} -\cos \theta {\boldsymbol {\hat {\theta }}}$

### General unit vectors

Common themes of unit vectors occur throughout physics and geometry:
| Unit vector | Nomenclature | Diagram |
| Tangent vector to a curve/flux line | $\mathbf {\hat {t}}$ | A normal vector $\mathbf {\hat {n}}$ to the plane containing and defined by the radial position vector $r\mathbf {\hat {r}}$ and angular tangential direction of rotation $\theta {\boldsymbol {\hat {\theta }}}$ is necessary so that the vector equations of angular motion hold. |
| Normal to a surface tangent plane/plane containing radial position component and angular tangential component | $\mathbf {\hat {n}}$ In terms of polar coordinates; $\mathbf {\hat {n}} =\mathbf {\hat {r}} \times {\boldsymbol {\hat {\theta }}}$ | A normal vector $\mathbf {\hat {n}}$ to the plane containing and defined by the radial position vector $r\mathbf {\hat {r}}$ and angular tangential direction of rotation $\theta {\boldsymbol {\hat {\theta }}}$ is necessary so that the vector equations of angular motion hold. |
| Binormal vector to tangent and normal | $\mathbf {\hat {b}} =\mathbf {\hat {t}} \times \mathbf {\hat {n}}$ | A normal vector $\mathbf {\hat {n}}$ to the plane containing and defined by the radial position vector $r\mathbf {\hat {r}}$ and angular tangential direction of rotation $\theta {\boldsymbol {\hat {\theta }}}$ is necessary so that the vector equations of angular motion hold. |
| Parallel to some axis/line | $\mathbf {\hat {e}} _{\parallel }$ | One unit vector $\mathbf {\hat {e}} _{\parallel }$ aligned parallel to a principal direction (red line), and a perpendicular unit vector $\mathbf {\hat {e}} _{\bot }$ is in any radial direction relative to the principal line. |
| Perpendicular to some axis/line in some radial direction | $\mathbf {\hat {e}} _{\bot }$ | One unit vector $\mathbf {\hat {e}} _{\parallel }$ aligned parallel to a principal direction (red line), and a perpendicular unit vector $\mathbf {\hat {e}} _{\bot }$ is in any radial direction relative to the principal line. |
| Possible angular deviation relative to some axis/line | $\mathbf {\hat {e}} _{\angle }$ | Unit vector at acute deviation angle φ (including 0 or π/2 rad) relative to a principal direction. |

## Curvilinear coordinates

In general, a coordinate system may be uniquely specified using a number of linearly independent unit vectors $\mathbf {\hat {e}} _{n}$ (the actual number being equal to the degrees of freedom of the space). For ordinary 3-space, these vectors may be denoted $\mathbf {\hat {e}} _{1},\mathbf {\hat {e}} _{2},\mathbf {\hat {e}} _{3}$. It is nearly always convenient to define the system to be orthonormal and right-handed:
    $\mathbf {\hat {e}} _{i}\cdot \mathbf {\hat {e}} _{j}=\delta _{ij}$
    $\mathbf {\hat {e}} _{i}\cdot (\mathbf {\hat {e}} _{j}\times \mathbf {\hat {e}} _{k})=\varepsilon _{ijk}$
where $\delta _{ij}$ is the Kronecker delta (which is 1 for i = j, and 0 otherwise) and $\varepsilon _{ijk}$ is the Levi-Civita symbol (which is 1 for permutations ordered as ijk, and −1 for permutations ordered as kji).

## Right versor

A unit vector in $\mathbb {R} ^{3}$ was called a right versor by W. R. Hamilton, as he developed his quaternions $\mathbb {H} \subset \mathbb {R} ^{4}$. In fact, he was the originator of the term vector, as every quaternion $q=s+v$ has a scalar part s and a vector part v. If v is a unit vector in $\mathbb {R} ^{3}$, then the square of v in quaternions is –1. Thus by Euler's formula, $\exp(\theta v)=\cos \theta +v\sin \theta$ is a versor in the 3-sphere. When θ is a right angle, the versor is a right versor: its scalar part is zero and its vector part v is a unit vector in $\mathbb {R} ^{3}$.
Thus the right versors extend the notion of imaginary units found in the complex plane, where the right versors now range over the 2-sphere $\mathbb {S} ^{2}\subset \mathbb {R} ^{3}\subset \mathbb {H}$ rather than the pair {i, –i} in the complex plane.
By extension, a right quaternion is a real multiple of a right versor.