8
$\begingroup$

I am reading "space filling curve" by Hans Sagan. On page 17, on equation (2.3.11) in the equation, a function sgn is used.

What is sgn?

To put it into context, in the book it says $h_n=$sgn$(n)[(n-1)+i]$

$\endgroup$
  • $\begingroup$ It is a slightly abbreviated form of "sign" as in positive or negative. en.wikipedia.org/wiki/Sign_function $\endgroup$ – Carser Jun 8 '16 at 17:23
  • 6
    $\begingroup$ The reason for abbreviation is a little clearer when calling it the signum function. $\endgroup$ – Jacob Bond Jun 8 '16 at 18:40
32
$\begingroup$

Typically, $\operatorname{sgn}$ stands for the sign function $$\operatorname{sgn}(x) = \begin{cases} 1 & x > 0 \\ 0 & x = 0 \\ -1 & x < 0 \end{cases}.$$

$\endgroup$
  • 5
    $\begingroup$ NB the definitions of $\mathop{\rm sgn}(0)$ vary between $0$ and $1$. If $0$ is a plausible argument, you should assure yourself of the definition of $\mathop{\rm sgn}$ at $0$ in your context. $\endgroup$ – AlexR Jun 8 '16 at 19:54
  • 7
    $\begingroup$ @AlexR Actually, they vary between three options: (a) $\operatorname{sgn}0=0$; (b) $\operatorname{sgn}0=1$; (c) $\operatorname{sgn}0$ is undefined, i.e., $\operatorname{Dom}\operatorname{sgn} = \mathbb{R}\setminus\{0\}$. I'm in favor of (a) and I consder (b) a deadly sin. $\endgroup$ – yo' Jun 8 '16 at 21:43
  • 2
    $\begingroup$ When $\text{sgn}(x)$ is used for applications (e.g., robust statistics), it is most commonly asserted that $\text{sgn}(0) = 0$ (as far as I know). $\endgroup$ – Brian Tung Jun 8 '16 at 22:10
  • $\begingroup$ @yo, I guess it depends on whether or not the relationship between the sign function and the unit step function needs to be maintained, among other things. $\endgroup$ – J. M. is a poor mathematician Jun 9 '16 at 1:12
  • $\begingroup$ @J.M. There is of course also a simple relationship with the unit step function $H(x)$ ($H$ stands for Heaviside) to the symmetric $\operatorname{sgn}$ function: $\operatorname{sgn}x=H(x)-H(-x)$. The relation you are alluding to with the asymmetric sign function is $\operatorname{sgn}^+x=2H(x)-1$. $\endgroup$ – Mario Carneiro Jun 9 '16 at 5:10
1
$\begingroup$

I will expand on Dominik's answer.

$ \operatorname{sgn} $, standing for "sign", is usually defined as,

$$\operatorname{sgn}(x) = \begin{cases} 1 & x > 0 \\ 0 & x = 0 \\ -1 & x < 0 \end{cases}.$$

but not always. Some use

$$\operatorname{sgn}(x) = \begin{cases} 1 & x > 0 \\ 0 & x < 0 \end{cases}.$$

(that is, $ \operatorname{sgn}(0) $ is undefined).

In rare cases, one might define $ \operatorname{sgn}(0) $ as one or zero, for convinience. It really depends on the situation and usecase.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.