# Difference between Sign function and normalizing a vector?

**URL:** <https://community.wolfram.com/t/difference-between-sign-function-and-normalizing-a-vector/23046>\
**Category:** Questions\
**Tags:** equation-solving\
**Created:** [November 3, 2023, 4:10pm UTC](https://community.wolfram.com/t/difference-between-sign-function-and-normalizing-a-vector/23046 "2023-11-03T16:10:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![raphaelthelordofwisdom](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@raphaelthelordofwisdom](https://community.wolfram.com/u/raphaelthelordofwisdom)\
**Post date:** [November 3, 2023, 4:10pm UTC](https://community.wolfram.com/t/difference-between-sign-function-and-normalizing-a-vector/23046/1 "2023-11-03T16:10:23Z")

</div>

First time posting, I don’t know how to input math on the forum, so I’m just using a notebook for the entire post.

[Open in Wolfram Cloud ↗](https://www.wolframcloud.com/obj/aa6ab18f-2a71-47b7-9e7b-3295fb4bcb15)

---

<div class="post-metadata">

**Author:** ![eric3](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/eric3/32/12760_2.png) [@eric3](https://community.wolfram.com/u/eric3)\
**Post date:** [November 3, 2023, 5:34pm UTC](https://community.wolfram.com/t/difference-between-sign-function-and-normalizing-a-vector/23046/2 "2023-11-03T17:34:22Z")

</div>

I didn’t dig in completely, but I’m pretty sure that your problem here is conflating a sort of logical interpretation with a computational interpretation. For example just take your very last example:

```
{Normalize[ReIm[0]], Normalize[ReIm[z]] /. z -> 0}

```

Let’s walk through piece by piece:

```
ReIm[0]
(* {0, 0} *)

Normalize[ReIm[0]]
(* {0, 0} *)

```

Presumably that was all expected. Now…

```
ReIm[z]
(* {Re[z], Im[z]} *)

Normalize[ReIm[z]]
(* {Re[z]/Sqrt[Abs[Im[z]]^2 + Abs[Re[z]]^2], Im[z]/Sqrt[Abs[Im[z]]^2 + Abs[Re[z]]^2]} *)

Normalize[ReIm[z]] /. z -> 0
(* {Indeterminate, Indeterminate} *)

```

In other words, these two expressions may seem logically equivalent, but the evaluation engine has to follow its rules of computation, and in this case that leads to different results.

So now consider

```
FindInstance[ReIm[Sign[z]] != Normalize[ReIm[z]], z \[Element] Complexes, 3]

```

That’s really

```
FindInstance[{Re[Sign[z]], Im[Sign[z]]} != {Re[z]/Sqrt[Abs[Im[z]]^2 + Abs[Re[z]]^2], Im[z]/Sqrt[Abs[Im[z]]^2 + Abs[Re[z]]^2]}, z \[Element] Complexes, 3]

```

And those are indeed different when z is 0.
