A Visual Intro to Complex Numbers

(photonlines.substack.com)

64 points | by surprisetalk 4 hours ago

17 comments

  • arun-mani-j 1 hour ago
    When I first learnt complex numbers in school, I couldn't understand their purpose or why they are called imaginary etc.

    I checked where they are used and found examples of current, magnetism etc. But I couldn't understand, electricity is a measurable physical quantity, how can you use imaginary numbers there??

    Then I searched internet and found a Stack Exchange answer telling the story and how, instead of, complex (sounds like difficult) or imaginary (sounds like not useful practically), if we had better terms for them, then it would have been easier for beginners to understand them more intuitively.

    It's completely true in my case.

    After learning usage of vectors, thanks to Godot, for rotation and movement, and then about matrix etc. I now feel like "complex" numbers etc. are the representation of data through multiple numbers where a single value (scalars) is not enough. I may not be right in strict mathematics terms, but at least that's how I was able to understand them.

    • bananaflag 1 hour ago
      I think it would have been clearer if they weren't called "numbers".

      For example, look at matrices [1]: no one asks themselves whether they are "real" or not. We know that we have defined operations on arrays of numbers which are useful to some degree.

      If complex numbers were just called "complexes", a lot of confusion would just wither away.

      Also, interestingly, quaternions and octonions aren't called "numbers".

      [1] Complex numbers may, of course, be seen as special kinds of matrices, but this is beside my point here.

      • prmph 3 minutes ago
        [delayed]
    • joostdevries 24 minutes ago
      I particularly like this book by Steven Pemberton. https://homepages.cwi.nl/~steven/Numbers.pdf

      Imaginary numbers never made sense to me in high school. But this book gradually builds it up in a way that made the conclusion positively intuïtive. Highly recommended!

    • ab71e5 50 minutes ago
      I've come to understand it as something with both a magnitude and a phase. When you have a unity sine wave, it has two points per period where the magnitude is zero but those points have different phases.
    • ambicapter 38 minutes ago
      > I now feel like "complex" numbers etc. are the representation of data through multiple numbers where a single value (scalars) is not enough.

      Ok, now find a single term that you think would adequately describe that concept.

    • rottc0dd 52 minutes ago
      I really was surprised on this when learning about these in Welch labs [1] and 3b1b.

      [1] https://www.youtube.com/watch?v=T647CGsuOVU&list=PLiaHhY2iBX...

    • stackghost 1 hour ago
      I had a calculus prof who described it thus:

      Calculus is a mathematical model of the world, and it is wrong in the sense of the famous quote about "all models [being] wrong, but some are useful", so mathematicians used the imaginary unit almost like a hotfix for their model.

      Whether that's an accurate/rigorous statement or not, it helped me as a learner.

      You can, of course, express things like oscillation without i, using vectors and matrices. But the ability to use Euler's formula to express complicated sinusoids as compact exponentials with base e simply makes the analysis much easier. In the words of my prof, it's merely a mathematical structure to express things more easily that "regular calculus" isn't good at expressing.

      To me, that made the apparent paradoxes of expressing e.g. phase angles and reactive power and stuff using i a lot easier to stomach.

    • MrBuddyCasino 1 hour ago
      So much of mathematics is just this.
  • nneonneo 30 minutes ago
    This article misses one of the most useful and deep representations for complex numbers: polar coordinates. There’s some bits in there about adding angles and such when multiplying, but it turns out these are “obvious” in polar notation.

    A complex number can be expressed in Cartesian coordinates as (x,y) or x+yi. It can be expressed as polar coordinates as (r,theta). What’s the corresponding complex notation? Surprisingly, it’s r*e^(i theta), where the angle is taken in radians. It might seem really weird to see an exponential there, but it turns out that the exponential behaves like a trig function when given an imaginary exponent - to be precise, e^(i theta) = cos theta + i sin theta.

    Now multiplication becomes easy: multiplying two polar-notation complex numbers (r1,t1) x (r2,t2) gives r1r2 e^(i (t1+t2)) following the usual rules of exponential arithmetic, i.e. (r1r1, t1+t2).

    The complex exponential looks like a very strange notation at first because we’re all used to grade school exponents, but you can think of it as a function that takes an angle and produces a point on the unit circle. Feed it a continuous input, and it traces out an arc or a circle. sin and cos are merely the one-dimensional projections of this function.

    Frequency becomes simply e^(i ft) where f is the frequency in radians and t is time - representing a point racing around a circle at a set speed. Multiplying two signals with different (complex) frequencies produces a new signal with the sum of their frequencies. With this notation, complex signals are the simple ones to understand - real signals are the “more complex” ones, as every real signal consists of a complex signal added to its conjugate.

  • zkmon 1 hour ago
    But when you represent a complex number as a+bi, what's the meaning of '+' there? In Argand diagram, the numbers are coordinates. Why do you sum up coordinates?

    More fundamentally what's addition and multiplication? Is there a continuity between them, like an operator that represents both addition and multiplication meeting them half-way?

    What's the significance of square and square root? Aren't they just some exponent values (2, 1/2) which have no particular significance on the real line? Why should imaginary numbers have a special place if they are tied to square roots (exponent of 0.5)?

    • creata 1 hour ago
      > Why do you sum up coordinates?

      People use sums to denote vector components, too. It's common to see ai + bj + ck (pretend there are hats on i, j, and k) to mean the vector [a b c].

      So with complex numbers, you can think of it as a vector aj + bi where j and i are basis vectors, but we call j "1", because complex numbers have a notion of multiplication, and in that notion, j acts like 1, in that zj = jz = z for any complex number z.

      Nothing bad happens if you write all complex numbers a + bi as vectors or tuples [a b]. It's just less convenient.

      • zkmon 58 minutes ago
        We denote a 2D point as (3,2) not (3+2). Why?
        • creata 54 minutes ago
          3 + 2 is just 5. But people will sometimes write 3i + 2j for the point or vector (3, 2), where i is the vector (1, 0) and j is the vector (0, 1).
        • laszlokorte 51 minutes ago
          In your example 3 and 2 belong to different dimensions. you could write "3x + 2y" to express 3 steps along the x axis and 2 along the y axis. Just writing "3+2" would lead to the expectation that 5 could be calculated as reasonable result, which would not be the case.
  • reenorap 1 hour ago
    Complex numbers would be a much easier concept to understand if they didn't call it "complex" numbers or use the term "imaginary" numbers. Both of those make it much harder to digest because now you think that it's not real. What they really are are 2 dimensional numbers, meaning they have 2 components to each number.

    The same goes for the term "real" numbers. Sometimes math, and its descendants like physics and computer science, can be too cutesy with their names that make it hard for regular people to understand or accept.

    • raegis 1 hour ago
      I've been teaching math for 35 years, which I admit, doesn't say much, but I assure you the difficulties students have with complex numbers by and large have nothing to do with the name. It's the same with everything else: lack of preparation in arithmetic and basic algebra.
      • alterom 31 minutes ago
        Well calling complex numbers "rotational" would at least give a clue to what they do.

        You can do them purely geometrically, so lack of preparation in arithmetic and algebra isn't a pre-requisite.

    • ky3 1 hour ago
      Hear, hear. "Complex" makes it sound difficult, when the original idea was that they were a complex--as in compound--of two numbers. Complex analysis turns out to be almost trivial, thus taking an orthogonal journey, compared to the gnarliness of real analysis.
      • gus_massa 1 hour ago
        One of my friends had a Russian book translated to Spanish. The translation had a few mistskes, in particular they call them "complicated" numbers. :)
  • s-zeng 49 minutes ago
    I do have a soft spot for visual complex number explainers, good work. When I was 13 I credit [1] for blowing my mind about complex numbers and setting me onto my current career path

    [1]: https://acko.net/blog/how-to-fold-a-julia-fractal/

    • EForEndeavour 33 minutes ago
      Wow. Thank you for sharing this relatively ancient online treasure.

      Aside: as a commentary on how AI-brainrotted I've let myself become, I am awestruck by the animations and writing on that page predating the LLM coding era by that much. Already, the idea of someone acquiring the theoretical knowledge and practical software skills and time management and executive-function skills to create that page feels like it will only get more rare as more of us work at ever higher levels of abstraction.

  • Trusteando 1 hour ago
    The complex exponential help to solve many common ODEs that are used to model some common problems in engineering. Usually for such problems, the real and imaginary part of exp((a+bi)t), are both solutions of the problem of type exp(at)cos(bt) and exp(at)sin(at), for this oscillatory functions the sign of a, the real part of z, determine the behavior of the amplitude and the value of the imaginary part of z, b, give us the frequency of that oscillation, this relation between complex numbers, ODE, amplitude and oscillations are at the core of many fruitful applications.
  • laszlokorte 1 hour ago
    For an interactive approach I built this some time ago. [1]

    It allows putting complex numbers on the complex plane and doing addition, multiplication and exponentiation via drag and drop. It provides some intuition for addition==translation and multiplication==scale-rotation.

    [1]: https://static.laszlokorte.de/complex-plane/

  • ttoinou 1 hour ago
    I recommend Visual Complex Analysis by Tristan Needham
    • pratikdeoghare 1 hour ago
      There is proof of this theorem in it that blew my mind some years ago [1]. Someday I want to finish reading the rest of the book.

      > Starting with a given convex quadrilateral, construct a square, external to the quadrilateral, on each side. Van Aubel's theorem states that the two line segments between the centers of opposite squares are of equal lengths and are at right angles to one another.

      https://en.wikipedia.org/wiki/Van_Aubel%27s_theorem

      • kevinwang 48 minutes ago
        Wow, that's such a surprising theorem. Thanks for sharing.
  • bananaflag 1 hour ago
    The explanation is a bit confusing, since it basically reduces to "some equations don't have solutions, so we have to invent them", which, if you already accept, you don't need complicated equations, just x^2=-1.

    One thing which would have worked better (which is briefly mentioned) is Cardano's casus irreducibilis, but that would have needed more work.

    • Trusteando 50 minutes ago
      From a pedagogical point of view, you could also claim that using real numbers the maximum of x*y with the constraint x+y = s is at x=y. Now the question is what happens if we try to go beyond the maximum value by introducing complex numbers so that any quadratic equation has a solution? Now the expanded set, C, and the solutions of the quadric allow you to obtain information that was previous lost by declaring just that the equation did not have real roots. For example if we use quadrics to solve the EDO for a RCL circuit now we see that the new solutions of the quadric allow us to know how the amplitude and frequency of the oscillatory solutions, that is a real gain.
  • pratikdeoghare 1 hour ago
    I used complex numbers to solve popular interview question.

    It can be used to convince students that they are useful.

    https://pratik.deoghare.com/complex-mars-rover.html

  • socializer 1 hour ago
    Really? Of approximately one billion good, visual introductions to complex numbers, we're going to pick an article that appears to be substantially written by an LLM?
    • alterom 28 minutes ago
      My feelings exactly.

      It doesn't just appear to be substantially written by an LLM; it was written by an LLM.

      It lacks the punch. Anyone who didn't know the geometric definition would just be bored to hell by going over the history of how they were discovered which has nothing to do with geometry.

      The article says "Visual Intro", but the introduction is literally not visual. The complex numbers are introduced through historical/algebraic lens, and then reintroduced visually, by which time the audience has been lost.

      Of course this article will rise to the top here.

  • rramadass 52 minutes ago
    Here is an excellent (and visual) series of videos on Complex Numbers by Welch Labs titled "Imaginary Numbers are Real" - https://news.ycombinator.com/item?id=46972870
  • d--b 1 hour ago
    I find the historical approach is not the best way to learn about complex numbers.

    Deciding square root of -1 is fine and use it in calculations as if it existed is confusing. Why does it work with sqrt(-1), and not with dividing by 0 ?

    introducing the imaginary plane as: "hey someone found you could just draw them, and it works even better!" is even worse.

    To teach complex numbers, you should start by defining them:

    1 is here, i is here, multiplication for 1 is like in R, but multiplicating i by itself goes to -1, and then derive the calculation rules then.

    And only when you went all the way to exp(i*theta) = cos(theta) + i sin(theta)

    Only then you should explain what they are for. That they are a way to treat real numbers as a projection of these things that behave nicer in calculations. Deriving trig functions from that simple formula is trivial.

    • BobaFloutist 54 minutes ago
      > Why does it work with sqrt(-1), and not with dividing by 0

      This is pretty straightforward to explain.

      With dividing by zero, any number you multiply by zero becomes zero. There's no other way to get zero through multiplication. So, the only sensible thing to divide by zero is zero (since "What times zero equals six?" doesn't have an answer).

      But because anything multiplied by zero is zero, even if you divide zero by zero you have an undefined answer. Zero divided by zero could be anything! So that's also not meaningful.

      The square root of negative one, however, only has to be defined once to get meaning out of all negative square roots.

      • d--b 17 minutes ago
        well see the sibling comment... Apparently extending the complex plane with a number that represent 1/0 is a thing...
    • laszlokorte 21 minutes ago
      I think the best introduction is by taking the geometric perspective: Addition is translation, multiplication with a positive number is scaling, multiplication with -1 is reflecting across the origin, multiplication with any negative number is scaling and reflecting at once. multiplying with a square root of a positive number does only part(half) of the scaling. multiplying twice with the square root does the full scaling.

      Now the only question left is: what is the half of a reflection? a 90 degree rotation into a new dimension. Doing it twice returns to the original dimension but on the opposite side of the origin.

      This also explains why division of 0 is a problem: multiplying by 0 scales everything to the origin (ie deletes the original size). Division would need to restore the original size. But as a sibling comment has already said. Division by zero could just scale everything to infinity. But then everything can only flip between 0 and infinity.

      • d--b 11 minutes ago
        yeah I think that's right.

        taking the geometric aspect first and defining operations on points in the plane, showing that it works to match multiplication and rotation.

    • alterom 27 minutes ago
      >Why does it work with sqrt(-1), and not with dividing by 0 ?

      Good question!

      It does work with dividing by zero :D

      See: https://en.wikipedia.org/wiki/Riemann_sphere

  • jdw64 1 hour ago
    The explanation is easy and fun.
  • dominotw 1 hour ago
    tangent: I am really enjoying the new ui elements in chatpgt.

    Explain X to me prompt now gives me pictures, quizes . so good.

    • alterom 25 minutes ago
      Not a tangent really. This explanation was very clearly LLM-produced.

      For starters, this "visual intro" introduces complex numbers algebraically.

      The text has a visual explanation, but the intro had zero pictures.

  • yoonge2 2 hours ago
    [flagged]