News for hackers. Stuff that matters.
Re:The exponential function is a miracle by jacobolus on Friday September 13, 2019 @01:33AM (#20959447)
> exp(iπ) = –1 ... How can this be?

The “plain English” expression of this formula is: a half turn rotation in a plane is equivalent to a reflection across the axis of rotation.

YMMV, but I have found that small children can understand this statement.

Re:The exponential function is a miracle by creato on Friday September 13, 2019 @02:00AM (#20959568)
Talking about rotation as if that is obviously relevant completely skips the surprising and interesting part of this identity.

edit: Said another way, what you said is an explanation for what (cos(pi), sin(pi)) is. That exp(i*pi) has anything to do with sine or cosine is what makes the identity interesting, and your explanation says nothing about that.

Re:The exponential function is a miracle by dnautics on Friday September 13, 2019 @02:38AM (#20959745)
Yeah and also that an exponential is a turning function, or that you can even take an number to an imaginary power in the first place, or that turning the right amount just happens to take the power of e (and not, say, 2)
Re:The exponential function is a miracle by username90 on Friday September 13, 2019 @03:24AM (#20959941)
It's a lot less surprising if you look at the functions as Taylor series, then you'd see that exponentiation is basically the same thing as cos + sin. This also explains "why e and not 2?", because the Taylor series for e, cos and sin are very nice by definition (e is defined to have trivial derivative, and radians are defined to make sin and cos have simple derivatives) while the Taylor series for exponentiation by 2 is not.
Re:The exponential function is a miracle by dnautics on Friday September 13, 2019 @03:18PM (#20965401)
Agreed, but that is a lot of overhead to get to the insight.
Re:The exponential function is a miracle by thaumasiotes on Friday September 13, 2019 @03:41AM (#20960010)
> that turning the right amount just happens to take the power of e (and not, say, 2)

username90 already explained this one, but in my own rephrasing:

The premise is incorrect. It isn't that "turning just happens to take the power of e". e is defined to be the number for which this is true.

Re:The exponential function is a miracle by bsaul on Friday September 13, 2019 @05:41AM (#20960571)
Those kind of « it’s defined like this » explanation has always confused me in math in general. there are two really different things :

- the mathematical concept was initialy created as a way to solve this particular problem, and so this should come at no surprise

And

- after centuries trying to define this concept, we found that the best way to define this concept is like that.

In your case, was « e » created to perform 2D rotations in the first place ?

Re:The exponential function is a miracle by username90 on Friday September 13, 2019 @08:37AM (#20961513)
We can look at history:

1. e was discovered in 1618

2. i was introduced around 1637

4. calculus was formalized by Newton in 1687

3. derivatives of sine and cosine were discovered in 1722

4. de Moivre's formula (cos x + i sin x) ^ n = cos nx + i sin nx was discovered in 1730

5. Eulers fornula e ^ ix = cos x + i sin x was discovered in 1748 by using Taylor series (requires their derivatives).

So we knew about e and i more than a century before Eulers fornula.

However we discovered it pretty soon after we started applying calculus to trigonometrical functions. Also we can note that it is a strictly more powerful than de Moivre's formula since it shows that we can easily add angles just by multiplying their complex representations, so it is not just a simplification of old knowledge.

So it seems like the discovery of Euler's fornula actually did help with working with rotations. However it was done during a time when we were still exploring the applications of Calculus so there were a lot of low hanging fruit like this to pick.

So to directly answer your question, e was not created to perform 2D rotations, instead we discovered that putting i inside of e makes 2D rotations simple. But the actual important identity you care about is that you can add angles by multiplying which is easy to prove using eulers fornula:

(cos x + i sin x) * (cos y + i sin y) = cos (x + y) + i sin (x + y)

Re:The exponential function is a miracle by jacobolus on Friday September 13, 2019 @03:09PM (#20965323)
> Eulers fornula e^ix = cos x + i sin x was discovered in 1748

Discovered by Roger Cotes in 1714, in IMO its most natural form, ix = log(cos x + i sin x)

> actual important identity you care about is that you can add angles by multiplying

Personally I think the multiplicative concept of rotations is the natural one, with rotations associated to points on a circle embedded in the plane, rather than associated to arclengths. The amazing thing is that we can compose rotations (naturally multiplicative) by first taking the logarithm of the rotations (a.k.a. angle measure) adding them, and then taking the inverse logarithm. The logarithm is a tool which turns multiplication into addition.

The protractor and the slide rule turn out to be more or less the same concept, which is why we can substitute the former for the latter in https://en.wikipedia.org/wiki/Prosthaphaeresis

Re:The exponential function is a miracle by Excel_Wizard on Friday September 13, 2019 @08:35AM (#20961499)
If you explored the problem domain, starting with an understanding of trigonometry and calculus, it will naturally emerge as a result. It was not arbitrarily defined.

Imaginary numbers were not arbitrarily defined either, they precisely describe an actual phenomenon.

At a certain level, it is difficult to distinguish between "the reality we decided is true" for math vs. "the reality that must be true underneath". If you accept empiricism, such that you trust observations we make about the physical world, this problem becomes irrelevant to this discussion.

Re:The exponential function is a miracle by thaumasiotes on Friday September 13, 2019 @02:13PM (#20964763)
No, as username90 says, e was not created to perform rotations. The aspect of e that comes into play for the relation to sine and cosine is that the function e^x satisfies the differential equation df/dx = f. This makes the Taylor series convenient by not introducing factors of (ln K)^n in each term.

Thus, 2^ix = cis (x ln 2) = cos (x ln 2) + i sin (x ln 2). And since e is, by definition, the number that satisfies ln e = 1, e^ix can be stated more simply as cis x. And that identity, ln e = 1, is in fact the original motivating definition of e.

Re:The exponential function is a miracle by creato on Friday September 13, 2019 @01:17PM (#20964159)
There are many valid ways to arrive at e as an interesting constant. A particular way of arriving at e as an interesting comment might provide a connection to something else (such as 2D rotation), but that doesn't mean it was created for that purpose.
Re:The exponential function is a miracle by jacobolus on Friday September 13, 2019 @04:00AM (#20960104)
Personally I think the cool part is that the complex logarithm takes the stereographic projection and turns it into the Mercator projection. That is, it conformally maps the plane onto an infinite two-ended cylinder.

The expression log(–1) = iπ more or less just tells you how to normalize the coordinate system on the cylinder. If you wanted you could pick a somewhat different coordinate system. This one is conventional and often convenient though.

Re:The exponential function is a miracle by garmaine on Friday September 13, 2019 @03:22AM (#20959931)
Complex numbers are about rotation. That’s the only odd insight in Euler’s equation. Once you get that, it all falls into place (and in fact starts to explain all the use of complex numbers in engineering).
Re:The exponential function is a miracle by creato on Friday September 13, 2019 @01:09PM (#20964063)
> Complex numbers are about rotation.

Why?

(I'm not denying that it is, just pointing out that like the person I first replied to, you are jumping over the interesting part here and stating interesting conclusions like they are definitions.)

Re:The exponential function is a miracle by jacobolus on Friday September 13, 2019 @03:02PM (#20965259)
A complex number “is”† a quotient of two Euclidean vectors in a plane. That is, Z = u\v is the object which when you multiply it by one vector u, scales and rotates that into another vector v. We can write uZ = uu⁻¹v = v.

http://geocalc.clas.asu.edu/pdf/OerstedMedalLecture.pdf

https://geocalc.clas.asu.edu/pdf/GrassmannsVision.pdf

† More precisely, the algebra of complex numbers is structurally the same as the algebra of quotients of planar vectors.

Re:The exponential function is a miracle by garmaine on Friday September 13, 2019 @01:35PM (#20964346)
As I said, "that's the only odd insight." I'm not claiming it's obvious, it's not. but once explained it makes sense and the rest falls in place. Here's a better resource than I can type up:

https://betterexplained.com/articles/a-visual-intuitive-guid...

Re:The exponential function is a miracle by xaedes on Friday September 13, 2019 @03:54AM (#20960074)
Hm does that mean you could say the complex quantum probability is just a probability over rotations?
Re:The exponential function is a miracle by tim333 on Friday September 13, 2019 @06:55AM (#20960931)
Well you add up all the rotation like stuff and square the result to get the probability. In the book QED Feynman describes it as adding little arrows to explain it to a lay audience. In physical terms it's probably most like adding waves and then the square of the amplitude or wave energy is the probability but not quite - no one really knows what the actual reality is.
Re:The exponential function is a miracle by baq on Friday September 13, 2019 @07:07AM (#20960995)
Kinda sorta, imagine that probability has a direction. Interference is then about alignment of these directions.
Re:The exponential function is a miracle by posterboy on Friday September 13, 2019 @07:23AM (#20961075)
what does electric engineering have to do with rotation? Generators perhaps run in circles, an inductor is a coil often enough, but a capacitor?
Re:The exponential function is a miracle by mikorym on Friday September 13, 2019 @07:46AM (#20961201)
Electromagnetism concerns movement of what appear to be moving circles. If you roll a circle with a pen marker it draws a sine or cosine curve. If you try to draw the spiral of a light wave you get perpendicular sine and cosine curves. Light is electromagnetic radiation and in turn both electricity and magnetism are fundamentally connected forces.
Re:The exponential function is a miracle by posterboy on Friday September 13, 2019 @07:23PM (#20967696)
there is no "spiral of a light wave" lol. If anything, I'd think of transversal movement. Ironically I cannot say that nobody has ever seen a photon. But nobody has ever seen an electron. There could be a model in which electrons move transversal (at mm/s), mediated by photons, but I have not looked that closely into it. It's not part of the usual theories.

if you attach a pen to a hoop and move the hoop along a wall, you do not get a wave, you get (edit: what looks like but isn't) sharp discontinuity where the pen touches the ground (https://google.com/search?q=cos%28x-sin%28x%29%29)

Re:The exponential function is a miracle by garmaine on Saturday September 14, 2019 @09:35AM (#20970666)
Circular polarized light is a spiral, at least in terms of how we normally draw the vector annotation.
Re:The exponential function is a miracle by rimliu on Friday September 13, 2019 @07:52AM (#20961235)
You may say that AC has a lot to do with rotation.
Re:The exponential function is a miracle by garmaine on Friday September 13, 2019 @01:07PM (#20964029)
EM is about rotating fields. Phase is very fundamentally connected with rotation. These are where complex numbers show up.
Re:The exponential function is a miracle by matt-attack on Friday September 13, 2019 @05:34AM (#20960545)
I think it makes even more sense when written in terms of tau.

    e ^ (i * tau) = 1
In plain English: “rotating by a full turn is the same as doing nothing”.
Re:The exponential function is a miracle by throwaway2048 on Friday September 13, 2019 @06:45AM (#20960882)
this, and the unit circle are by far the most compelling arguments for tau.

Euler's identity isn't some mysterious thing where all these mathematical building blocks meet, its a completely straight forward and fundamental consequence of circles existing!.

Re:The exponential function is a miracle by lonelappde on Friday September 13, 2019 @06:58PM (#20967524)
2pi is a full turn. Using a different name doesn't change much.
Re:The exponential function is a miracle by SilasX on Friday September 13, 2019 @10:46AM (#20962627)
I've never considered that (in itself) a satisfying or complete explanation, because it just handwaves away the problem of how it is that imaginary exponentiation gets you a rotation in the complex plane, and feels like you're just defining it as such, which isn't imparting any insight.

Yes, small children can understand the bit about "two half turns put you in the reflected position", but not "why is i rotating a complex number at all".

Re:The exponential function is a miracle by jacobolus on Friday September 13, 2019 @05:07PM (#20966570)
> but not "why is i rotating a complex number at all".

Yes, this part requires getting a good amount of practice with vectors, and is best saved for kids aged maybe 10+ (depends a lot on the kid and their level of preparation).

The most straight-forward approach is to define I to mean a quarter turn rotation anticlockwise in the plane. Then try to figure out what a quantity like Z = a + bI (where a and b are scalars) would mean: if we multiply it by a vector v we get Zv = av + bIv, that is: a part of the vector av pointed in the same direction as v plus a part of the vector bIv pointed in a perpendicular direction.

Now we can investigate what happens when we multiply I(Iv): we rotate v a quarter turn, then another quarter turn. Or in other words, I(Iv) = –v for any v. Because our multiplication is associative and vectors have inverses, we can write II = –1.

The tricky part of the abstraction here is that we can treat scale + rotation transformations of the plane like numbers. Multiplying them corresponds to composition of transformations. Adding them and then applying the sum to a vector is the same as applying each separately and adding the parts afterward.

Getting comfortable with this algebraic system is certainly not trivial.

Then there is a neat insight that when we take a pure rotation’s logarithm (a.k.a. “angle measure”), that turns out to have magnitude proportional to the arclength between two rotated points on a circle.

Re:The exponential function is a miracle by SilasX on Friday September 13, 2019 @05:11PM (#20966615)
>The most straight-forward approach is to define I to mean a quarter turn rotation anticlockwise in the plane

Like I said originally, if you're just defining i to work this way, you're not conveying any of the insight behind why this is a natural extension of the existing rules/definitions of i, sine, exponentiation, etc.

All your latest comment is doing is meticulously spelling out the concept of rotation in a plane. Again, that's not the hard(est) part of proving this result or of conveying the intuition. You're handwaving away 90% of it. It's not reasonable to characterize someone as "understanding" it because they get rotation, the last 10%.

Re:The exponential function is a miracle by jacobolus on Friday September 13, 2019 @05:26PM (#20966766)
The “existing rules/definitions of i, sine, etc.” are poor places to start.

There are many ways to define these concepts. The traditional versions are needlessly obscurantist and get the appropriate pedagogical/conceptual order backwards.

The proper pedagogical definition for I is “the ratio of two vectors of the same magnitude which point perpendicularly in the plane”, or “the transformation which rotates vectors in the plane by a quarter turn”. Defining I as √(–1) and then working with purely formal quantities of the type a + bI is much harder to follow. It just seems completely arbitrary and invented (which is why people had trouble with it historically, and many students still do today).

If you define I to mean a quarter turn, then having it square to a half turn makes perfect sense. Once you know that a half turn is equivalent to a reflection across the axis of rotation, then it’s pretty clear to see why a half turn of planar vectors should be written as the scalar –1. So the property that I^2 = –1 emerges naturally.

Then when you sometime later start talking about logarithms, there’s a nice opening to talk about what the logarithm should be of a rotation. This ties in nicely with a discussion about position, velocity, and acceleration in uniform circular motion, etc.

* * *

It seems like there is some “deep insight” when you start with very obscure concepts/notation defined purely formally/abstractly and then fiddle with them a bit and suddenly out pops something simple and concrete. It makes for a good magic trick or punchline at the end of the tedious slog that is a traditional math course.

But it’s better to start with simple concrete ideas and notation which are meaningful a priori.

Re:The exponential function is a miracle by SilasX on Friday September 13, 2019 @05:54PM (#20966998)
>Then when you sometime later start talking about logarithms, there’s a nice opening to talk about what the logarithm should be of a rotation

Right, so you agree your explanation isn't covering the connection to the existing rules of i, and is just explaining how rotation works and giving it a symbol. That's great, but it has nothing to do with the insight that people are actually impressed by, which is that the concepts and rules created for a different domain (e.g. exponentiation and i as square root of -1) naturally extend in such a way that gives the Euler equation and so on.

You're not explaining that insight at all, and shouldn't consider anyone to actually understand the insight if they get it. All you're explaining is the concept of point rotation. You shouldn't represent that as "oh, a child understands why exp(pi i) = -1, see, I explain it just fine!"

If you prefer teaching things in that order, great! If you're dismissive of formal and abstraction notation, great!

But you're not actually explaining the amazing insight everyone here is celebrating.

Re:The exponential function is a miracle by jacobolus on Friday September 13, 2019 @08:34PM (#20968072)
You seem to be misunderstanding what I am trying to say. Sorry if it was unclear.

If I am explaining to small children that a half-turn rotation is the same as a reflection through the axis of rotation, then there is no symbol at all. Just words and physical manipulation. It’s a simple idea.

If I am explaining to a high school student (or a well prepared 11 year old) what complex numbers mean, then we are going to start by doing a bunch of discussion of vectors in the context of geometry and mechanics.

If I am explaining how logarithms work, we are going to attack them from many directions: iterated multiplication and compound interest, exponential growth/decay, velocity proportional to current position, uniform circular motion, ...

There are many subtle and interesting concepts involved here. It’s worth taking them slowly and spending a few years building up fluency.

There is indeed an insight that the logarithm of a rotation is proportional to arclength. That’s really the key insight we are talking about here. Why does that happen? That part is pretty interesting and worth exploring (but not nearly so difficult or mind blowing as it is made out to be).

Iterated multiplication of rotations behaves similarly to iterated multiplication of scalars, and we can take logarithms of rotations and then add them just like we could do with logarithms of scalars. Uniform circular motion turns out to be a type of exponential growth.

Now if you take a rotation R and look at the arclength from some vector x to Rx on the circle (an abstract circle in the space of displacement vectors) of squared radius x^2, and then you iterate R, you get proportional arclengths.

That is, arclength(arc of origin-centered circle from x to RRx) = 2 × arclength(arc from x to Rx). And the extends to any other number of iterations of R. More generally if we compose two rotations then we add their arclengths.

So arclength of the circular arc is proportional in general to the logarithm of rotation, and we can therefore use arclength as a model of the logarithm. (This is called “angle measure”, and we can physically measure it with a protractor).

> concepts and rules created for a different domain

The history of the understanding of astronomy, complex numbers, etc. is not really relevant at the introductory level.

Slide rules and protractors are however useful tools to teach about.

Leading off with power series, classical trigonometry, complex numbers defined as purely abstract formal objects invented for finding roots of polynomials, etc. is not “insightful”, it is just obfuscatory. It is a product of our current anachronistic approach to teaching which is based on training human computers even though we no longer need them and neglecting problem solving, and focusing almost entirely on algebra and a symbol-heavy framing of “trigonometry” and calculus at the expense of geometric understanding.

At some later point it’s all fine and dandy to talk about the history of astronomy and chord/sine tables, the development of differential equations and the understanding of 2D and 3D rotation: Hipparchus, Archimedes, Ptolemy, Madhava, Al Kashi, Bürgi, Napier, Mercator, Newton, the Bernoullis, Euler, Argand, Rodrigues, Gauss, Cauchy, Riemann, Hamilton, Grassmann, Cayley, Maxwell, Gibbs, Clifford, Möbius, Klein, Lie, and all the rest. But not as an introduction.

Re:The exponential function is a miracle by heavenlyblue on Friday September 13, 2019 @12:48PM (#20963799)
Well, the first time it made a tick for me was when I realised that rotational exponentiation is what provides for perfectly smooth transitions between even and odd powers of negative numbers.
Re:The exponential function is a miracle by ilyagr on Friday September 13, 2019 @02:07AM (#20959607)
From this point of view, it's not easy to see what exp(1) should be. The beauty is in the connection.
Re:The exponential function is a miracle by jacobolus on Friday September 13, 2019 @03:57AM (#20960087)
What the precise value of exp(1) turns out to be isn’t really the point though.

That’s one reason that e^x is a pedagogically problematic shorthand for exp(x).

Re:The exponential function is a miracle by ilyagr on Friday September 13, 2019 @11:11AM (#20962830)
I disagree, I think it's very much essential to the point.

For one, 10^(i*pi) is some horrible complex number, which is what you'd expect when exponentiating random complex numbers. Exercise: figure out what it is from the rotation point of view.

Secondly, usual definitions of e don't involve complex numbers at all. Nor do questions such as whether e is rational, algebraic, etc.

Thirdly, if you go with this argument too far, you'll conclude that the value of pi is also not important. After all, circles must have some length, who cares what it is precisely?

Re:The exponential function is a miracle by jacobolus on Friday September 13, 2019 @03:34PM (#20965565)
> 10^(iπ) is some horrible complex number

Sure, you want to use a convenient coordinate system. But you already have 2 horrible numbers in the conventional coordinate system: the π and e.

In the conventional (“natural”) coordinate system for logarithms, the coordinates represent powers of e and rotations by 1/2π turns, respectively.

You have just decided that you’ll use those specific horrible numbers in the logarithmic coordinates, because e and π are what you get out if you choose a coordinate system for the logarithm of quotients-of-vectors where the derivative of log(x) at the point x = 1 is 1. This turns out to be convenient for simplifying differential equations and related formulas.

Personally I like using a coordinate system where the “scale” axis of the logarithm uses units of doublings, and the “rotation” axis of the logarithm uses units of full turns. If I use that one when making a picture, I can easily tell you exactly what the value is (as a rational number) at every grid intersection.

e.g. here is a plot of a Möbius transformation, https://raw.githubusercontent.com/jrus/images-for-observable... Every contour at the most prominent level is either a doubling or 1/12 of a turn. (You’ll notice that when we zoom on any part of the picture, we see little rectangles rather than little squares; the “natural” coordinate system is a square one, which is also often convenient.)

Re:The exponential function is a miracle by kittiepryde on Friday September 13, 2019 @04:16AM (#20960179)
You explained that 'a half turn rotation in a plane is equivalent to a reflection across the axis of rotation' to a child and they were able to figure out how 'exp(i*pi)=-1' was derived? That's remarkable!

I think these children were on a much higher level than most adults that we'd still consider smart, I wouldn't put down anyone for not immediately seeing these two things as equivalent.

Re:The exponential function is a miracle by jacobolus on Friday September 13, 2019 @04:02PM (#20965909)
No, the children were able to understand how if you rotate a piece of paper by half a turn, all of the points end up the same distance from the axis of rotation, but the opposite direction from where they started.

All of the stuff about exponential functions and angle measures and “imaginary” numbers just obfuscates the core idea.

Re:The exponential function is a miracle by SilasX on Friday September 13, 2019 @05:15PM (#20966662)
But the core idea involves why imaginary exponentiation means a rotation in the complex plane! If you don't have that part, you're not talking about i at all, you're just teaching the concept of rotation, with the same symbols as are used in complex math.

You would have the exact same explanation if you were teaching about rotation unconnected to imaginary numbers or exponentiation at all!

Re:The exponential function is a miracle by F-0X on Friday September 13, 2019 @05:59AM (#20960652)
But that's just false. Rotations preserve orientation, reflections do not. They can't be equivalent. Two reflections can be equivalent to a rotation however, because that restores the original orientation.
Re:The exponential function is a miracle by CogitoCogito on Friday September 13, 2019 @06:02AM (#20960667)
> But that's just false. Rotations preserve orientation, reflections do not. They can't be equivalent. Two reflections can be equivalent to a rotation however, because that restores the original orientation.

I believe the parent meant the statement as it applies to a single point. E.g. meant to say "a half turn rotation in a plane [of a point] is equivalent to a reflection across the axis of rotation."

Re:The exponential function is a miracle by jacobolus on Friday September 13, 2019 @03:57PM (#20965846)
A reflection across the axis of rotation, which is a point, not a reflection across a line.

–1 is the quotient of any two vectors which have the same magnitude and point in opposite directions.

Re:The exponential function is a miracle by ColanR on Friday September 13, 2019 @01:59AM (#20959560)
That is the best explanation I've ever seen.
Re:The exponential function is a miracle by The_rationalist on Friday September 13, 2019 @04:09AM (#20960142)
It's kinda sad that formalism here is far less clearer than natural language. I often wonder if instead of formalisms, mathematicians should just have used attempto controlled English.
Re:The exponential function is a miracle by lonelappde on Friday September 13, 2019 @07:09PM (#20967601)
They tried that before the nineteenth century and it stymied progress. Imagine multiplying just two-digit numbers without any notation.
Re:The exponential function is a miracle by The_rationalist on Saturday September 14, 2019 @07:15AM (#20970085)
They didn't tried attempto controlled English in the nineteenth century as it only exists since end of twenty century.

Imagine multiplying just two-digit numbers without any notation I agree, notation can be useful for concision. Far less for clarity. Instead of a black or white thinking, I'm wishing that mathematicians use more well defined English in their proof, but still use notation where it is clear and more concise.

Re:The exponential function is a miracle by gigatexal on Friday September 13, 2019 @02:44AM (#20959784)
I was never very good at geometry and this explanation has me feeling like a really stupid child.
Re:The exponential function is a miracle by garmaine on Friday September 13, 2019 @03:23AM (#20959937)
Re:The exponential function is a miracle by gigatexal on Saturday September 14, 2019 @06:17AM (#20969904)
That makes a lot of sense now -- thanks!
Re:The exponential function is a miracle by tim333 on Friday September 13, 2019 @07:04AM (#20960975)
The surprising thing is that a bit of arithmetic results in something like geometry.