News for hackers. Stuff that matters.
Re:Why is e^(pi i) = -1? by johnaspden on Friday October 30, 2009 @10:45AM (#912083)
Imagine you're a complex number, which is just a type of 2-vector.

Exponentiation is to do with growth at a speed which is a multiple of how big you are already.

i is the multiplication which turns you through ninety degrees.

If you grow in a direction which is at right angles to yourself, you turn rather than increasing in magnitude.

Pi is how long it takes you to turn through a half circle.

So if you grow at right angles to yourself for time pi, you are pointing the opposite way.

Re:Why is e^(pi i) = -1? by tomsaffell on Friday October 30, 2009 @01:00PM (#912331)
This is a good explanation of why the result is negative and why it has zero imaginary component - ie why it is pointing the opposite way.. But it doesn't explain why the result is unit one in magnitude / length. Can you extend it do that that?
Re:Why is e^(pi i) = -1? by johnaspden on Friday October 30, 2009 @02:10PM (#912471)
Thanks! Yes, when you grow in a direction at right angles to yourself, you don't increase in magnitude. So the turning arrow is the same length at the end as it was at the beginning.

This is actually a slightly tricky point, because it requires the direction of growth to change as you grow. If you grow by a finite amount all at once, then you do get slightly longer. So you might expect an outward spiral.

But a point moving round in a circle is always moving at right angles to the radius connecting it to the centre.

And in the same way, an arrow whose tip is moving at right angles to its shaft isn't extending. If the length is changing, then the direction isn't 90 degrees.

To reason about this properly I think you need some sort of theory of infinitesimals and continuous motion.

Re:Why is e^(pi i) = -1? by abecedarius on Friday October 30, 2009 @03:09PM (#912582)
Feynman gives the same explanation in his awesome Lectures On Physics, volume 1, the chapter titled "Algebra". One of the great works of 20th-century literature.
Re:Why is e^(pi i) = -1? by ilitirit on Friday October 30, 2009 @12:02PM (#912233)
That's a great explanation. Is this how they explain it in math classes? Because if not, then it should be. At least at a superficial level.
Re:Why is e^(pi i) = -1? by johnaspden on Friday October 30, 2009 @12:26PM (#912267)
Thanks! No, I worked it out for myself while I was thinking about what the exponential of a linear operator is. The explanation at my school was the one with Taylor Series.

By the time I got to university it was just taken as a given, so nobody explained it at all.

My explanation seems to have attracted a lot of positive votes in a few minutes. I've written a more detailed version here if anyone doesn't get it:

http://johnlawrenceaspden.blogspot.com/2009/10/ei-pi-1.html

If it gets much attention I might draw the diagrams that go with it.

I'm always bewildered how many scientific types (and even some mathematicians) find complex numbers mystical. They were originally discovered by mystic methods, but Argand showed us what was really going on, and they're no more weird than 2-dimensional vectors.

Actually a lot less weird than the Reals, which really are magical and mysterious, but which everyone seems to be quite happy with!

Re:Why is e^(pi i) = -1? by roundsquare on Friday October 30, 2009 @12:20PM (#912257)
Thats neat. Only thing is that (to me anyway) this takes the idea of the complex plane as being very fundamental as opposed to just something convenient. I'm not sure how to convince someone that 1 + i is the same as the coordinate (1, 1) without saying "thats just how we define it because things work out."
Re:Why is e^(pi i) = -1? by johnaspden on Friday October 30, 2009 @12:43PM (#912296)
The complex plane is the fundamental thing.

It's the only way to get to the complexes without doing anything spooky! Defining i to be "the square root of minus one" is about as sane as defining it to be the square root of the colour blue.

The first people who thought about it followed that approach, and were rightly scared stiff and confused by it. Even Euler made trivial mistakes.

Argand came up with the right way of thinking about it:

Take all the tuples (x,y). (Where x and y are just integers). Define on them addition and multiplication rules.

Oh look! There's a big system of these things, and embedded within it is a sub-system which works exactly the same as the integers and their rules.

Since they're exactly the same for all practical purposes, we may as well forget about the difference and say that we'll write (a,0) as a and (0,b) as ib, and (a,b) as a+ib

And although non of the pairs in that subsystem square to be (-1,0), also known as -1, there are two things that do! So now we know that both (0,1) and (0, -1), otherwise known as 1i and -1i, or i and -i, are square roots of -1.

No slight of hand or magical thinking necessary.

As it happens, we can do the same thing with the reals, to form something that embeds the reals. But the reals really are dark and mysterious and need to be brought about by a kind of magic.

Re:Why is e^(pi i) = -1? by wjy on Friday October 30, 2009 @02:21PM (#912491)
Bravo. You have a gift for explanation. This is exactly the sort of explanation helpful for someone (like myself) who has been through all the foundations at one point or another, but sometimes forgets the big picture.
Re:Why is e^(pi i) = -1? by Xichekolas on Friday October 30, 2009 @02:36PM (#912525)
For anyone that was momentarily confused by johnaspden's explanation of how (0,1) squared became (-1,0), there is excellent explanation of it here:

http://www.math.toronto.edu/mathnet/answers/imagexist.html

I'll gratuitously paste the relevant part here, but the summary is that to multiply two tuples, you simply take the cross product, as you would a binomial.

---

Remember that any collection of objects for which there is a definition of what the objects are and when two objects are equal, there is a rule for how to add two objects, there is a rule for how to multiply two objects, and these rules obey familiar arithmetic laws like commutativity, associativity, and distributivity, is, by definition, a number system.

These properties are all satisfied by complex numbers.

We have a definition of when two complex numbers are to be considered equal: they are equal if and only if they are the same pair of real numbers.

We have a rule for adding two complex numbers (which, remember, are nothing more than pairs of real numbers):

  (a,b) + (c,d) = (a+c, b+d) 
and a rule for multiplying two complex numbers:

  (a,b)(c,d) = (ac-bd, ad+bc) 
The rule for multiplication may look very strange, but there's nothing wrong with that; one can still verify that these rules do indeed satisfy the familiar properties of arithmetic.

Therefore, complex numbers form a number system.

Within this number system, is there an object which, when squared, gives -1? Yes. It is the pair (0,1). When you square it using the above rule of multiplication, you get

  (0,1)(0,1) = ( (0)(0) - (1)(1), (0)(1)+(1)(0) ) = (-1,0).
Strictly speaking, the complex number (-1,0) is something different from the real number -1. After all, it's a pair of real numbers, -1 and 0, not a single real number.

However, complex numbers of the form (a,0) behave identically to the way ordinary real numbers a behave. They add and multiply in exactly the same way that ordinary real numbers do:

  (a,0) + (b,0) = (a+b,0)
  (a,0)(b,0) = (ab,0)
Since numbers are just abstract concepts anyway, and since real numbers a and complex numbers of the form (a,0) are completely identical as far as their arithmetic behaviour is concerned, it is perfectly legitimate to view them as just two different representations of the same underlying concept.
Re:Why is e^(pi i) = -1? by thwarted on Friday October 30, 2009 @12:24PM (#912264)
Re:Why is e^(pi i) = -1? by kalid on Friday October 30, 2009 @03:42PM (#912635)
Glad the articles were useful for you :).

I really like Euler's Formula, but feel many explanations focus on the raw bits (showing the series are equal). The physics explanation "90-degree rotation" is a good one. Here's how I explained it to my mom:

"The formula is saying there's two ways to get to a place on a circle. One is to go across (cos) and up (sin), and the other is to go out (1.0) and rotate (x radians)."

This is a beautiful result which ties together radians, exponential growth, and complex numbers -- I have a post drafted that I want to share on this :).

Re:Why is e^(pi i) = -1? by shachaf on Friday October 30, 2009 @11:05PM (#913206)
Where does e come into this specifically? That is, why does 5^(i*pi) have an imaginary part?
Re:Why is e^(pi i) = -1? by roundsquare on Saturday October 31, 2009 @06:35AM (#913434)
I'll give it a shot. For me, I think about e in terms of compound interest.

I.e. you have a bank account and put in a dollar. Its a great bank, they give you 100% interest. So, after a year, you have (1 + 1) = 2 dollars.

But wait, instead, they compound twice. That is, every 6 months, you get 50% interest. So now you have (1 + 1/2)^2 = 2.25 dollars.

Instead of compounding twice, they compound 4 times. So now you have (1 + 1/4)^4 = 2.44 dollars. Each time you get interest, its given in proportion to what you have in the account at the time. So, if they are compounding 4 times:

1 --> (1.25 * 1) = 1.25 --> (1.25 * 1.25) = 1.56 --> (1.25 * 1.56) = 1.95 --> (1.25 * 1.95) = 2.44.

(Please note: Rounding error. I just typed in to two places after the decimal point).

Why 2 or 4? Lets just call it compounding n times. As n gets larger, you get more money, but it doesn't go on forever...

For n times, the formula for how much money you have is (1 + 1/n)^n. What if you want to continuously compound? I.e. at every instant, growth is proportional to the current value? Well, then you would want something like (1 + 1/infinity)^infinity. But, we can't really do that, so instead we say:

lim (n --> inf) of (1 + 1/n)^n

And thats what we call e. Start putting in larger and larger values of n and you'll see that it converges to 2.718... The point is that e is pretty much defined as the number you get when you take a number starting at 1 and have it grow in proportion to itself continuously. Instead, if you use 5 instead of e, your growing too fast. In terms of johnaspden's explanation, you'd move too far around the circle, past (-1, 0).

Also, johnaspden, your explanations are truly great, really helped me understand Euler's formula.

Edit: Small change.