Unit vector
In mathematics, a unit vector in a normed vector space is a vector (often a spatial vector) whose length is 1 (the unit length). A unit vector is often denoted by a lowercase letter with a superscribed caret or hat, like this: {\hat{\imath}} (pronounced "i-hat").
In Euclidean space, the dot product of two unit vectors is simply the cosine of the angle between them. This follows from the formula for the dot product, since the lengths are both 1.
The normalized vector or versor \boldsymbol{\hat{u}} of a non-zero vector \boldsymbol{u} is the unit vector codirectional with \boldsymbol{u}, i.e.,
where \|\boldsymbol{u}\| is the norm (or length) of \boldsymbol{u}.  The term normalized vector is sometimes used as a synonym for unit vector.
The elements of a basis are usually chosen to be unit vectors. Every vector in the space may be written as a linear combination of unit vectors. The most commonly encountered bases are Cartesian, polar, and spherical coordinates. Each uses different unit vectors according to the symmetry of the coordinate system. Since these systems are encountered in so many different contexts, it is not uncommon to encounter different naming conventions than those used here.

# Cartesian coordinates
In the three-dimensional Cartesian coordinate system, the unit vectors codirectional with the x, y, and z axes are sometimes referred to as versors of the coordinate system.
These are often written using normal vector notation (e.g. i, or \vec{\imath}) rather than the caret notation, and in most contexts it can be assumed that i, j, and k, (or \vec{\imath}, \vec{\jmath}, and  \vec{k}) are versors of a Cartesian coordinate system (hence a tern of reciprocally orthogonal unit vectors). The notations (\boldsymbol\hat{x}, \boldsymbol\hat{y}, \boldsymbol\hat{z}), (\boldsymbol\hat{x}_1, \boldsymbol\hat{x}_2, \boldsymbol\hat{x}_3), (\boldsymbol\hat{e}_x, \boldsymbol\hat{e}_y, \boldsymbol\hat{e}_z), or (\boldsymbol\hat{e}_1, \boldsymbol\hat{e}_2, \boldsymbol\hat{e}_3), with or without hat/caret, 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, used to identify an element of a set or array or sequence of variables). These vectors represent an example of standard basis.
When a unit vector in space is expressed, with Cartesian notation, as a linear combination of i, j, k, 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 unit vectors appropriate to cylindrical symmetry are: \boldsymbol{\hat{s}} (also designated \boldsymbol{\hat{r}} or \boldsymbol{\hat \rho}), the distance from the axis of symmetry; \boldsymbol{\hat \phi}, the angle measured counterclockwise from the positive x-axis; and \boldsymbol{\hat{z}}. They are related to the Cartesian basis \hat{x}, \hat{y}, \hat{z} by:
It is important to note that \boldsymbol{\hat{s}} and \boldsymbol{\hat \phi} are functions of \phi, and are not constant in direction. When differentiating or integrating in cylindrical coordinates, these unit vectors themselves must also be operated on. For a more complete description, see Jacobian. The derivatives with respect to \phi are:

# Spherical coordinates
The unit vectors appropriate to spherical symmetry are: \boldsymbol{\hat{r}}, the radial distance from the origin; \boldsymbol{\hat{\phi}}, the angle in the x-y plane counterclockwise from the positive x-axis; and \boldsymbol{\hat \theta}, the angle from the positive z axis. To minimize degeneracy, the polar angle is usually taken 0\leq\theta\leq 180^\circ. It is especially important to note the context of any ordered triplet written in spherical coordinates, as the roles of \boldsymbol{\hat \phi} and \boldsymbol{\hat \theta} are often reversed. Here, the American naming convention is used. This leaves the azimuthal angle \phi defined the same as in cylindrical coordinates. The Cartesian relations are:
The spherical unit vectors depend on both \phi and \theta, and hence there are 5 possible non-zero derivates. For a more complete description, see Jacobian. The non-zero derivatives are:

# Curvilinear Coordinates
In general, a coordinate system may be uniquely specified using a number of linearly independent unit vectors \boldsymbol\hat{e}_n equal to the degrees of freedom of the space. For ordinary 3-space, these vectors may be denoted \boldsymbol{\hat{e}_1}, \boldsymbol{\hat{e}_2}, \boldsymbol{\hat{e}_3}. It is nearly always convenient to define the system to be orthonormal and right-handed:
\boldsymbol{\hat{e}_i} \cdot \boldsymbol{\hat{e}_j} = \delta_{ij} 
\boldsymbol{\hat{e}_1} \cdot (\boldsymbol{\hat{e}_2} \times \boldsymbol{\hat{e}_3}) = 1 
where ij is the Kronecker delta.