determinant of . That is, is only guaranteed to be orthogonal, not a rotation matrix. This is unavoidable; an with negative determinant has no uniquely defined closest rotation matrix. Axis and angle To efficiently construct a rotation matrix from an angle and a unit axis , we can take advantage of symmetry and skew-symmetry within the entries. If , , and are the components of the unit vector representing the axis, and then Determining an axis and angle, like determining a quaternion, is only possible up to the sign; that is, and correspond to the same rotation matrix, just like and . Additionally, axis–angle extraction presents additional difficulties. The angle can be restricted to be from 0° to 180°, but angles are formally ambiguous by multiples of 360°. When the angle is zero, the axis is undefined. When the angle is 180°, the matrix becomes symmetric, which has implications in extracting the axis. Near multiples of 180°, care is needed to avoid numerical problems: in extracting the angle, a two-argument arctangent with equal to avoids the insensitivity of arccos; and in computing the axis magnitude in order to force unit magnitude, a brute-force approach can lose accuracy through underflow . A partial approach is as follows: The -, -, and -components of the axis would then be divided by . A fully robust approach will use a different algorithm when , the trace of the matrix , is negative, as with quaternion extraction. When is zero because the angle is zero, an axis must be provided from some source other than the matrix. Euler angles Complexity of conversion escalates with Euler angles (used here in the broad sense). The first difficulty is to establish which of the twenty-four variations of Cartesian axis order we will use. Suppose the three angles are , , ; physics and chemistry may interpret these as while aircraft dynamics may use One systematic approach begins with choosing the rightmost axis. Among all permutations of , only two place that axis first; one is an even permutation and the other odd. Choosing parity thus establishes the middle axis. That leaves two choices for the left-most axis, either duplicating the first or not. These three choices gives us variations; we double that to 24 by choosing static or rotating axes. This is enough to construct a matrix from angles, but triples differing in many ways can give