On this page
If you have ever lost marks to a missing minus sign in long division, a teenager from 12th-century Baghdad worked on your problem. Al-Samaw'al wrote out rules for negative quantities so he could add, subtract, multiply and divide whole polynomials. His worked example still makes good practice.
Who was al-Samaw'al?
Al-Samaw'al ibn Yahya al-Maghribi was born in Baghdad around 1130 and died around 1180 in Maragha, in present-day Iran, according to the MacTutor History of Mathematics biography. He began serious mathematics at about thirteen with Hindu methods of calculation, soon outgrew his teachers, and taught himself from the books of Abu Kamil and al-Karaji.
He wrote his most famous book, *al-Bahir fi'l-jabr* ("The brilliant in algebra"), at about nineteen. He described his aim as operating on unknowns "using all the arithmetical tools, in the same way as the arithmetician operates on the known."
What rules for negative numbers did al-Samaw'al give?
To treat polynomials like ordinary numbers, he needed rules for terms with a minus sign. The Dictionary of Scientific Biography entry by Adel Anbouba calls these "subtractive" (negative) and "additive" (positive) numbers. Zero is "an empty power". In modern notation, his rules say:
0 − a = −a: take a positive number from nothing and you get its negative.
0 − (−a) = a: take a negative number from nothing and you get a positive.
(−a) − b = −(a + b): take a positive from a negative and you get a bigger negative.
(−a) − (−b), where a is bigger than b, gives −(a − b). Where a is smaller, it gives +(b − a). So (−7) − (−3) = −4, but (−3) − (−7) = +4.
A negative times a positive is negative. A negative times a negative is positive.
The multiplication rule comes from his own words, translated in MacTutor's account: "the product of a negative number by a positive number is negative, and by a negative number is positive."
He was not the first to think about this. In 628, Brahmagupta's *Brahmasphutasiddhanta* had already said that "the product or quotient of two debts is one fortune", as MacTutor's Brahmagupta biography records. MacTutor says al-Samaw'al refined his predecessors' ideas into a form European mathematicians would not give until many centuries later. Anbouba notes that the same rules turn up in Europe in the work of Chuquet (1484), Pacioli (1494), Stifel (1544) and Cardano (1545). For the reasoning behind the sign rule, see our explainer on why a negative times a negative is positive.
How did al-Samaw'al divide polynomials?
Al-Karaji's algebra had no symbols, so numbers were spelled out in words. Al-Samaw'al instead gave every power of x its own place in a table and wrote only the coefficients, in Hindu numerals (Anbouba, DSB). It is the same place-value idea behind the numerals that al-Khwarizmi helped spread. His table ran past the units into negative powers: x⁻¹, x⁻², and so on.
The DSB records one division he carried out: (20x² + 30x) ÷ (6x² + 12). Here it is step by step.
20x² ÷ 6x² = 10/3. Multiply back: 20x² + 40. Subtract: 30x + (0 − 40) = 30x − 40. Rule: 0 − a = −a.
30x ÷ 6x² = 5x⁻¹. Multiply back: 30x + 60x⁻¹. What remains is −40 − 60x⁻¹.
−40 ÷ 6x² = −(20/3)x⁻². Multiply back: −40 − 80x⁻². Subtract: −60x⁻¹ + 80x⁻², because 0 − (−80) = +80.
−60x⁻¹ ÷ 6x² = −10x⁻³, and so on.
The quotient begins 10/3 + 5x⁻¹ − (20/3)x⁻² − 10x⁻³ + (40/3)x⁻⁴ + 20x⁻⁵ and never ends. Al-Samaw'al spotted the pattern: each coefficient is −2 times the one two places before it, because 12 ÷ 6 = 2. The DSB says he used this to write the terms all the way to the x⁻²⁸ term, with coefficient 54,613⅓.
How can his method stop your own sign errors?
Al-Samaw'al's table is a good habit for any long division or expansion in Class 9 to 12 algebra:
Write the coefficients in columns by power, and put 0 in every empty place. A missing column is an easy way to drop a term.
When you subtract a row, change the sign of every entry in that row first, then add. That relies on his rule 0 − (−a) = a, in every column.
Say the rule out loud at each sign change: "nothing minus a negative is a positive."
Check by substituting a number, as in the callout, or by multiplying the quotient back by the divisor.
For a shortcut when the divisor is linear, see our guide to synthetic division of polynomials.
If sign errors keep coming back, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer, so you can see which line went wrong. If negative powers still feel shaky, the Fermi Concept Library gives each concept its own lesson.
Try the division above on paper first, then extend it two more terms and check that the −2 pattern holds.



