Why don't quaternions contradict the Fundamental Theorem of Algebra? I don't pretend to know anything much about the Fundamental Theorem of Algebra (FTA), but I do know what it states: for any polynomial with degree $n$, there are exactly $n$ solutions (roots). 
Well, when it comes to quaternions, apparently $i^2=j^2=k^2=-1$, but $i\ne j\ne k\ne i$. So now, we have apparently found three solutions to the second-degree polynomial $x^2=-1$.
I'm not aware of the justification of the FTA, nor I am I aware of Hamilton's justification for quaternions. However, I know a contradiction when I see one. What am I missing here?
 A: Let me put my comments in an answer. As SpamIAm said, the FTA has a generalization in any integral domain : 

If $R$ is an integral domain, then any polynomial $P \in R[x]$ of degree $n$ has at most $n$ roots (counted with multiplicity)

The proof is that : $\quad $(a field is commutative, otherwise we say a non-commutative field)


*

*Any integral domain can be embedded in its field of fraction $K$

*Any field $K$ can be embedded in its algebraic closure $\overline{K}$

*In an algebraically closed field $\overline{K}$, the FTA is

Any polynomial $P \in \overline{K}[x]$ of degree $n$ has exactly $n$ roots (counted with multiplicity)

proof : 


*

*since $\overline{K}$ is algebraically closed $P \in \overline{K}[x]$ has at least one root $a \in \overline{K}$ 

*if $F$ is a field, then $P \in F[x]$ and $ P(a) = 0$ for some $ a \in F \implies P(x) = (x-a)Q(x)$ for some $Q\in F[x]$ (see polynomial long division)

*Repeating the factorization on $Q(x)$ you have $P(x) = C \prod_{j=1}^n (x-a_j)$

*If $R$ is an integral domain and $P(x) = C \prod_{j=1}^n (x-a_j)$ with $a_j \in R$ and $C \ne 0$ then $P(b) = 0 \implies b = a_j$ for some  $j$
This way you can see what steps fail for $\mathbb{H}$ a non-commutative field.
A: You already have plenty of answers, but I'd like to add some information in the hope that it might help other students, not only you. You wrote "I do know what [FTA] states: for any polynomial with degree $n$, there are exactly $n$ solutions (roots)." What you quoted here is not the FTA but rather the conclusion half of the FTA. You omitted the hypothesis half, which is that the coefficients of the polynomial and the roots that are being counted are complex numbers. As the other answers have explained, the hypothesis is not satisfied when you're dealing with quaternions, as these are not complex numbers, so there's no reason to expect the conclusion to be true.  The reason I'm rehashing this information is that your problem here is one that I've seen very often in teaching various levels of mathematics: a tendency to pay attention only to the conclusion of a theorem, ignoring the hypothesis.  Some students seem to feel that the hypothesis is there only because mathematicians like to make theorems look complicated.  As you found here, the hypothesis is there because we like to make theorems be correct; if you omit (or ignore) the hypothesis, you get false statements, like the statement that quadratic polynomials should have only two quaternion roots.  So the moral of this sermon is that, when learning a theorem, you need to learn the whole theorem, hypothesis and conclusion. Learning only the conclusion leads to errors.
A: dxiv answered the question perfectly in the comment; but let me elaborate.
The fundamental theorem of algebra states that every polynomial of the form
$$p(z) = a_{n}z^{n} + a_{n-1}z^{n-1} + \dots + a_{1}z + a_{0}$$ where each $a_{n}$ is a complex number.
can be factored as
$$p(z) = a_{n}(z - z_{1})\cdot(z - z_{2})\cdots(z - z_{n-1})\cdot(z - z_{n})$$
for some choice of complex numbers $z_{1},\cdots,z_{n}$.
Now, this is equivalent to saying there precisely $n$ solutions which lie in the complex numbers to the equation $p(z) = 0$, so long as we agree to count solutions in terms of their multiplicity.
Your example shows there are other solutions which lie within the Quaternion field.  Since not all of your solutions are complex numbers, there is no contradiction.
Hope that helps.
A: There is actually a more basic result at work here.
Proposition: Let $R$ be an integral domain and $R[x]$ be the ring of polynomials with coefficients in $R$.  If $f \in R[x]$ has degree $n$, then $f$ has at most $n$ roots in $R$.
You have seen that this result is not true for polynomials with coefficients in the quaternions.  But the quaternions are not an integral domain because multiplication is not commutative.
The result above says that a degree $n$ polynomial has at most $n$ roots; the fundamental theorem of algebra states that a degree $n$ polynomial has exactly $n$ roots for polynomials with complex coefficients.
EDIT: See the wonderful answer here for the exact spot where the usual proof of the above proposition breaks down in the case of the quaternions.  It basically boils down to the fact that in the polynomial ring, the indeterminate $x$ commutes with all scalars, i.e., $ax = xa$ for all $a \in R$.  But if $R$ is noncommutative then substituting $b \in R$ for $x$ may cause problems, as it is not always true that $ab = ba$.
