The relative orientation between two orthogonal right-handed 3D Cartesian coordinate systems, let's call them xyz and ABC, is described by a real orthogonal 3x3 rotation matrix R, which is commonly parametrized by three so-called Euler angles α, β and γ.
The angles define the relative orientation between xyz and ABC. The angles describe three successive rotations of one coordinate system xyz that align it with the other one, ABC.
This is called the zyz or y convention, for obvious reasons. It is used in many textbooks:
The z axis is called the vertical, the y' axis (same as the y'' axis) is called the line of nodes, and z'' (same as C) is termed the figure axis.
The matrix describing this rotation is a product of 3 matrices describing one single-axis rotation each.
where c and s mean cos() and sin(). Rotation matrices are real and orthogonal, i.e. their inverse is equal to their transpose. The determinant of R is +1.
The rows and columns of R have simple geometric meaning:
More generally, each of the elements or R is the scalar product of one of the ABC vectors onto one of the xyz vectors. Taking the acos of that product gives the angle between the two respective axes. Therefore, R is sometimes also called a direction cosine matrix (DCM).
The same rotation matrix is obtained, if the rotations are carried out in reverse order around other axes: First by γ around the z axis, then by β around the original y axis, and finally by α again around the original z axis. In other words
To obtain the Euler angles for the rotation R2: ABC → xyz from the Euler angles of the rotation R1:xyz → ABC (the one described above), use
i.e., interchange and and invert all the signs.
Of course, the addition to any angle of an arbitrary multiple of 2 has no effect on the rotation matrix.
There are, however, other sets of Euler angles which give the same rotation matrix
So, if you invert the sign of β, you have to add (or subtract) to both α and γ.
As a consequence, there is a one-to-one correspondence between Euler angles and rotation matrices only if the Euler angle domains are restricted, e.g. to
In addition to the set of three Euler angles and the rotation matrix, a rotation can also be represented by a vector specifying the rotation axis and the angle of rotation around this axis.
This representation is rarely used in EPR, but is visually very simple to understand.
The labelling of the principal axes of a tensor is completely arbitrary. There are in total 24 possible xyz arrangements that describe the principal axes frame of a tensor. Correspondingly, there are 24 different sets of Euler angles. Why 24? It's easy to enumerate them: The z axis can point in any of the six principal axis direction of an ellipsoid, and the xy axis pair can have 4 possible orientations for each z orientation, giving 24 in total.
If the z axis is required to points along the axes with the largest eigenvalue of the tensor, then it can only have 2 orientations, and there are only 8 different coordinate systems and 8 sets of Euler angles.
Rotations can be active or passive. In active ("alibi") rotations, the object (vector, tensor) is rotated and the coordinate system is left unchanged. In passive ("alias") rotations, the object is left unchanged and the coordinate axes system is rotated.
Here is how passive rotations can be done using the rotation matrix R as defined above: For a vector v_xyz defined in the xyz frame, v_ABC = R*v_xyz is the same vector as v_xyz, but represented in the ABC frame instead of the xyz frame. For a tensor T_xyz defined in the xyz frame, T_ABC = R*T_xyz*RT is the same tensor as T, but represented in the ABC frame instead of the xyz frame.