Have you ever faced a math problem so difficult you had to invent a whole new type of number?

As you may (or may not, that’s also valid) remember from high school, there are these things called quadratic equations. They look like this:

They’re not too difficult to solve, if you just remember a couple of tricks. Let’s say we have the quadratic equation

and we want to figure out what *x* is. These days, there are a few ways to solve this algebraic equation, but they all give the same answer:

However, 500 years ago, it was a different story. For starters, it wouldn’t have been an algebraic problem described by an equation at all – it would have been geometry. Just watch YouTuber Veritasium explain it in the video below:

In modern language, we would call the technique used by medieval mathematicians “completing the square”. It’s pretty neat, and it does the job nicely. But does it work for bigger, nastier equations? What if instead of a quadratic equation, we wanted to solve a cubic equation?

Cubic equations had puzzled mathematicians for centuries even back in the 1500s. Clearly, they were (at least sometimes) solvable: just look at the equation

If we set *x *= 2 in the left-hand side, we find

So *x* = 2 is definitely a solution – but are there any others? And how can we find them without guessing?

As Veritasium explains, it is possible – but it didn’t seem that way to medieval mathematicians. That’s because solving a cubic equation can sometimes (even oftentimes) require us to leave the realm of real numbers altogether.

As we’ve discovered before, a real number is basically the kind of number you think of immediately when somebody tells you to “think of a number.” So seven, two, negative 14.2 recurring, pi – these are all real numbers. We tend to think of them as existing on a number line, like this

Now, real numbers have many fabulous properties, but they lack an important one: they are not what mathematicians call “algebraically closed.” What that basically means is that there is some kind of algebra you can do – timesing, dividing, squaring, or the like – that lets you start with a real number and finish with something else.

What is that algebra? It’s fairly simple: taking a square root. Specifically, taking a square root of a negative number.

We’re often taught that the square root of a negative number “doesn’t exist”, and this is pretty much exactly what ye olde mathematicians believed too – when these roots turned up in cubic equations, the problems were simply labeled “impossible”, and the solver would move on. But in 1572, an engineer called Rafael Bombelli made a breakthrough as only an engineer could: by f*cking around and finding out.

What if, he thought, we just kind of pretend these square roots of negative numbers are fine? What happens if we leave them in and finish solving the equation anyway? Do we get an answer? More importantly – do we get the *right* answer?

His gamble paid off: it worked. Not only had Bombelli discovered how to solve cubic equations, but he had also invented what we now know as imaginary numbers.

These imaginary numbers – the name was originally intended as an insult by Rene Descartes, who hated them – went on to change math and the world as we know it. As Veritasium explains, it allowed science to divorce algebra from geometry completely, making breakthroughs in fields like electrical engineering and fluid dynamics possible. It even turns up in relativity and quantum mechanics – fields which would have been unimaginable to the renaissance mathematicians who first thought of them.

As the legendary physicist Freeman Dyson, quoted in the video, put it: “Schrödinger put the square root of minus one into the equation, and suddenly it made sense … the Schrödinger equation describes correctly everything we know about the behavior of atoms. It is the basis of all of chemistry and most of physics. And that square root of minus one means that nature works with complex numbers and not with real numbers.”