Part II · Algebra Chapter 14 of 60
Polynomials
In 1535, in Venice, two mathematicians exchanged thirty problems, and every problem set by one of them was a cubic equation. Let’s follow that duel to the end, and along the way gather the weapons used ever since to solve equations of high degree.
Builds on: 13 · Sequences and induction
You will learn
- divide polynomials by long division and by Horner’s method, and find a remainder with the remainder theorem
- look for rational roots and factor a polynomial
- recover a polynomial from points and understand how secret sharing is built on this
- solve cubic equations with Cardano’s formula and see where it runs into the square root of a negative number
3Why is there no formula for the roots of a quintic?
The last chapter ended with the equation $x^3 - 6x^2 + 11x - 6 = 0$. We have no formula for it, but guessing suggests itself. At $x = 1$ we get $1 - 6 + 11 - 6 = 0$: there’s one root. Try $2$: $8 - 24 + 22 - 6 = 0$. Try $3$: $27 - 54 + 33 - 6 = 0$. Three roots in three tries. Lucky? Not quite: there wasn’t much choice here, and by the middle of the chapter it’ll be clear why. But if you change the constant term from $-6$ to $-5$, guessing gives nothing, and two of the three roots vanish altogether.
Almost five hundred years ago such equations were solved not at a desk but in public, with a reputation at stake. Posts at Italian universities were given for a term, and often had to be defended in public disputations: a defeat could cost you your students and your salary. This chapter is about the most famous of those duels and its aftermath, which dragged on for half a century. But first, the weapons. The mathematicians of that time had a common arsenal, and we’ll assemble it again: division, remainders, fast evaluation, the link between roots and coefficients.
The challenge
Around 1515 Scipione del Ferro, a professor at the University of Bologna, found a way to solve equations of the form “cube and things equal a number”, in our terms $x^3 + px = q$ with positive $p$ and $q$. He didn’t publish it. A secret method was capital: with it you could win any disputation. Shortly before his death, in 1526, del Ferro passed the method on to his pupil Antonio Maria Fiore.
Fiore was a mathematician of modest ability, but with a secret weapon. At the beginning of 1535 he challenged Niccolò Tartaglia of Brescia, who taught mathematics in Venice. The terms were recorded by a notary: each would give the other thirty problems, with forty or fifty days to solve them, and whoever solved more would win honour and a small prize. All thirty of Fiore’s problems turned out to be of one type, “cube and things equal a number”. One of them, for example, asked for a number which, together with its cube root, makes six. If we call the cube root $x$, we get $x^3 + x = 6$.
Fiore counted on his opponent failing to solve a single problem. When Tartaglia got the list, he realised that just one type of equation had been set against him, and guessed that Fiore had a rule for it. What did he have himself? Let’s look more closely at what the fight was about.
The left side of Fiore’s equation, $x^3 + x - 6$, is a sum of powers of the unknown multiplied by numbers. Such expressions have come up more than once in past chapters: $ax + b$, $ax^2 + bx + c$, and in the chapter on counting even the way a number is written: $1331 = 1 \cdot 10^3 + 3 \cdot 10^2 + 3 \cdot 10 + 1$. It’s time to give them a name.
A polynomial in $x$ is an expression of the form $a_n x^n + a_{n-1}x^{n-1} + \dots + a_1 x + a_0$, where $a_0, a_1, \dots, a_n$ are numbers, called its coefficients. If $a_n \ne 0$, the number $n$ is called the degree of the polynomial, $a_n$ the leading coefficient, and $a_0$ the constant term.
The number $5$ is a polynomial too, of degree zero. The number $0$ has no degree at all: it has no non-zero coefficient. Polynomials are added, subtracted and multiplied by the rules for expanding brackets from chapter 7, and the result is again a polynomial. The degree of a product of non-zero polynomials is the sum of their degrees: the leading terms $a_n x^n$ and $b_m x^m$ give $a_n b_m x^{n+m}$, and no other term reaches that degree.
The likeness to numbers goes deeper than it seems. The numeral $1331$ is the value of the polynomial $x^3 + 3x^2 + 3x + 1$ at $x = 10$. And this polynomial equals $(x + 1)^3$, so $1331 = 11^3$. Numbers in positional notation are polynomials with the base substituted. And like numbers, polynomials can be divided with a remainder.
A root of a polynomial $P(x)$ is a number $a$ with $P(a) = 0$. The roots of a polynomial are the roots of the equation $P(x) = 0$.
Long division
Remember division with remainder from chapter 4: $1000 = 7 \cdot 142 + 6$, and the remainder is smaller than the divisor. With polynomials it’s the same, only “smaller” means “of lower degree”.
The quotient is found just as in long division of numbers. Look at the leading term of the dividend and ask: what must the leading term of the divisor be multiplied by to get it? For $x^3 - 6x^2 + 11x - 6$ and $x - 1$ the answer is $x^2$. Multiply the whole divisor by $x^2$, subtract, and repeat with what’s left. Each step wipes out the leading term, the degree of the remainder falls, and sooner or later it becomes less than the degree of the divisor.
For any polynomial $P$ and non-zero polynomial $S$ there exist unique polynomials $Q$ and $R$ such that $P = S \cdot Q + R$, where $R$ is the zero polynomial or a polynomial of lower degree than $S$.
Existence is proved by the long division algorithm itself. If the degree of $P$ is less than that of $S$ (or $P$ is zero), take $Q = 0$ and $R = P$. Otherwise let $P$ have degree $n$ and leading coefficient $a$, and $S$ degree $m \le n$ and leading coefficient $s$. The monomial $\frac{a}{s}x^{n-m}$ multiplied by $S$ gives a polynomial with the same leading term $ax^n$ as $P$, so the difference $P_1 = P - \frac{a}{s}x^{n-m}S$ is either zero or of degree less than $n$. Do the same with $P_1$. The degrees of the remainders strictly decrease, and non-negative integers can’t decrease forever, so after finitely many steps the remainder becomes zero or a polynomial of degree less than $m$. The sum of all the monomials written down is the quotient $Q$.
Uniqueness. Suppose $P = SQ_1 + R_1 = SQ_2 + R_2$, where both remainders are zero or of degree less than $m$. Subtract one from the other: $S(Q_1 - Q_2) = R_2 - R_1$. If $Q_1 \ne Q_2$, the left side is a product of non-zero polynomials, and its degree is at least $m$, because degrees add under multiplication. The right side is a polynomial of degree less than $m$ or zero. A contradiction; so $Q_1 = Q_2$, and then $R_1 = R_2$ too.
The first example ended in zero: $x^3 - 6x^2 + 11x - 6 = (x - 1)(x^2 - 5x + 6)$. The quadratic in brackets factors by Vieta, $x^2 - 5x + 6 = (x - 2)(x - 3)$, and the equation from the start of the chapter is completely solved. But there’s a pattern behind this: the division by $x - 1$ came out exact precisely because $1$ is a root. And if the remainder hadn’t been zero, what would it have been?
A remainder without division
The remainder on division by $x - a$ can be found without dividing at all.
The remainder when a polynomial $P(x)$ is divided by $x - a$ equals $P(a)$. In particular, $P(x)$ is divisible by $x - a$ with no remainder if and only if $a$ is a root of $P(x)$.
The idea: write down the division with remainder and substitute $x = a$ into it. The divisor $x - a$ has degree one, so by the division theorem the remainder is the zero polynomial or a polynomial of degree zero, that is, in either case a number $r$:
$$P(x) = (x - a)\,Q(x) + r.$$This is an equality of polynomials; it holds for every $x$, including $x = a$. Then the first term equals $(a - a)\,Q(a) = 0$, leaving $P(a) = r$. The second part: if $P(a) = 0$, then $r = 0$ and $P(x) = (x - a)\,Q(x)$; conversely, if $P(x) = (x - a)\,Q(x)$, then $P(a) = 0 \cdot Q(a) = 0$.
In English this is usually called the remainder theorem, and its second half the factor theorem. In other textbooks it bears the name of Étienne Bézout, the same Bézout whose name was given in chapter 4 to the identity for the gcd.
Find the remainder when $x^{2026} + 3x + 5$ is divided by $x + 1$.
By the remainder theorem the remainder is the value of the polynomial at $x = -1$: $(-1)^{2026} + 3 \cdot (-1) + 5 = 1 - 3 + 5 = 3$. We didn’t have to divide a polynomial of degree two thousand and twenty-six.
The theorem has a consequence that the whole chapter rests on.
A non-zero polynomial of degree $n$ has at most $n$ distinct roots.
The idea: each root splits a factor of degree one off the polynomial and takes away one unit of degree, and the degree is finite. We use induction on $n$, as in the chapter on sequences. Base: a polynomial of degree $0$ is a non-zero number and has no roots.
Step. Suppose the statement holds for degree $n - 1$, and let the polynomial $P$ of degree $n$ have a root $a_1$ (if it has no roots, there’s nothing to prove). By the remainder theorem $P(x) = (x - a_1)\,Q(x)$, and $Q$ has degree $n - 1$, because degrees add under multiplication. Take any other root $b \ne a_1$. Then $0 = P(b) = (b - a_1)\,Q(b)$, and since $b - a_1 \ne 0$, we have $Q(b) = 0$: every root of $P$ other than $a_1$ is a root of $Q$. By the induction hypothesis $Q$ has at most $n - 1$ distinct roots, so $P$ has at most $(n - 1) + 1 = n$.
A root can split off several times in a row. $x^3 - 3x + 2 = (x - 1)^2(x + 2)$ has two roots, but $1$ is a double root: at that point the graph touches the axis rather than crossing it.
A number $a$ is a root of multiplicity $k$ of a polynomial $P(x)$ if $P(x)$ is divisible by $(x - a)^k$ but not by $(x - a)^{k+1}$. Roots of multiplicity $1$ are called simple, the rest multiple.
Counted with multiplicity, there are still at most $n$ roots. There can be fewer: $x^2 + 1$ has no real roots at all. Can the stock of numbers be extended so that there are always exactly $n$ roots? That’s the subject of the next chapter.
Horner’s method
To test a candidate root you have to compute $P(a)$. If you raise $a$ to each power from scratch, a polynomial of degree $n$ takes about $\frac{n^2}{2}$ multiplications; if you remember the powers, about $2n$. But you can manage with $n$ multiplications: take $x$ outside the brackets as many times as you can.
$$x^3 - 6x^2 + 11x - 6 = \bigl((x - 6)\,x + 11\bigr)\,x - 6.$$Compute from the inside out: take the leading coefficient, multiply by $x$, add the next coefficient, multiply again, add again. For $x = 2$: $1$, then $1 \cdot 2 - 6 = -4$, then $-4 \cdot 2 + 11 = 3$, then $3 \cdot 2 - 6 = 0$. This is exactly how, in the chapter on counting, we converted numbers to decimal “from left to right”. The trick is the same, only there the base was a number and here it’s the unknown.
Let $P(x) = a_n x^n + \dots + a_1 x + a_0$, and let the numbers $b_0, \dots, b_n$ be built by the rule $b_0 = a_n$, $b_k = a_{n-k} + a\,b_{k-1}$. Then $P(x) = (x - a)\left(b_0 x^{n-1} + b_1 x^{n-2} + \dots + b_{n-1}\right) + b_n$, and in particular $P(a) = b_n$.
Expand the brackets on the right. The monomial $b_k x^{n-1-k}$ times $x$ gives $b_k x^{n-k}$, and times $-a$ gives the term $-a\,b_k x^{n-1-k}$, which meets $b_{k+1}x^{n-1-k}$ from the next monomial. So
$$(x - a)\left(b_0 x^{n-1} + \dots + b_{n-1}\right) + b_n = b_0 x^n + (b_1 - a\,b_0)\,x^{n-1} + \dots + (b_{n-1} - a\,b_{n-2})\,x + (b_n - a\,b_{n-1}).$$The construction rule says exactly that $b_0 = a_n$ and $b_k - a\,b_{k-1} = a_{n-k}$ for $k = 1, \dots, n$. So the coefficients on the right coincide with those of $P$, and the equality holds. Substituting $x = a$ gives $P(a) = b_n$: the remainder theorem, checked once more.
The method gives two answers at once. The last number is the value $P(a)$, which is also the remainder by the remainder theorem. All the ones before it are the coefficients of the quotient on division by $x - a$: the same as long division gave, but without a single letter and without subtracting in columns.
Horner’s method is a way of laying out the computation of $P(a)$ as a table: the coefficients of the polynomial on top, the numbers $b_k$ below. The last of them is the remainder $P(a)$, the others are the coefficients of the quotient of $P(x)$ by $x - a$.
Which numbers to test
Horner quickly answers the question “is $a$ a root?”, but which $a$ should we try? For polynomials with integer coefficients the list of candidates is finite.
Let all the coefficients of the polynomial $a_n x^n + \dots + a_1 x + a_0$ be integers, $a_0 \ne 0$, and let the fraction in lowest terms $\frac pq$ be a root. Then $p$ divides the constant term $a_0$, and $q$ divides the leading coefficient $a_n$.
The idea: substitute the fraction, clear the denominators and see what divides what. Substitute $x = \frac pq$ into $P(x) = 0$ and multiply both sides by $q^n$:
$$a_n p^n + a_{n-1}p^{n-1}q + \dots + a_1 p\,q^{n-1} + a_0 q^n = 0.$$Move the last term to the right and take $p$ out of the rest: $a_0 q^n = -\left(a_n p^{n-1} + a_{n-1}p^{n-2}q + \dots + a_1 q^{n-1}\right)p$. The right side is divisible by $p$, so $a_0 q^n$ is divisible by $p$. The fraction $\frac pq$ is in lowest terms, that is, $p$ and $q$ have no common prime factors, and by the fundamental theorem of arithmetic the prime factors of $q^n$ are the same as those of $q$. So all the prime factors of $p$, with their multiplicities, go into the factorization of $a_0$, that is, $p$ divides $a_0$. (The same follows by applying Euclid’s lemma to each prime factor of $p$.)
In the same way, move the first term to the right and take $q$ out of the rest: $a_n p^n = -\left(a_{n-1}p^{n-1} + \dots + a_1 p\,q^{n-2} + a_0 q^{n-1}\right)q$. So $q$ divides $a_n p^n$, and since $q$ has no prime factors in common with $p^n$, $q$ divides $a_n$.
For a polynomial with leading coefficient $1$ the only candidates left are the integer divisors of the constant term. For $x^3 - 6x^2 + 11x - 6$ these are $\pm1, \pm2, \pm3, \pm6$: eight numbers, of which three turned out to be roots. That’s why the guessing at the start of the chapter worked so quickly. And for $x^3 - 6x^2 + 11x - 5$ there are only four candidates, $\pm1$ and $\pm5$, and none of them works.
Solve the equation $x^3 - 7x + 6 = 0$.
The candidates are the divisors of $6$: $\pm1, \pm2, \pm3, \pm6$. Already $x = 1$ works: $1 - 7 + 6 = 0$. Horner’s method for $a = 1$ (coefficients $1, 0, -7, 6$) gives the bottom row $1,\ 1,\ -6,\ 0$, that is, $x^3 - 7x + 6 = (x - 1)(x^2 + x - 6)$. The quadratic factors by Vieta: $x^2 + x - 6 = (x - 2)(x + 3)$. The roots are $1$, $2$ and $-3$. Note the zero coefficient of $x^2$: leaving it out of the table is the most common mistake.
The trainer will help you get the knack. At the first level you find remainders with the remainder theorem, at the second you divide polynomials, and at the third you solve equations of degree three and four.
A polynomial of your own can be factored in the solver, and all the course’s trainers are collected on the practice page.
Roots and coefficients
In the chapter on quadratic equations we saw how the roots of a quadratic are linked to its coefficients: the sum of the roots of the monic equation $x^2 + px + q = 0$ is $-p$, and their product is $q$. There we also promised to come back to these formulas for any degree. Here we are. If the polynomial $x^3 + ax^2 + bx + c$ has three roots $x_1, x_2, x_3$, then by the remainder theorem it factors:
$$x^3 + ax^2 + bx + c = (x - x_1)(x - x_2)(x - x_3).$$Expand the brackets on the right and compare the coefficients of equal powers. Comparing like this is legitimate, and it’s worth proving separately.
If two polynomials take equal values for all $x$ (or at least at infinitely many points), their coefficients of equal powers coincide.
Subtract one polynomial from the other. The difference is also a polynomial, and every point where the original polynomials are equal is a root of it. There are infinitely many roots, while a non-zero polynomial has no more than its degree, by the corollary of the remainder theorem. So the difference is the zero polynomial: all its coefficients are zero, and that’s exactly the equality of the coefficients.
If $x^3 + ax^2 + bx + c = (x - x_1)(x - x_2)(x - x_3)$, then $x_1 + x_2 + x_3 = -a$, $\ x_1x_2 + x_1x_3 + x_2x_3 = b$ and $x_1x_2x_3 = -c$.
Multiply the brackets one at a time. First $(x - x_1)(x - x_2) = x^2 - (x_1 + x_2)x + x_1x_2$. Multiply by $x - x_3$:
$$\bigl(x^2 - (x_1 + x_2)x + x_1x_2\bigr)(x - x_3) = x^3 - (x_1 + x_2 + x_3)x^2 + (x_1x_2 + x_1x_3 + x_2x_3)x - x_1x_2x_3.$$The terms in $x^2$ came from $-(x_1 + x_2)x \cdot x$ and $x^2 \cdot (-x_3)$, the terms in $x$ from $x_1x_2 \cdot x$ and $-(x_1 + x_2)x \cdot (-x_3)$, the constant term from $x_1x_2 \cdot (-x_3)$. By the lemma on equal polynomials the coefficients on the left and right coincide: $a = -(x_1 + x_2 + x_3)$, $b = x_1x_2 + x_1x_3 + x_2x_3$, $c = -x_1x_2x_3$.
For a polynomial of degree $n$ it all works the same way: in a monic polynomial the coefficient of $x^{n-k}$ equals the sum of all products of the roots taken $k$ at a time, with the sign $(-1)^k$. The roots here are counted with multiplicity. Viète himself considered only positive roots; these relations were written out in general by Albert Girard in 1629.
The second mode shows something that can’t be brushed aside. We shift the graph just a little, and two roots come together, merge into one and disappear. A polynomial of degree $3$ can have three, two or one distinct roots, but never none: for large positive $x$ it has the sign of the leading coefficient, for large negative $x$ the opposite sign, and somewhere in between the graph must cross the axis. Rigorously this follows from the intermediate value theorem for continuous functions (chapter 25). But where the pair of roots goes is a question with no answer among the real numbers.
How many distinct real roots can an equation of degree three have?
It can’t have none: a polynomial of odd degree takes values of opposite signs for large positive and large negative $x$, and its graph crosses the axis. Two distinct roots happen when one of them is double: $x^3 - 3x + 2 = (x - 1)^2(x + 2)$.
Without solving the equation $2x^3 - 3x^2 - 11x + 6 = 0$, find the sum of its roots.
Divide by the leading coefficient: $x^3 - \frac32 x^2 - \frac{11}{2}x + 3 = 0$. The sum of the roots is the coefficient of $x^2$ with its sign reversed, that is, $\frac32$. Check: the roots of this equation are $3$, $-2$ and $\frac12$ (Horner’s method finds them in the second example above), and $3 - 2 + \frac12 = \frac32$.
A polynomial through points
The remainder theorem can do something unexpected too: recover a polynomial from its values. Suppose we know that a polynomial of degree at most two takes the values $1$, $3$, $7$ at the points $0$, $1$, $2$. Which polynomial is it?
This question already came up in the introduction: in the “continue the sequence” problem a polynomial was drawn through five or six points, and we promised to explain why it’s unique. Here’s the promised explanation.
Through $n + 1$ points $(x_0, y_0), \dots, (x_n, y_n)$ with distinct $x_i$ there passes exactly one polynomial of degree at most $n$.
The idea: build the polynomial from parts, each responsible for one point, and get uniqueness from the theorem on the number of roots.
Existence. For each $i$ consider the product $\ell_i(x) = \prod_{j \ne i} \frac{x - x_j}{x_i - x_j}$ over all $j$ except $i$. The denominators aren’t zero, because all the $x_j$ are distinct. The numerator has $n$ factors of degree one, so $\ell_i$ is a polynomial of degree $n$. Substitute $x = x_i$: each fraction becomes $\frac{x_i - x_j}{x_i - x_j} = 1$, and $\ell_i(x_i) = 1$. Substitute any other point $x_k$, $k \ne i$: among the factors there’s a fraction with numerator $x_k - x_k = 0$, and $\ell_i(x_k) = 0$. Set $P(x) = y_0\ell_0(x) + y_1\ell_1(x) + \dots + y_n\ell_n(x)$. This is a sum of polynomials of degree $n$, so the degree of $P$ is at most $n$. At the point $x_k$ all the terms except the $k$th vanish, and the $k$th equals $y_k \cdot 1$. So $P(x_k) = y_k$ for every $k$.
Uniqueness. Let $\tilde P$ be another polynomial of degree at most $n$ with the same values. The difference $P - \tilde P$ has degree at most $n$ and vanishes at all $n + 1$ points $x_0, \dots, x_n$. By the theorem on the number of roots a non-zero polynomial of this degree can’t have $n + 1$ roots, so the difference is zero and $\tilde P = P$.
The polynomial built in the proof is the answer. Written on one line, it’s called Lagrange’s formula.
The polynomial from the interpolation theorem is called the interpolation polynomial, and building it is called interpolation.
The formula is named after Joseph-Louis Lagrange, who presented it in lectures in 1795, although Edward Waring published it as early as 1779. The words “at most $n$” matter: if three points lie on one line, the only polynomial of degree at most two through them is the line itself.
Which polynomial of degree at most two passes through the points $(1, 2)$, $(2, 4)$, $(3, 6)$?
The line $y = 2x$ is a polynomial of degree one, that is, “at most two”, and it passes through all three points. By the interpolation theorem there’s no other: Lagrange’s formula also gives $2x$, with the coefficient of $x^2$ cancelling to zero.
Find the polynomial $P(x)$ of degree at most two for which $P(0) = 3$, $P(1) = 2$, $P(3) = 6$.
We look for $P(x) = ax^2 + bx + c$. From $P(0) = 3$ we get $c = 3$ at once. Then $a + b + 3 = 2$ and $9a + 3b + 3 = 6$, that is, $a + b = -1$ and $3a + b = 1$. Subtract: $2a = 2$, $a = 1$, $b = -2$. Answer: $x^2 - 2x + 3$. Lagrange’s formula gives the same, and by the uniqueness theorem it couldn’t be otherwise.
How to keep a secret
Back to the duellists. Del Ferro’s secret lived in his head and in a notebook that went to his son-in-law; Tartaglia’s lived only in his head. That’s safe as long as the owner keeps quiet. But what if a secret has to be entrusted to several people, so that only several of them together can open it, while no one alone learns anything?
This problem was solved in 1979 by the Israeli mathematician Adi Shamir, the “S” of the RSA cipher (it’s covered in the chapter on modular arithmetic). The solution fits into one sentence: hide the secret in the constant term of a polynomial.
Let the secret be a number $S$, say the PIN $4721$, and let any three of five keepers be able to open it. Take a polynomial of degree two with constant term $S$ and random other coefficients, say $f(x) = 4721 + 1234x + 567x^2$. The first keeper gets the point $(1, f(1))$, the second $(2, f(2))$, and so on to the fifth. Any three know three points of the parabola, recover it completely by the interpolation theorem and compute $f(0) = S$. For keepers number $1$, $2$, $3$ Lagrange’s formula at zero turns into a very simple one: $S = 3f(1) - 3f(2) + f(3)$. Let’s check: $f(1) = 6522$, $f(2) = 9457$, $f(3) = 13{,}526$, and $3 \cdot 6522 - 3 \cdot 9457 + 13{,}526 = 4721$.
And two keepers? Through two points passes a parabola with any value at zero. Whatever PIN you think of, there’s a parabola through both known points and through that PIN. Two keepers can’t tell the real secret from any other.
Secret sharing by Shamir’s scheme: the secret is the constant term of a random polynomial of degree $k - 1$, and each of the $n$ participants gets its value at their own point. Any $k$ participants recover the polynomial and with it the secret; fewer can’t.
Tartaglia’s secret
Let’s go back to February 1535 and test Fiore’s equation with our arsenal. $x^3 + x - 6$ has eight candidate rational roots: $\pm1, \pm2, \pm3, \pm6$. None of them works. Yet $P(1) = -4$ and $P(2) = 4$, so a root lies somewhere between one and two. It’s about $1.6344$, an irrational number. The whole arsenal from the first half of the chapter is powerless against this equation. A formula is needed.
According to Tartaglia himself, he found the general rule eight days before the deadline, and then solved all thirty of Fiore’s problems in less than two hours. Fiore could hardly solve any of Tartaglia’s varied problems. The winner, the story goes, turned down the prize: the honour was enough for him.
Exactly how Tartaglia arrived at the rule is unknown. Cardano later justified it geometrically, by cutting a cube into pieces. We’ll do the same algebraically. Look for a root of $x^3 + px + q = 0$ as a sum of two numbers, $x = u + v$, and recall the cube of a sum from chapter 7:
$$(u + v)^3 = u^3 + v^3 + 3uv(u + v), \qquad\text{that is,}\qquad x^3 - 3uv\,x - (u^3 + v^3) = 0.$$This equation matches ours if $3uv = -p$ and $u^3 + v^3 = -q$. Cube the first condition: $u^3 v^3 = -\frac{p^3}{27}$. Now we know the sum and the product of the numbers $u^3$ and $v^3$, and such numbers, as Vieta tells us, are the roots of the quadratic equation $t^2 + qt - \frac{p^3}{27} = 0$. The cubic equation has come down to a quadratic.
The derivation suggested how to look for a root. Let’s check that what we found really is a root, and find out along the way how many roots the equation has.
Let $\Delta = \frac{q^2}{4} + \frac{p^3}{27} \ge 0$, $A = -\frac q2 + \sqrt\Delta$, $B = -\frac q2 - \sqrt\Delta$, and let $u = \sqrt[3]{A}$ and $v = \sqrt[3]{B}$ be the real cube roots. Then $x_0 = u + v$ is a root of $x^3 + px + q = 0$. When $\Delta > 0$ the equation has no other real roots.
The idea: check by substitution, using the fact that we know the sum and the product of $A$ and $B$. Add and multiply them: $A + B = -q$, and by the difference of squares $AB = \frac{q^2}{4} - \Delta = -\frac{p^3}{27}$. So $(uv)^3 = AB = \left(-\frac p3\right)^3$. Every number has exactly one real cube root, so $uv = -\frac p3$.
Now cube $x_0 = u + v$ by the formula for the cube of a sum: $x_0^3 = u^3 + v^3 + 3uv(u + v) = (A + B) + 3 \cdot \left(-\frac p3\right) x_0 = -q - p\,x_0$. Move everything to the left: $x_0^3 + p\,x_0 + q = 0$, that is, $x_0$ is a root.
The other roots. By the remainder theorem, divide $x^3 + px + q$ by $x - x_0$ using Horner’s method: the coefficients $1, 0, p, q$ give the bottom row $1,\ x_0,\ x_0^2 + p,\ 0$, that is, $x^3 + px + q = (x - x_0)\left(x^2 + x_0 x + x_0^2 + p\right)$. The discriminant of the quadratic in brackets is $x_0^2 - 4\left(x_0^2 + p\right) = -3x_0^2 - 4p$. Substitute $x_0 = u + v$ and $p = -3uv$: we get $-3(u + v)^2 + 12uv = -3(u - v)^2$. When $\Delta > 0$ the numbers $A$ and $B$ are different, so their cube roots $u$ and $v$ are different too, the discriminant is negative, and the quadratic has no real roots. (When $\Delta = 0$ we get $u = v$, and the quadratic gives a double root $-u$.)
The formula is written for an equation with no $x^2$ term, but that’s no restriction. The substitution $x = t - \frac{b}{3a}$ removes the square from any cubic equation $ax^3 + bx^2 + cx + d = 0$, just as completing the square removes the $x$ term from a quadratic. The equation from the start of the chapter becomes $t^3 - t = 0$ after the substitution $x = t + 2$, so $t = 0$ or $t = \pm1$, that is, $x = 2, 1, 3$.
In Fiore’s problems $p$ and $q$ were positive, and when $p > 0$ the expression $\Delta$ is always positive: the formula goes through without a hitch, and the root is unique. For $x^3 + x = 6$ it gives that very root between one and two:
$$x = \sqrt[3]{3 + \sqrt{\tfrac{244}{27}}} + \sqrt[3]{3 - \sqrt{\tfrac{244}{27}}} \approx 1.8177 - 0.1834 \approx 1.6344.$$The oath and the cartelli
News of Tartaglia’s victory reached Milan, where Gerolamo Cardano lived: a physician, astrologer, inventor, gambler and author of books on everything under the sun. He was writing a book on arithmetic and algebra just then and wanted to include the solution of cubic equations. Tartaglia refused for a long time. In March 1539 he did come to Milan after all, and on 25 March, in Cardano’s house, he revealed the rule to him, in verse, which is easier to remember and harder for an outsider to understand:
When the cube together with the things
is equal to some number,
find two other numbers whose difference is that number.
Then hold it as a rule
that their product always equals
the cube of a third of the things.
And the difference of their cube roots
will be your principal thing.
In our letters: for $x^3 + px = q$, find numbers $U$ and $V$ with difference $U - V = q$ and product $UV = \left(\frac p3\right)^3$; then $x = \sqrt[3]{U} - \sqrt[3]{V}$. It’s the same formula: $U = u^3$, $V = -v^3$.
According to Tartaglia, Cardano swore never to publish the rule. Lodovico Ferrari, Cardano’s former servant who had become his pupil and was present at the meeting, later claimed there had been no oath. One way or the other, Cardano and Ferrari had the rule, and they quickly went further. Cardano learned to reduce any cubic equation to it, and around 1540 Ferrari found a way to solve equations of degree four by reducing them to cubics.
The promise stood in the way of publishing all this. In 1543 Cardano and Ferrari went to Bologna, and Annibale della Nave, del Ferro’s son-in-law, showed them the late professor’s notebook. The rule was there, written down long before 1535. Cardano reasoned that since Tartaglia hadn’t been first, the oath no longer bound him. In 1545 Cardano’s Great Art (Ars Magna) came out in Nuremberg, with the solutions of equations of degree three and four. In the book Cardano named del Ferro and Tartaglia, and Ferrari as the author of the solution for degree four. But the rule has borne Cardano’s name ever since.
Tartaglia was furious, and in a book of 1546 he gave his version of events, not mincing his words. It wasn’t Cardano who answered him but Ferrari. From February 1547 to July 1548 they exchanged twelve printed cartelli, open letters of challenge with problems, six from each side. On 10 August 1548, in Milan, in the church of a Franciscan friary, before a huge crowd, a public disputation took place. The twenty-six-year-old Ferrari understood cubic and quartic equations better than his opponent and held his ground with confidence. Tartaglia left after the first day. Soon afterwards, in Brescia, where he had just been given a teaching post, they refused to pay him his salary.
Formulas in radicals, that is, using addition, subtraction, multiplication, division and taking roots, exist for equations of degree two, three and four: quadratics were solved back in Babylon, cubics by del Ferro and Tartaglia, quartics by Ferrari. For degree five a formula was sought for almost three centuries, until Paolo Ruffini (1799, with a gap in the proof) and Niels Henrik Abel (1824) proved that no general formula exists. Why there’s none, and which equations of degree five can nevertheless be solved in radicals, is explained by Galois theory.
The square root of minus one hundred and twenty-one
Cardano’s formula held a surprise, and Cardano noticed it. Take the equation $x^3 = 15x + 4$. It has an obvious root $x = 4$: $64 = 60 + 4$. Divide $x^3 - 15x - 4$ by $x - 4$ with Horner’s method and we get the quadratic $x^2 + 4x + 1$ with roots $-2 \pm \sqrt3$. All three roots are real. And the formula? Here $p = -15$, $q = -4$, and
$$\Delta = \frac{q^2}{4} + \frac{p^3}{27} = 4 - 125 = -121, \qquad x = \sqrt[3]{2 + \sqrt{-121}} + \sqrt[3]{2 - \sqrt{-121}}.$$The square root of a negative number. In the chapter on quadratic equations such a root, $\sqrt{-15}$, turned up in a problem with no solution, and Cardano brushed it off as “subtle but useless”. Here it can’t be brushed off: there are solutions, three of them. The formula runs into an impossible number exactly when there are the most roots.
The irreducible case (in Latin, casus irreducibilis) is a cubic equation with three distinct real roots. For $x^3 + px + q = 0$ it occurs exactly when $\Delta < 0$. We’ve proved one direction: when $\Delta \ge 0$ there can’t be three distinct real roots. The other direction can be seen on the graph in the widget above, and it’s proved rigorously with the derivative (chapter 26).
Cardano called such equations irreducible and set them aside. Later it turned out that there’s no way round the trouble.
If a cubic equation with rational coefficients has three real roots and no rational one, these roots can’t be expressed in terms of rational numbers by addition, subtraction, multiplication, division and taking roots while staying within the real numbers.
The proof of this nineteenth-century theorem needs Galois theory, and it awaits us in full in chapter 43. The idea is this. Add real radicals to the rational numbers one at a time. At some moment our equation gets a root for the first time. Galois theory shows that then all three roots appear at once, and with them the non-real cube roots of unity, which the next chapter is about. But all the numbers we added are real, and a non-real one can’t be among them.
The first person who didn’t back down was Rafael Bombelli, an engineer who drained marshes in the Chiana valley. In his Algebra of 1572 he proposed calculating with $\sqrt{-1}$ as with an ordinary number, on the understanding that its square is $-1$, and honestly carried the calculation through to the end. He looked for the cube root of $2 + \sqrt{-121}$ in the form $a + \sqrt{-b}$ and found it: it’s $2 + \sqrt{-1}$. Check it yourself by expanding the cube of a sum and replacing $\left(\sqrt{-1}\right)^2$ with $-1$:
$$\left(2 + \sqrt{-1}\right)^3 = 8 + 12\sqrt{-1} + 6\left(\sqrt{-1}\right)^2 + \left(\sqrt{-1}\right)^3 = 8 + 12\sqrt{-1} - 6 - \sqrt{-1} = 2 + 11\sqrt{-1}.$$And $11\sqrt{-1}$ is exactly $\sqrt{-121}$, if roots of negative numbers are handled by the usual rules. In the same way $\sqrt[3]{2 - \sqrt{-121}} = 2 - \sqrt{-1}$, and the sum is $\left(2 + \sqrt{-1}\right) + \left(2 - \sqrt{-1}\right) = 4$. The impossible terms cancelled each other out, and the answer came out right.
Where next
Bombelli got $4$ by honest calculation, but on the way he passed through numbers that don’t exist: $\sqrt{-121}$ and $2 + \sqrt{-1}$. It can’t be called a conjuring trick: the same road leads to the other two roots, $-2 \pm \sqrt3$, if you find the other cube roots of $2 + \sqrt{-121}$. So “impossible” numbers have a place, and they can be calculated with no worse than ordinary ones. Where that place is, what $\sqrt{-1}$ is, and where the roots went that vanished from the axis when we moved the constant term: all that is in the chapter on complex numbers.