What is the motivation for quaternions? I know imaginary numbers solve $x^2 +1=0$, but what is the motivation for quaternions?
 A: 
$\qquad\qquad\qquad\qquad\qquad$ What is the motivation for quaternions?



Hamilton knew that the complex numbers could be interpreted as points in a plane, and he was looking for a way to do the same for points in three-dimensional space. However, $[$he$]$ had been stuck on the problem of multiplication and division for a long time. He could not figure out how to calculate the quotient of the coordinates of two points in space.

$\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad$ — Quaternions: History


$\quad$ In $1843$, Hamilton knew that the complex numbers could be viewed as points in a plane and that they could be added and multiplied together using certain geometric operations. $~$ Hamilton sought to find a way to do the same for points in space. But $[$he$]$  had been stuck on defining the appropriate multiplication. According to a letter Hamilton wrote later to his son Archibald: 

$\quad$ Every morning in the early part of October $1843$, on my coming down to breakfast, your brother William Edward and yourself used to ask me: "Well, Papa, can you multiply triples?" Whereto I was always obliged to reply, with a sad shake of the head, "No, I can only add and subtract them."


$\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\quad$ — History of Quaternions: Hamilton's Discovery
A: Two important applications come to mind:


*

*They model rotations of the sphere, much like the complex numbers model rotations of the circle.

*You can get the four squares theorem, that every integer $n$ can be represented as $n=a^2+b^2+c^2+d^2$ for some integers $a,b,c,d \geq 0$, using unique factorization-like properties of the quaternions. This has to do with thinking of the norm of a quaternion $N(a+bi+cj+dk):= (a+bi+cj+dk)(a-bi-cj-dk) = a^2+b^2+c^2+d^2$.
Similarly, you can prove that in any commutative ring $R$, if $a$
and $b$ are each the sum of four squares, then $ab$ is the sum of
four squares, using an algebraic identity that actually doesn't
involve the quaternions, but is completely absurd to discover except
by proving that for quaternions $N(\alpha\beta) =
    N(\alpha)N(\beta)$.
In short, they have both important geometric and algebraic properties, particularly at the intersection.
A: A modern motivation is to model 3D orientation and rotation in computer graphics. If you use the simple model of Euler angles, you may run into a problem: gimbal lock. Quaternions (and rotation matrices) avoid this.
A: Hamilton (and Graves) wanted to generalize $\mathbb C$ - if viewed as $\mathbb R^2$ with a multiplication that turns it into a field with a multiplicative absolute value.  They were looking for something similar in $\mathbb{R}^n$ for $n>2$.  It turns out that Hamilton spent 13 years in vain with $n=3$ although it was essentially known since Diophantus that what he was looking for was impossible.  He finally figured out that he could succeed for $n=4$ if he gave up commutativity.
(This is a short summary of chapter 20 of Stillwell's wonderful "Mathematics and Its History".)

A: With the complex numbers in hand, it's natural to wonder what other systems of numbers containing the real numbers one might have. Before constructing the quaternions, Hamilton tried in vain to construct a $3$-dimensional system; it turns out that this is impossible, and you can see a reproduction of Hamilton's own proof in this recent question: Why should I consider the components $j^2$ and $k^2$ to be $=-1$ in the search for quaternions?
In fact, if you require that your "number system" be a division algebra (over the real numbers), it turns out that there are just four such systems: the real numbers, the complex numbers, the quaternions, and the octonions, so each of these is quite special. John Baez' paper "The Octonions" is a superb starting place for exploring this circle of ideas.
(NB there are plenty of interesting "number systems containing the real numbers", i.e., finite-dimensional algebras over $\mathbb{R}$; in other words, division algebras are not the only interesting thing we can ask for.)
A: Complex numbers do indeed enable us to solve certain previously unsolvable condition equations; but that is not the motivation for them. It is unfortunately common to confuse application with motivation. 
Complex numbers extends the idea of quantity as algebraically-expressed-location to two dimensions after "negation" introduces it in one dimension.
The obvious next extension is to three dimensions; but alas, the same neat properties from one and two dimensions don't hold in three dimensions, as related by others above. That doesn't mean three dimensions is uninteresting; but just that this notational device for representation is less interesting. 
