It’s the question that haunts every student who’s ever stared blankly at a jumble of letters and numbers, wondering how on earth they’re supposed to make sense of it all: Who invented algebra?

The answer isn’t simple. The earliest recorded evidence of algebra comes from the ancient Babylonians, who had their own algebraic system as early as 1900 BC. But other ancient civilizations such as the Egyptians, Greeks, and Chinese also had methods for solving equations that bear similarities to modern algebra.

It wasn’t until the medieval Islamic world, however, that algebra really started to take shape as we know it today. Mathematician and scholar Al-Khwarizmi is often credited as the “father of algebra” for his work in the 9th century. He wrote a book called “The Compendious Book on Calculation by Completion and Balancing” (rolls right off the tongue, doesn’t it?) that laid out the basic principles of algebra and popularized the use of symbols and letters to represent unknown quantities.

So the next time you’re stuck on a particularly gnarly algebra problem, don’t just curse your teacher – you’ve got thousands of years of history to blame, too…