The fundamental theorem of algebra (FTA) states:
Every polynomial of degree n with complex coefficients has n roots in the complex numbers.There are many other equivalent versions of this, for example that every real polynomial can be expressed as the product of real linear and real quadratic factors.
Early work with equations only considered positive real roots so the FTA was not relevant. Cardan realized that one could work with numbers outside of the reals while studying a formula for the roots of a cubic equation. While solving x3 = 15x + 4 using the formula he got an answer involving the square root of -121. He manipulated this to obtain the correct answer, x = 4, even though he did not understand exactly what he was doing with these "complex numbers."
In 1572 Bombelli created rules for these "complex numbers." In 1637 Descartes said that one can "imagine" for every equation of degree n, n roots, but these imagined roots do not correspond to any real quantity.
Albert Girard, a Flemish mathematiciam, was the first to claim that there are always n solutions to a polynomial of degree n in 1629 in L'invention en algèbre. He does not say that the solutions are of the form a + bi, a, b real. Many mathematicians accepted Girard's claim that a polynomial equation must have n roots, and proceeded to try to show that these roots were of the form a + bi, a, b real, instead of first showing that they actually existed. This was the downfall of many attempts to prove the FTA.
Various people tried to disprove and prove the FTA. Leibniz gave a "proof" that the FTA was false in 1702 by saying x4 + t4 couldn't be written as the product of two real quadratic factors. He did not realize that the square root of i could be written in the form a+bi, a, b real. In 1742 Euler showed Leibniz's counterexample was incorrect.
D'Alembert in 1746 and Euler in 1749 attempted proofs of the FTA. Lagrange and Laplace attempted proofs, but also failed. They were assuming the existence of roots.
Gauss is credited with the first proof of the FTA in his doctoral thesis of 1799. He spotted the error in the others' proofs, that they were assuming the roots existed and then trying to deduce properties of them. This proof has some gaps in it and is not considered rigorous by today's standards.
In 1814 the Swiss accountant Jean Robert Argand published a proof of the FTA and two years later Gauss published a second proof. This time Gauss's proof was complete and correct. He did a third proof the same year, and in 1849 a fourth proof was completed. This one was the first to show that a polynomial equation of degree n with complex coefficients has n complex roots.