A generalization of the rotation matrix and related results