Babylonian mathematicians as early as the Sumerian Ur III period (21st to 20th century B.C.) used geometric methods to solve second-degree problems. Similar geometric methods solved quadratic equations in later Babylonia, Egypt, Greece, China, and India. Indian mathematician Brahmagupta (597-668 C.E.) was the first to give an explicit solution.

Ancient Babylonians understood second-degree equations as geometric problems of sides and areas of rectangles and squares. The equation can be geometrically stated as saying that if a rectangle with sides of the length s and f/2 * s is removed from a rectangle with sides p and s, then the remainder is a rectangle of given area B. Euclid summarized these geometric solutions in Book II of the Elements where he represented such problems by a combination of rectangles and lines.

Brahmagupta of India was instrumental in understanding that numbers are abstract concepts which can be zero or negative. He pointed out that quadratic equations can have two possible solutions, one of which can be negative. He derived algebraic solutions to quadratic equations and went several steps further by solving systems of equations and quadratic equations with two unknowns. The latter was not considered by European mathematicians until more than a millennium later.