how do imaginary numbers work, and what are they used for

In: 7

Imaginary numbers are what happens when you try to take the square root of a negative number – there is no real number, positive or negative, rational or irrational or integer or prime or any other classification, that will give you a negative number when you square it, because a negative number times a negative number *always* yields a positive result, therefore a negative number times *itself* will always yield a positive result.

However, this was a problem when we ran into formulae that broke down when negative numbers were put in and used in a square root function, and there were practical situations where negative numbers in those cases were needed, so we worked around it with imaginary numbers.

An imaginary number is noted by the lower case “i”, and you treat this “i” as an algebraic variable (like the ubiquitous “x” that is used almost everywhere there isn’t another standard, or you need a second variable name) in almost every situation, except that i^2 = -1

A lot of mathematics started by asking “what if”.

About 500 years ago, some mathematicians started asking, “what if there was a square root of -1”?

They called this “imaginary” number *i* and tried doing calculations with it.

It turns out that it’s really useful and helpful to do it.

Basically, you start with a math problem. You assume *i* exists, and use that to do your calculations.

When you’re done, you ignore / throw away the imaginary part of the result. And amazingly, you get the right answer. And often you get there much *faster* and *easier* then if you assumed that imaginary numbers didn’t exist.

Math is just kind of weird that way. It seems like a crazy idea, but hey – it’s a crazy idea that’s useful and actually works!

Mathematicians don’t like being told they can’t do something. They like taking existing patterns and finding ways to generalise them, or come up with new patterns.

Tell a mathematician that there is no number that, when you add it to 5, gives you 4, and they’ll create -1, and negative numbers.

No number that multiplies 2 to give 1? Now we need fractions.

No number that squares to 2? We get irrational numbers. And so on.

Mathematicians take a “gap”, and try to come up with an extension to the existing rules that covers this gap in a way that is consistent and (ideally) useful.

Imaginary numbers are another step in this process. We find there is no existing number that squares to give -1, so we define one (or arguably two), called *i*. Personally I’m not a huge fan of the term “imaginary” to define it (and “real” for other numbers), as that implies *i* is more of a mathematical construction than all the other numbers. But anyway.

Once we have this new number (or two numbers), given by *i^2 = -1*, we apply all the same rules of numbers we had before and see what happens. And we end up with some pretty neat results.

————-

As for what they are used for, often they are useful as a way of getting around nastier maths. You have a nasty maths problem, you use some trick to hop into the complex plane (where imaginary numbers work), where the problem becomes much easier to solve, and then you can hop back into the real line to finish off the problem.

A common example of this is with waves. Waves are generally defined by trig functions (sines and cosines). Those can be quite messy to work with. But there is a neat result from complex numbers that says:

> e^(ix) = cos(x) + i sin(x)

So if we have a messy trig wave, we can do some trig algebra to turn it into just a cosine. We can then say that the thing we are looking at is just the real part of some complex exponential. And exponentials are far easier to work with than trig functions (in some ways). We do all our maths with the complex exponential, and then just have to remember to drop the imaginary part at the end (although sometimes we don’t bother, and leave it as implied).

A lot of wave-based physics uses imaginary numbers in this way (including things like Fourier transforms for signals), and as quantum mechanics is all about wave-like behaviour, imaginary numbers make quantum mechanics a lot easier.

Surprised that I haven’t seen this in any responses yet…

The imaginary unit (i) is critical in describing waves, rotations, and anything oscillatory (which are invoked for pretty much anything done in modern physics or engineering of any kind). This essentially stems from Euler’s formula.

An imaginary number is defined as a “real” number multiplied by this thing called “*i*” and *i* equal to the square root of negative one. Since, by definition, it’s impossible to square *any* number and get a negative value, the square root of negative 1 is impossible to calculate and mathematicians call this concept “imaginary”.

It’s hard to explain how they are used in ELI5 but in practice they are used in forms of geometry relating to like circles, angles, radii, and lengths as well as things that move in waves.

If you do certain math or physics you will end up needing to rely on these forms of geometry and it makes life a lot easy to start using imaginary numbers like coordinates, which we call “complex numbers”. So just you like say a point on a graph is located at (X,Y) coordinates, you might also describe a point on a graph as being 1+20*i.*