4 ms·
For what it’s worth, my first session went like this: >> e^iπ+1 2.6974097548 + 2.6435590641i >> e^iπ 1.6974097548 + 2.6435590641i In fairness, I still
by sillysaurusx 5y ago
For what it’s worth, my first session went like this:
>> e^iπ+1
2.6974097548 + 2.6435590641i
>> e^iπ
1.6974097548 + 2.6435590641i
In fairness, I still don’t know where “e” comes from in complex number notation. The transition from cos(angle) + i sin(angle) seems to become “e^i(angle), lol” and no one explains it further. Before I started doing signal processing, I too would have thought that e^i pi is something like 1.69 + 2.64, so it’s correct, in a certain sense. But perhaps not the common mathematical sense.
EDIT: Ah, I see the problem. I suspected that e^iπ was being turned into πe^i incorrectly, but when I typed the open parenthesis for e^() and put my cursor inside it, typing "i" resulted in e^i() rather than e^(i). So it was impossible to parenthesize correctly, and I assumed e^iπ had the usual meaning.
- lhjn 5y agoIt's the exponential notation for complex numbers, see for example https://tutorial.math.lamar.edu/Extras/ComplexPrimer/Forms.aspx https://tutorial.math.lamar.edu/Extras/ComplexPrimer/Forms.a...
- sillysaurusx 5y agoThat post proves the point: it jumps from "use cos(t) + i sin(t)" to "use e^it" with zero explanation about why it's related to 2.718281828... The reason I posted my comment is because e^(i pi) is obviously supposed to be -1+0j. But I see now that I was using the calculator incorrectly (I was doing the equivalent of πe^i) but there was a bug in the parenthesis operator preventing me from typing it that way on mobile.
- Tubeee 5y ago> it jumps from "use cos(t) + i sin(t)" to "use e^it" with zero explanation about why it's related to 2.718281828... It really isn't, beyond the fact that exp(1) = 2.718…. Then, by definition exp(it) = exp(1)^(it) = e^it. It isn't much more than a notational artifact as far as I'm concerned. For that matter, raising any base b to a power is equivalently just scaling it by ln(b) and plugging it into exponential function, that is, b^it = cos(ln(b) * t) + i sin(ln(b) * t).
- sillysaurusx 5y agoThat last equation clarified things greatly for me. Thanks.
- adrusi 5y agoThe derivation comes from Taylor series expansion of the exponential function e^x = 1 + x/1! + x^2/2! + x^3/3! + … You can throw together a program that will show numerically that this both converges to e^x for real x and that e^ix converges to cos(x)+i*sin(x). You can also find proofs online I’m sure.
- fennecs 5y agoWhy do it numerically? Show that e^ix converges, then you can reorder the sums, grouping the odd and even terms you get series expansions for cos(x) and i sin(x).
- subset 5y agoJust to be pedantic, the Taylor series definition of the exponential converges absolutely, hence we can reorder the terms by odd/even powers without changing the sum.
- adrusi 5y agoYou actually have to understand calculus for that to actually prove it to you, but, you can show that it seems to work out numerically with a bit of programming knowledge, which I imagine is more common on Hacker News. I don't think either the numerical or symbolic proofs really help build intuition though. This video [1] kinda helps, although it glosses over the critical fact "multiplying by i rotates counterclockwise 90°." [1] https://youtu.be/v0YEaeIClKY https://youtu.be/v0YEaeIClKY
- sillysaurusx 5y agoHmm. This is the second time I've seen that "multiplying by i rotates counterclockwise 90 degrees." I agree that this is one way to interpret the result. But is it literally equivalent to matrix multiplication by a 2D rotation matrix? Someone tried to say it was, which I felt skeptical about. (Also, thank you.)
- adrusi 5y ago