Ove Daae Lampe

+

5

6

5

6

5

Great work +Steven Wittens.

You are definitively going in my circles so I can keep up with your future work :)

You are definitively going in my circles so I can keep up with your future work :)

An experiment in math publishing, using MathBox, explaining the often misunderstood subject of Complex Numbers.

276

206

82 comments

Ove Daae Lampe

+

5

6

5

6

5

Great work +Steven Wittens.

You are definitively going in my circles so I can keep up with your future work :)

You are definitively going in my circles so I can keep up with your future work :)

Thanks for this and nice to meet you. Been working on fractals the last month and this just became a spring for imagination

thanks for this writeup. I really enjoyed reading and exploring it.

Always thought math was a bit to abstract for me, especially calculas Very nice write up, enjoyed it

Nicolás Bagnasco

+

2

3

2

3

2

Congratulations +Steven Wittens I really enjoyed reading your article. Not only the use of WebGL, but the content itself and how it's explained makes a pleasure to read and interact.

Dan Brickley

+

2

3

2

3

2

Beautiful! Any interest in doing eigenvectors next? :)

Absolutely great +Steven Wittens. Although I do not want ot get in a post russelian argument, It's often a good pedagogic practice in math to be ruthlessly pragmatic and point out that the "function" made the numbers and not the other way around. (in fact without a doubt there will be another "function" that will require another set of ad-hoc cardinal numbers in the near future (my apologies to Hilbert). That said, I cannot wait to read/see/feel your next topic about Euler's identity! - the reason we are all here today. PS. In those same pragmatic lines, I do believe that math does not exist, only code. So do please share your raw code with us, sp. for those who are extremely annoyed by purely aesthetic + headache causing WebGL.

Fantastic! I will have to go through this several times, but the Aha! elements are all there. Now I wonder what went through my Dad's mind (electrical and semiconductor engineer) when he watched us play with a rope, spinning sine waves from one end to the other. Please continue!

Amazing! Thank you, I really enjoyed it.

Darren Schebek

+

2

3

2

3

2

That is, by far, the most enlightening explanation of complex numbers I have ever seen. Phase in waves makes a whole lot more sense to me now. Thanks for making that; I would love to see more. :)

Steven Wittens

+

2

3

2

3

2

+C.A. Palma The source code for mathbox is already on Github. You can also examine each of the diagrams directly just by viewing the iframe source: http://acko.net/files/fold-a-julia/mb-2-julia.html

Superbly done!

That was great up until the sine wave bit, which was just flashing weirdness for me.

Not nearly as beautiful, but you might also like this slideshow I wrote a while back:

How to explain Euler's identity using triangles and spirals

https://docs.google.com/present/edit?id=0AR9d_8p4dUK2ZGdiZno4c21fMTZmODRtc3FkMg

How to explain Euler's identity using triangles and spirals

https://docs.google.com/present/edit?id=0AR9d_8p4dUK2ZGdiZno4c21fMTZmODRtc3FkMg

Visualising how the Mandelbrot maps onto itself: http://code.google.com/p/mandelstir/

+Tim Hutton That's gorgeous, what a great way to show it.

+Brian Slesinsky Indeed, I avoided getting in to e^iπ because 'e' requires its own introduction. And actually, you can omit it entirely just by using the polar/angle notation. In a way, I kind of skipped having to mention it, by using complex exponential spirals as the 'gateway' idea.

But if there is a part two, that would definitely go in. BetterExplained.com's explanation of just e^x is great for the same reason.

But if there is a part two, that would definitely go in. BetterExplained.com's explanation of just e^x is great for the same reason.

Holy shitballs.

The common approach ends up leaving people boggled at complex exponentials as if they were something that fell in from outer space.

I like the idea of basically starting with complex multiplication as a "multiplication with turning" operation, which makes it pretty clear why exponentiation would give you circles and spirals (and therefore trigonometric functions), though maybe not where*e* comes in (which is all about calculus and very basic differential equations).

I like the idea of basically starting with complex multiplication as a "multiplication with turning" operation, which makes it pretty clear why exponentiation would give you circles and spirals (and therefore trigonometric functions), though maybe not where

This is a really amazing piece of work. Good job!

Linus Upson

+

1

2

1

2

1

"To view these, unfortunately you need four-dimensional eyes, which nature has yet to provide."

Nature has provided you eyes that can see four dimensions. The question is whether or not you can train your brain to interpret the input.

http://mathforum.org/kb/message.jspa?messageID=1068556

Nature has provided you eyes that can see four dimensions. The question is whether or not you can train your brain to interpret the input.

http://mathforum.org/kb/message.jspa?messageID=1068556

+Linus Upson I would say that depends on your definition of 'viewing' and 'seeing', and the whole point of the article was that you can explain a whole lot without having to precisely define much of it. ;)

If you look at my Making MathBox article, you can see there's a 3D projection of the complex exponential map in there:

http://acko.net/files/mathbox/MathBox.js/examples/ComplexExponentiation.html

I'm definitely all for 4+D visualization and have some interesting experiments there to use for future posts.

If you look at my Making MathBox article, you can see there's a 3D projection of the complex exponential map in there:

http://acko.net/files/mathbox/MathBox.js/examples/ComplexExponentiation.html

I'm definitely all for 4+D visualization and have some interesting experiments there to use for future posts.

+Linus Upson I should add that one thing I tried to illustrate is that by decomposing complex operations into real and imaginary components, you really destroy inherent symmetries. I find the standard approach to plot complex functions as Re() and Im() very wrong for this reason, and have been trying to find good ways to preserve the circular features of phase graphically.

Absolutely fantastic post +Steven Wittens. So well explained and visualized. I think we are seeing why old physical textbooks are not long for this world with descriptions like this. I would love to see a similar treatment of how complex numbers underly quantum physics.

This was more useful than a month in the classroom in high school fussing around with a Ti-87, very cool man!

I'm wondering if it's possible to pull this into an iBook and run it on an iPad? haha. :D

This is great work! Thank you very much!

+Aaron Hilton Ever played with any of the WebGL enablers for UIWebView?

http://stackoverflow.com/questions/6313768/deploy-webgl-applications-as-native-ios-or-android-applications

I imagine the fractal generator might grind an iPad to a halt and/or eat up all its VRAM, but I could fix that with simple user agent detection. Maybe I need to get my hands on an Android tablet with WebGL and a decent GPU ;).

http://stackoverflow.com/questions/6313768/deploy-webgl-applications-as-native-ios-or-android-applications

I imagine the fractal generator might grind an iPad to a halt and/or eat up all its VRAM, but I could fix that with simple user agent detection. Maybe I need to get my hands on an Android tablet with WebGL and a decent GPU ;).

+Linus Upson You know your brain already knows how to do depth perception based on vertical parallax - though rather than using periscopes the usual mechanism is walking (which makes your eyes move up and down).

So, you'd have to retrain a built-in mechanism to get 4D - somehow I have my doubts.

BTW, did you notice my earlier comment (that this demo doesn't work right on Chrome on Mac)?

So, you'd have to retrain a built-in mechanism to get 4D - somehow I have my doubts.

BTW, did you notice my earlier comment (that this demo doesn't work right on Chrome on Mac)?

This is really one of the best posts I have ever seen on the subject! Thank you so much for it. I would definitely be interested in future posts. Especially about gaining further intuition on integral transforms and why they make solving differential equations so much easier (see also my question here: http://mathoverflow.net/questions/2809/intuition-for-integral-transforms)

+Ben Laurie Unfortunately support for WebGL is a bit spotty and there could be bugs. But I develop on a Mac and it works on Chrome for me...

+Steven Wittens Odd. I tried it on Safari and it worked fine there.

Where was this a year ago when I was starting E&M? That is the best and prettiest explanation I have ever seen for complex waves.

Very nice explanations, i really enjoyed reading this!

Steven Wittens

+

1

2

1

2

1

+Holger K. von Jouanne-Diedrich That's a great question, which can be somewhat answered using the final couple of slides.

The derivative of a complex wave is the same wave rotated by 90 degrees—and scaled by a constant, though in my case it's 1. So if you can decompose your solution into a sum of complex waves of different positive and negative frequencies (i.e. fourier transform), then differential relationships are simpler to express.

The only catch is that different frequencies have to undergo a different phase shift in order to move the same physical distance. e.g. Two opposite frequencies have to twist in opposite directions to add up to a single real wave that moves at constant speed. And frequency 2 will move half as far if you twist it 180 degrees than frequency 1. If you don't do this, they go out of phase and add up to a random wave, as in the final slide.

Hence, if you want to fourier-transform a derivative over units of distance (uniform for all frequencies) rather than over units of phase (frequency-specific), you have to scale each complex wave's phase proportional to the frequency. But scaling phase = multiplying angles = the power of a complex number.

Hence, each application of the derivative on a complex wave multiplies by a complex constant which is power-proportional to frequency (i.e. first derivative x iɷ, second derivative x iɷ², etc.).

This is why Fourier transforms turn differential equations into polynomials. The differential equation's conditions have been transformed into a power-relation of complex numbers. You're expressing the phase conditions required for all your complex waves to add up to a coherent, real solution that satisfies the constraints.

The kicker is then that Laplace transforms (decomposing into exponentials) and Fourier transforms (decomposing into complex waves) turn out to be identical, aside from a 90 degree rotation. Because (e^x)∠y = e^(x+iy) = (cos y + i*sin y) * e^x.

Thanks to the magic of complex exponentials combining both exponential changes in magnitude and proportional changes in phase/angle, both wave-like and exponential-like differential equations can be expressed as two faces of the same coin.

Indeed, when you Laplace transform a real differential equation and try to solve the polynomial involved, you either get real roots, or pairs of complementary complex ones. Such a pair represents the fact that you always need two counter-rotating complex waves in the solution to add up to a real value.

I'm a bit rusty on this stuff though, I'm working from memory here.

The derivative of a complex wave is the same wave rotated by 90 degrees—and scaled by a constant, though in my case it's 1. So if you can decompose your solution into a sum of complex waves of different positive and negative frequencies (i.e. fourier transform), then differential relationships are simpler to express.

The only catch is that different frequencies have to undergo a different phase shift in order to move the same physical distance. e.g. Two opposite frequencies have to twist in opposite directions to add up to a single real wave that moves at constant speed. And frequency 2 will move half as far if you twist it 180 degrees than frequency 1. If you don't do this, they go out of phase and add up to a random wave, as in the final slide.

Hence, if you want to fourier-transform a derivative over units of distance (uniform for all frequencies) rather than over units of phase (frequency-specific), you have to scale each complex wave's phase proportional to the frequency. But scaling phase = multiplying angles = the power of a complex number.

Hence, each application of the derivative on a complex wave multiplies by a complex constant which is power-proportional to frequency (i.e. first derivative x iɷ, second derivative x iɷ², etc.).

This is why Fourier transforms turn differential equations into polynomials. The differential equation's conditions have been transformed into a power-relation of complex numbers. You're expressing the phase conditions required for all your complex waves to add up to a coherent, real solution that satisfies the constraints.

The kicker is then that Laplace transforms (decomposing into exponentials) and Fourier transforms (decomposing into complex waves) turn out to be identical, aside from a 90 degree rotation. Because (e^x)∠y = e^(x+iy) = (cos y + i*sin y) * e^x.

Thanks to the magic of complex exponentials combining both exponential changes in magnitude and proportional changes in phase/angle, both wave-like and exponential-like differential equations can be expressed as two faces of the same coin.

Indeed, when you Laplace transform a real differential equation and try to solve the polynomial involved, you either get real roots, or pairs of complementary complex ones. Such a pair represents the fact that you always need two counter-rotating complex waves in the solution to add up to a real value.

I'm a bit rusty on this stuff though, I'm working from memory here.

Derek Berner

+

2

3

2

3

2

I have an engineering degree from a pretty damn prestigious school, and nobody's ever explained complex numbers so simply and eloquently to me before. Great job, and I'd love to see more.

Great work! I did have to reload the page a few times to get it to work with Chrome Version 23.0.1271.97 m on Windows 7

+Steven Wittens This is great, thank you - I will carefully re-read your answer and come back to you in case I don't understand bits of it. If you want, you could also post an answer to the original question on MathOverflow (I bet you are a member already :-)

Alec Lanter

+

2

3

2

3

2

This is by far the best explanation of fractals and complex numbers I've ever read. Where's your tip jar?! :)

THANK YOU! I had hard time understanding imaginary numbers in college, I'm also an electrical engineering major. I wish your website existed when I was in high school! This is just fantastic!!

Excellent, excellent stuff. Gave me ideas for making some of my audio DSPs better.

MathBox looks to be a SaaS implementation. I am using Blender to discuss engineering. Anywho, nice presentation.

Absolutely fantastic work, putting computer-aided teaching in a whole new light. I'm much looking forward to any future posts in this fashion.

Alon Eitan

+

1

2

1

2

1

I never actually used Google+ ever since I signed up to it, but your visual explanation of complex numbers was simply so magnificent that I can't NOT give you huge kudos.

I studied complex numbers less than a year ago and used GeoGebra to make my own visualization of rooting and squaring a complex number, but I never imagined it the way you did - which is much better than what I came up with.

I would absolutely love to see more of these types of animations and explanations.

I studied complex numbers less than a year ago and used GeoGebra to make my own visualization of rooting and squaring a complex number, but I never imagined it the way you did - which is much better than what I came up with.

I would absolutely love to see more of these types of animations and explanations.

I went through Calc 3 and discrete math in college. I've played with fractals for at least a decade and a half in at least a dozen pieces of software. Your charts and descriptions just taught me a ton that I'd never understood before. This is a stunning piece of work. Thanks for sharing it!

This was brilliantly done--it makes making fractals that much more enjoyable.

Especially helpful for programmers in creating fractal-generating tools.

Especially helpful for programmers in creating fractal-generating tools.

Amazing, I thought that fractals were some "pretty cool" thing that I had learned about in 8th grade, but this article brings them to life for me once more.

Thank you! Amazing, this really helped imaginary/complex numbers click in my head. Please do more math tutorials like the ones you mentioned at the end of the article ("the nature of eix, Fourier transforms").

Thank you very much for creating this! Very insightful and inspiring.

Thank you. Wonderful.

Best article I've read in a long time. Great work. Thank you so much. I'll keep it for my daughter when she grows up a bit.

Good job! Now you'll have to make more of these :)

Best explanation of complex numbers I've ever seen. Every time I have to deal with them, I'll use this as the explanation.

Brilliant!

Dimiter Stanev

+

1

2

1

2

1

First I saw it on http://news.ycombinator.com - fantastic work! I can imagine how a future school book would look like - iPad, Android or some other device with webGL or something similar letting kids read, view from different angles and experiment. Very well done!

This is so cool! The animations were very enlightening. I hope you will do more stuff like this soon.

This is absolutely brilliant, and I too am looking forward to seeing you tackle Euler's identity and beyond. :)

Great explanation and awesome visualizations!

This is fantastic. I now realize my understanding of complex numbers was completely naive. This is how they should teach math!

Thank you for taking the time for this write up. Great work and yes, please do continue!

Thanks for all the feedback everyone. I just pushed some updates... the mandelbrot was broken in Firefox, so I took the opportunity to redo the last section of slideshow #2. Now features hot 4D fractal on fractal action, and minibrot to close it off with.

I never comment on Google+; I don't even use it at all, really. However, that was the most fascinating article I've had the pleasure of reading in a long time, and the stunning visualizations were extremely helpful for understanding. I've since shared it with most of my friends and coworkers.

Thank you so much and I hope you post more articles on e^ix, Fourier transforms, etc. like you said!

Thank you so much and I hope you post more articles on e^ix, Fourier transforms, etc. like you said!

This is the best thing on the Internet right now. Bravo.

The visualizations are just spectacular. Well done!

I have a couple of minor suggestions, mainly mechanical stuff like copyediting and typesetting. Let me know if you'd like to hear them. In any case, keep doing stuff like this. It's awesome!

I have a couple of minor suggestions, mainly mechanical stuff like copyediting and typesetting. Let me know if you'd like to hear them. In any case, keep doing stuff like this. It's awesome!

+Michael Hartl Feel free to send your suggestions to steven at acko dot net.

Reading this was awesome.

Cristián Romo

+

1

2

1

2

1

Thanks; this is the first explanation of complex numbers that I've ever seen. I had known that the x + iy form was a Cartesian representation, but I never understood why they were polar - your explanation is excellent and intuitive and clear. The visuals are amazing and incredibly helpful; suddenly I see complex numbers all around me. I would be thrilled if you continued to post articles on further subject matter.

Holy smoke! That has to be the nicest math blog post I've ever seen! Really impressive stuff you pull off with MathBox -- and you've put it on GitHub as well. Thanks!

This is wonderful work! Congratulations and thanks!

That's the way complex things should be explained! Beautiful work.

Wow! I've been baptized with complex numbers... finally! Thank you +Steven Wittens (your enthusiasm is contagious :)

Paul Garner

+

1

2

1

2

1

OMG thank you, best math lesson ever! Imaginary numbers is where I gave up with math in high school... mostly because it was presented as a bunch of rules and terminology to learn by heart, for something that seemed impossible, without any sense of how to understand it. Your blog post not only made them comprehensible, but beautiful as well. Please continue with the other topics ...!!

Absolutely stunning visualization, great introduction! Thanks and looking forward for more.

Kieran Garland

+

1

2

1

2

1

Just wanted to congratulate on a superb and breathtaking post. Please, please, please keep making these and keep showing us the results of the explorations.

I actually felt as if I glimpsed something of reality here, and am developing a much deeper understanding of math as I do.

Bravo.

I actually felt as if I glimpsed something of reality here, and am developing a much deeper understanding of math as I do.

Bravo.

This is incredible! Please make more on complex numbers I am finally starting to understand them!

This is truly the best thing i have seen on the internet since i was in highschool and i discovered flash games.

This was my first introduction to complex numbers. I want to see more stuff like this! Great work Steven!

Wow, amazing. This will be added to my unit on Complex numbers! Love it.

Very nice. I hope you do more : )

Haydn Peterswald

+

1

2

1

2

1

Without a doubt the best explanation of complex numbers I have seen. The animated diagrams helped an enormous amount.

Delightful! A small correction: in the Traveling without Moving visualization, slide 6/16, I believe you intended to say "What's actually going *on* is that..." but you left out the "on".

+Steven Wittens you are infinitely awesome ;=)

Add a comment...