So I was looking at the
Sign
function for some reason, and noticed that it said it is equal to
z
|z|
for complex numbers, so I thought “isn’t that just the same as normalizing a vector?”, and wanted to test my theory . So I did
In[]:=
Reduce[
∀
z,z∈
ReIm[Sign[z]]==Normalize[ReIm[z]]]
Out[]=
False
Hmm, that’s odd, wonder what is going on here, so I went on to find what the difference was
​
In[]:=
FindInstance[ReIm[Sign[z]]!=Normalize[ReIm[z]],z∈,3]
Out[]=
{{z0}}
So it’s just when
z==0
? Why would that be different?
In[]:=
{ReIm[Sign[0+0]],​​Normalize[ReIm[0+0]]}
Out[]=
{{0,0},{0,0}}
So this confused me quite a bit, after playing around for a bit, I found the following
In[]:=
{ReIm[0],ReIm[z]/.z->0}​​{Normalize[{0,0}],Normalize[z]/.z->{0,0}}​​{Normalize[ReIm[0]],Normalize[ReIm[z]]/.z->0}
Out[]=
{{0,0},{0,0}}
Out[]=
{{0,0},{0,0}}
Power
:Infinite expression
1
0
encountered.
Infinity
:Indeterminate expression 0ComplexInfinity encountered.
Power
:Infinite expression
1
0
encountered.
Infinity
:Indeterminate expression 0ComplexInfinity encountered.
Out[]=
{{0,0},{Indeterminate,Indeterminate}}
So for some reason, ReIm and Normalize works... most of the time, unless they are chained together, and only when inputted with a  and not when passed in as a parameter.
​
Does anyone know why this is?