unique up to a scalar factor unless . Further, the equation may be rewritten which shows that lies in the null space of . Viewed in another way, is an eigenvector of corresponding to the eigenvalue . Every rotation matrix must have this eigenvalue, the other two eigenvalues being complex conjugates of each other. It follows that a general rotation matrix in three dimensions has, up to a multiplicative constant, only one real eigenvector. One way to determine the rotation axis is by showing that: Since is a skew-symmetric matrix, we can choose such that The matrix–vector product becomes a cross product of a vector with itself, ensuring that the result is zero: Therefore, if then The magnitude of computed this way is , where is the angle of rotation. This does not work if is symmetric. Above, if is zero, then all subsequent steps are invalid. In this case, it is necessary to diagonalize and find the eigenvector corresponding to an eigenvalue of 1. Determining the angle To find the angle of a rotation, once the axis of the rotation is known, select a vector perpendicular to the axis. Then the angle of the rotation is the angle between and . A more direct method, however, is to simply calculate the trace: the sum of the diagonal elements of the rotation matrix. Care should be taken to select the right sign for the angle to match the chosen axis: from which follows that the angle's absolute value is Rotation matrix from axis and angle The matrix of a proper rotation by angle around the axis , a unit vector with , is given by: A derivation of this matrix from first principles can be found in section 9.2 here. The basic idea to derive this matrix is dividing the problem into few known simple steps. First rotate the given axis and the point such that the axis lies in one of the coordinate planes (, or ) Then rotate the given axis and the point such that the axis is aligned with one of the two coordinate axes for that particular coordinate plane (, or ) Use one of the fundamental rotation matrices to rotate the point depending on the coordinate axis with which the rotation axis is aligned. Reverse rotate the axis-point pair such that it attains the final configuration as that was in step 2 (Undoing step