TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Calculating the norm of a complex number

64 点作者 mfrw7 个月前

14 条评论

cool_dude857 个月前
&gt;Since complex numbers are also a vector space (of dimension 1)<p>This statement seems very likely to confuse someone who doesn&#x27;t know about or understand how to compute the norm of a complex number.<p>Complex numbers are a 1-dimensional vector space over the complex numbers themselves, but are probably more readily understood as a two-dimensional vector space over the reals. Any field is a vector space of dimension 1 over itself.
评论 #41943294 未加载
andrewla7 个月前
The trouble is that complex conjugation is not holomorphic (analytic) over the complex numbers.<p>It&#x27;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).<p>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.
评论 #41938567 未加载
评论 #41939208 未加载
评论 #41940598 未加载
评论 #41940514 未加载
Tainnor7 个月前
I don&#x27;t understand the starting point of this blog post. Why should one intuitively think that |z|^2 = zz? I&#x27;ve never seen anyone been confused by this. It&#x27;s like writing an article about why 2*3 can&#x27;t be 5 or something.
评论 #41939582 未加载
评论 #41939543 未加载
rdtsc7 个月前
You can try it out in Python directly which natively support complex numbers (just use j instead of i):<p><pre><code> &gt;&gt;&gt; import math &gt;&gt;&gt; z=1+2j &gt;&gt;&gt; z*complex.conjugate(z) (5+0j) &gt;&gt;&gt; math.sqrt((z*complex.conjugate(z)).real) 2.23606797749979 &gt;&gt;&gt; abs(z) 2.23606797749979 </code></pre> As we can see abs(z) does the right thing. Try it with a negative imaginary part too and &quot;nicer&quot; values:<p><pre><code> &gt;&gt; z = 3-4j &gt;&gt;&gt; math.sqrt((z*complex.conjugate(z)).real) 5.0 &gt;&gt;&gt; abs(z) 5.0</code></pre>
评论 #41940628 未加载
评论 #41940610 未加载
评论 #41946809 未加载
评论 #41940812 未加载
billti7 个月前
Multiplying any two complex numbers &#x27;a&#x27; and &#x27;b&#x27; gives you a complex number z whose magnitude is the magnitude of &#x27;a&#x27; times the magnitude of &#x27;b&#x27; (that&#x27;s covered in the article). I always thing of a &#x27;complex conjugate&#x27; as a reflection across the real number line (i.e. has the opposite angle or &#x27;phase&#x27;), so when a complex number and its conjugate are multiplied the angle disappears and you&#x27;re left with no imaginary component, thus just the real part which IS the magnitude. (As a^2 + 0 = c^2)<p>I hadn&#x27;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&#x27;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 &#x27;comfortable&#x27;.
kgwgk7 个月前
&gt; Why z squared is not a norm-square Now it&#x27;s time to go back to the question we started the post with. Why isn&#x27;t zz (or z^2) the norm-square? [several paragraphs later]. Looking at the formal definition of the norm, it&#x27;s clear right away that won&#x27;t do. The norm is defined as a real-valued function, whereas zz is not real-valued.<p>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.
sargstuff7 个月前
Not exactly a plane&#x2F;normal reply:<p>IMHO, much simplier if use dual numbers[0] in lisp&#x2F;lambda calculus context aka let a=lisp car and b-epsilon be lisp cdr.<p>Then normal calculations can also be symbolic, even if complex.<p>Although, per Lewis Caroll&#x27;s concept of imaginary numbers with no concept of &#x27;time&#x27;, this doesn&#x27;t quite work per functions&#x2F;lists needing &#x27;time to compute&#x27; a result.<p>Guess why Lewis Carrol&#x27;s &#x27;turing&#x27; white rabbit was always late. ?? car functions are real &amp; cdr (functions) imaginary until realistically evaluated&#x2F;looked @.<p>White rabbit never had time to get rid of at least one free variable of squareroot(i) = 0. Can&#x27;t think outside the box if can&#x27;t complete the square &#x2F; define the square boundaries.<p>aka escape 0&#x2F;&#x27;hole&#x27;. No going blue over &#x27;escape, aboard, retry?&#x27; too!<p>Although, one would thing endless repetitive real quad (quadriatic&#x2F;quadraceps) exercises would lead to declining&#x2F;-1 quad issues[3] at some point in the narrative. That&#x27;d require defining a lot of axionomic booles though. (Wachowski &#x27;The Matrix&#x27; contructs not withstanding).<p>If Lewis Carrol had known Andrey Markov[0], would the white rabbit have been able to learn the concept of time? (assumming Giuseppe Peano[1] doesn&#x27;t enter the looking glass and the turing white rabbit stops reading the (sin() sub 0 * sin() sub 1 * .... sin() sub n) sequence &#x2F; learns to complete the square at some point). -----<p>[0] : <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=ceaNqdHdqtg" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=ceaNqdHdqtg</a><p>[1] Giuseppe Peano. <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Peano_axioms" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Peano_axioms</a><p>[2] Andrey Markov. <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Markov_chain" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Markov_chain</a><p>[3] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Imaginary_unit" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Imaginary_unit</a>
Adrock7 个月前
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:<p>√(1²+i²) = √(1-1) = 0<p>That can&#x27;t be right...
评论 #41940847 未加载
评论 #41938694 未加载
评论 #41944488 未加载
评论 #41939329 未加载
评论 #41938753 未加载
评论 #41938757 未加载
rhelz7 个月前
The article has too narrow of definition of what a norm is--since around 1910 or so, we&#x27;ve had to have a more expansive notion of what can be a norm.<p>e.g. the norm for Minkowski&#x27;s space-time can be negative and does not satisfy the triangle inequality.<p>Imagine the sheer courage it took for Minkowski to propose a distance function which did not satisfy the triangle inequality.....the moral of the story is yes, learn up on these concepts, but don&#x27;t be so wedded to somebody else&#x27;s definition that you can&#x27;t see when it should be relaxed and generalized.
评论 #41950186 未加载
youoy7 个月前
Once you have decided to use the geometrical representation of the complex numbers, the justification of the norm of a complex number is Pythagoras&#x27;s theorem.<p>If you want a more &quot;complex numbers&quot; justification, you can say that you want to make the vector &quot;real&quot; by moving it to the real line, so you multiply it by the inverse rotation of the complex number that you are looking at. If you instead multiply it by the conjugate, then you need to compute the square root of the output since it multiplies by the radius again.<p>I hope this helps!
mikewarot7 个月前
I wondered what happens when you try to do this in more than 2 dimensions? It turns out that you can just extend the negation of the imaginary part before proceeding.<p><a href="https:&#x2F;&#x2F;math.libretexts.org&#x2F;Bookshelves&#x2F;Abstract_and_Geometric_Algebra&#x2F;Introduction_to_Groups_and_Geometries_(Lyons)&#x2F;01%3A_Preliminaries&#x2F;1.02%3A_Quaternions#:~:text=The%20conjugate%20of%20a%20quaternion,+c2+d2" rel="nofollow">https:&#x2F;&#x2F;math.libretexts.org&#x2F;Bookshelves&#x2F;Abstract_and_Geometr...</a>.
dhosek7 个月前
Another way to think about it is that for a given <i>z</i>, we can write it as (<i>r</i>, <i>θ</i>) where <i>r</i> is |<i>z</i>| and <i>θ</i> is the rotation of that norm in complex space. The complex conjugate <i>z̄</i> is (<i>r</i>, −<i>θ</i>). A product of complex numbers <i>zw</i> is (<i>r</i>, <i>θ</i>)×(<i>s</i>, <i>τ</i>)=(<i>rs</i>, <i>θ</i> + <i>τ</i>) so <i>zz̄</i> = (<i>r</i>², <i>θ</i> − <i>θ</i>) = <i>r</i>² = |<i>z</i>|².
ssfrr7 个月前
zz^* is fine for scalar complex numbers, but z^*z is nice because it also works for vectors. You can think of the complex conjugate as a special case of an adjoint, and the hermetian transpose is another special case.
siktirlanibne7 个月前
zz* !? Why not z*z if you&#x27;re nitpicking already? inb4 WFH killed Commutators.