Calculating the norm of a complex number

(eli.thegreenplace.net)

19 points | by mfrw a day ago ago

10 comments

  • billti 12 minutes ago

    Multiplying any two complex numbers 'a' and 'b' gives you a complex number z whose magnitude is the magnitude of 'a' times the magnitude of 'b' (that's covered in the article). I always thing of a 'complex conjugate' as a reflection across the real number line (i.e. has the opposite angle or 'phase'), so when a complex number and its conjugate are multiplied the angle disappears and you're left with no imaginary component, thus just the real part which IS the magnitude. (As a^2 + 0 = c^2)

    I hadn't worked with complex numbers much for most of my life, but getting into quantum computing recently it is ALL complex numbers (and linear algebra). It's fascinating (for a certain mindset at least, which I guess I fall into), but it is a lot of mental work and repetition before it starts to feel in any way 'comfortable'.

  • Tainnor 20 minutes ago

    I don't understand the starting point of this blog post. Why should one intuitively think that |z|^2 = zz? I've never seen anyone been confused by this. It's like writing an article about why 2*3 can't be 5 or something.

  • andrewla 2 hours ago

    The trouble is that complex conjugation is not holomorphic (analytic) over the complex numbers.

    It's incredibly useful as an operator, and it appears all over the place in Hilbert spaces and other complex-probability situations, but fundamentally it defies attempts to use it for analytic purposes (like differential equations or contour integration).

    Useful when you need to treat the complex plane as a vector space or are interested in the topology of a complex function, but a pain to deal with in almost any other context.

    • rachofsunshine an hour ago

      For those of you wondering why on Earth such a simple function wouldn't be well-behaved, it can help to think about what you can do with the conjugate.

      In particular, since sums of holomorphic functions are holomorphic, the sum f(z) = z + z* of the identity function g(z) = z and conjugate function h(z) = z* would need to be holomorphic. But z + z* cancels out the imaginary part of z and therefore maps the complex plane to the real line - and it should be obvious that a map from C to R cannot possibly preserve the properties of C in any intuitive way.

      Roughly speaking, the conjugate fails to be holomorphic because it maps C to its mirror image, rather than C itself, in much the same way that reflecting a circle is different from rotating it.

    • Tainnor 11 minutes ago

      > The trouble is that complex conjugation is not holomorphic (analytic) over the complex numbers.

      Even more generally, a real-differentiable function is complex differentiable iff its (Wirtinger) derivative with respect to z* is 0.

  • rdtsc an hour ago

    You can try it out in Python directly which natively support complex numbers (just use j instead of i):

       >>> import math
       >>> z=1+2j
       >>> z*complex.conjugate(z)
       (5+0j)
       >>> math.sqrt((z*complex.conjugate(z)).real)
       2.23606797749979
       >>> abs(z)
       2.23606797749979
    
    As we can see abs(z) does the right thing. Try it with a negative imaginary part too and "nicer" values:

       >> z = 3-4j
       >>> math.sqrt((z*complex.conjugate(z)).real)
       5.0
       >>> abs(z)
       5.0
  • kgwgk an hour ago

    > Why z squared is not a norm-square Now it's time to go back to the question we started the post with. Why isn't zz (or z^2) the norm-square? [several paragraphs later]. Looking at the formal definition of the norm, it's clear right away that won't do. The norm is defined as a real-valued function, whereas zz is not real-valued.

    That much is clear much righter away just by noticing that for the simplest imaginary number imaginable (z=i) zz is negative but the norm-squared is positive-valued.

  • Adrock 2 hours ago

    A simple demonstration of why this is necessary is to consider the distance between the points 1 and i on the complex plane. If you naively compute the distance between them using the familiar Euclidean formula √(a²+b²) you get:

    √(1²+i²) = √(1-1) = 0

    That can't be right...

    • kgwgk an hour ago

      Even simpler is trying to calculate |i| (i.e. the distance between the points 0 and i on the complex plane) as √i² = √-1 = i.

    • nokan an hour ago

      you are calculating inner product of otrhogonal vectors. For distance it should be abs(a-b) it will result to sqrt(2).