Global 1D Strain 
Consider a rod with initial length L which is stretched to a length L'. The strain measure e, a dimensionless ratio, is defined as the ratio of elongation with respect to the original length,

Infinitesimal 1D Strain 
The above strain measure is defined in a global sense. The strain at each point may vary dramatically if the bar's elastic modulus or crosssectional area changes. To track down the strain at each point, further refinement in the definition is needed.
Consider an arbitrary point in the bar P, which has a position vector x, and its infinitesimal neighbor dx. Point P shifts to P', which has a position vector x', after the stretch. In the meantime, the small "step" dx is stretched to dx'. The strain at point p can be defined the same as in the global strain measure,
Since the displacement , the strain can hence be rewritten as,

General Definition of 3D Strain 
As in the one dimensional strain derivation, suppose that point P in a body shifts to point P after deformation.
The infinitesimal straindisplacement relationships can be summarized as,
where u is the displacement vector, x is coordinate, and the two indices i and j can range over the three coordinates {1, 2, 3} in three dimensional space. Expanding the above equation for each coordinate direction gives,
where u, v, and w are the displacements in the x, y, and z directions respectively (i.e. they are the components of u). 
3D Strain Matrix 
There are a total of 6 strain measures. These 6 measures can be organized into a matrix (similar in form to the 3D stress matrix), shown here,

Engineering Shear Strain 
Focus on the strain e_{xy} for a moment. The expression inside the parentheses can be rewritten as,
where . Called the engineering shear strain, g_{xy} is a total measure of shear strain in the xy plane. In constrast, the shear strain e_{xy} is the average of the shear strain on the x face along the y direction, and on the y face along the x direction.
Engineering shear strain is commonly used in engineering reference books. However, please beware of the difference between shear strain and engineering shear strain, so as to avoid errors in mathematical manipulations. 
Compatibility Conditions 
In the straindisplacement relationships, there are six strain measures but only three independent displacements. That is, there are 6 unknowns for only 3 independent variables. As a result there exist 3 constraint, or compatibility, equations.
These compatibility conditions for infinitesimal strain refered to rectangular Cartesian coordinates are,
In two dimensional problems (e.g. plane strain), all z terms are set to zero. The compatibility equations reduce to,
Note that some references use engineering shear strain () when referencing compatibility equations. 