Spatial Math & Rigid-Body Motion

rotation matrix

A rotation matrix is a tidy grid of nine numbers — three rows by three columns — that captures an orientation, that is, exactly how a body is turned. The cleanest way to read it is column by column: each of its three columns tells you where one of a frame's axes is now pointing after the turn. Stack those three answers side by side and the little grid holds the whole rotation, no angles or wraparound to fuss over. Hand a robot this grid and it knows precisely which way the gripper, the camera, or the whole body is facing.

The same grid is also a machine that re-aims arrows. Multiply a position vector by a rotation matrix and out comes that same vector seen after the rotation — or, just as usefully, the same physical point's numbers translated from one frame into another. This is the everyday workhorse move of spatial robotics: a cup that the camera reports as up-and-to-the-left becomes, after one multiply by the right rotation matrix, a direction the arm can actually steer toward. Apply two rotations in a row by multiplying their matrices together, and you can chain turns as cleanly as following directions step by step.

Not just any nine numbers will do. A genuine rotation matrix is orthonormal — its three columns are each exactly one unit long and all dead perpendicular to one another — and, on top of that, right-handed (its determinant is +1, which rules out mirror flips). Together those conditions are exactly what makes it turn things without stretching, squashing, skewing, or mirroring them. Lengths and angles survive untouched; a cube stays a cube, only spun. That well-behaved family of matrices is what mathematicians call SO(3), the special orthogonal group, which is just a formal name for 'all the honest 3D rotations'. Its great virtue is reliability; its mild cost is using nine numbers to pin down something that only truly needs three, which is one reason quaternions are often preferred when memory or smoothness matters.

A robot's camera spots a target up-and-to-its-left, but the arm thinks in the base frame. Multiplying the target direction by the camera-to-base rotation matrix re-expresses 'up-and-to-the-left of the lens' as a concrete heading the arm can swing toward — same point, restated in the language the arm understands.

One multiply restates a direction from the camera frame into the base frame.

Because its columns are unit-length and perpendicular, a rotation matrix's inverse — the reverse turn — is just its mirror across the diagonal (its transpose), which makes undoing a rotation cheap and exact.

Also called
direction cosine matrixDCM方向余弦矩阵旋轉矩陣