The Kabsch Algorithm finds the optimal translation and rotation that minimizes the distance between two sets of matched points.| Sublucid Geometry
A rotation matrix is really just an orthonormal basis (a set of three orthogonal, unit vectors representing the x, y, and z bases of your rotation).| Sublucid Geometry