Brahmagupta and the Rules of Zero
In 628 CE Brahmagupta wrote explicit rules for zero and negative numbers in the Brahmasphutasiddhanta. This demo puts a and b on a number line, computes add, subtract, or multiply, and explains the sign of the result as fortune, debt, or zero.
7 + (-4) = 3 · this is fortune (positive)
Drag a and b, then switch between add, subtract, and multiply. Positive values are fortunes, negative values are debts, and zero is neither. Multiplying two debts gives a fortune, and adding a fortune to an equal debt returns zero — exactly the rules Brahmagupta wrote down in the 7th century.
What you are seeing
Positive numbers represent fortunes and negative numbers represent debts. Zero is neither; it is the state of nothing.
The result of a + b, a − b, or a × b is computed directly, then read back as a fortune, a debt, or zero on the same number line.
Brahmagupta stated that a debt times a debt is a fortune, and that opposite quantities cancel. The rule text in the panel tracks those sign laws.
Why it matters
Treating zero and negatives as numbers with consistent arithmetic was a major step toward modern algebra. It made it possible to solve equations uniformly instead of special-casing “impossible” subtractions.
Complexity & details
Arithmetic here is O(1). The demo is about the sign rules, not about heavy computation.
Frequently asked questions
Did Brahmagupta invent the zero symbol?+
No, and this demo does not claim that. Earlier cultures used placeholder marks. Brahmagupta’s contribution highlighted here is a set of arithmetic rules treating zero as a number you can add, subtract, and multiply.
Why call positives fortunes and negatives debts?+
It is a historical and intuitive model: adding a debt reduces wealth, and multiplying two debts produces a fortune. The math stays exact; the metaphor just explains the signs.