unit quaternion (for rotation)
A unit quaternion is a way to store a 3D rotation as just four numbers that, taken together, behave very nicely. You can think of it as a careful repackaging of the axis–angle idea: it quietly encodes which axis to spin around and how far, but spreads that information across four values so the math becomes smooth and reliable. The word 'unit' means the four numbers are scaled so their combined size is exactly one, which is the condition that makes the quaternion describe a pure rotation and nothing else.
Robots and game engines reach for quaternions because they dodge the problems of the simpler alternatives. Unlike Euler angles, a quaternion never suffers gimbal lock, so no orientation ever causes the controls to seize up. Unlike a rotation matrix, which needs nine numbers, a quaternion needs only four, so it is cheaper to store and pass around. And it is numerically stable: after many turns are combined, small rounding errors can be cleaned up just by rescaling the four numbers back to size one, instead of slowly distorting the rotation.
The price is that quaternions are hard to read by eye, since the four numbers do not map onto anything a human pictures directly, and they have a quirk where a rotation and its 'double cover' twin describe the same physical pose. So engineers usually compute and blend orientations as quaternions under the hood, then convert to roll-pitch-yaw or an axis and angle only when a person needs to understand the result. Smoothly blending between two orientations, an operation called slerp, is an everyday quaternion task in animation and robot motion.
A flight controller blends a drone's current orientation toward its target orientation using slerp on quaternions, giving a smooth turn with no sudden flips or lock-ups.
Quaternions make smooth, glitch-free blending between two orientations routine.
Only quaternions of size exactly one represent rotations; a quaternion that drifts off that size has to be renormalized, which is the cheap maintenance trick that keeps long chains of rotation clean.