Sometimes, mathematical discoveries come about because people are trying to solve real-world application problems. Other times, mathematical discoveries come about because people have incredible imagination and insight, but then those discoveries are seemingly useless, for a while.
Quaternions are something that fall into the latter category. These members of a noncommutative divisional algebra were first discovered by Sir William Rowan Hamilton in 1843. They were fun for theoretical mathematicians but did not seem to have a practical use until 1985, when computer scientists realized that they can be used in digital animation. Quaternions are perfect for work involving orienting and rotating objects in 3-D space. (4)