# Sign function

The sign function or signum function (from Latin signum 'sign' ) is a function in mathematics that assigns its sign to a real or complex number .

## Sign function on the real numbers

### definition

Sign function graph

The real sign function maps the set of real numbers into the set and is usually defined as follows: ${\ displaystyle \ {- 1,0,1 \}}$

${\ displaystyle \ operatorname {sgn} (x): = {\ begin {cases} +1 & \; {\ text {falls}} \ quad x> 0 \\\; \; \, 0 & \; {\ text { if}} \ quad x = 0 \\ - 1 & \; {\ text {falls}} \ quad x <0 \\\ end {cases}}}$

She assigns the positive numbers the value +1, the negative numbers the value −1 and the 0 the value 0.

In computing technology applications, the special position of 0 is sometimes dispensed with; this is then assigned to the positive, negative or both number ranges. This allows the sign of a number to be encoded in a single bit . Since the zero is a zero set below the Lebesgue measure , this is not important for all practical applications.

In the event that is set, there is the following relationship to the Heaviside function : ${\ displaystyle \ operatorname {sgn} (0) = 1}$ ${\ displaystyle \ Theta (x)}$

${\ displaystyle \ operatorname {sgn} (x) = 2 \ Theta (x) -1}$

### Calculation rules

By differentiating between cases it is easy to prove:

• For everyone with amount applies .${\ displaystyle x \ in \ mathbb {R}}$ ${\ displaystyle | x |}$${\ displaystyle x = | x | \ cdot \ operatorname {sgn} (x) \; {\ text {and}} \; x \ cdot \ operatorname {sgn} (x) = | x |}$
${\ displaystyle \ operatorname {sgn} (- x) = - \ operatorname {sgn} (x)}$for everyone .${\ displaystyle x \ in \ mathbb {R}}$
• If is a constant and an odd function , then${\ displaystyle k \ in \ mathbb {R}}$${\ displaystyle f}$
${\ displaystyle f (k \ cdot x) \ quad = f (\ operatorname {sgn} (k) \ cdot | k | \ cdot x) \ quad = \ operatorname {sgn} (k) \ cdot f (| k | \ cdot x)}$
• For the transition to the reciprocal number is compatible with the signum function and does not change its value:${\ displaystyle x \ neq 0}$
${\ displaystyle \ operatorname {sgn} (x ^ {- 1}) = (\ operatorname {sgn} (x)) ^ {- 1} = \ operatorname {sgn} (x)}$for everyone .${\ displaystyle 0 \ neq x \ in \ mathbb {R}}$
• The signum function is compatible with multiplication:
${\ displaystyle \ operatorname {sgn} (x) \ cdot \ operatorname {sgn} (y) = \ operatorname {sgn} (x \ cdot y)}$for everyone .${\ displaystyle x, y \ in \ mathbb {R}}$
${\ displaystyle \ operatorname {sgn} (\ operatorname {sgn} (x)) = \ operatorname {sgn} (x)}$for everyone .${\ displaystyle x \ in \ mathbb {R}}$

From the last two calculation rules mentioned, it follows, for example, that the signum function in an argument composed of any number of factors can be replaced by a factor without changing the function value: ${\ displaystyle x_ {j}}$${\ displaystyle \ operatorname {sgn} (x_ {j})}$

${\ displaystyle \ operatorname {sgn} {\ bigg (} x_ {j} \ cdot \ prod _ {i} x_ {i} {\ bigg)} = \ operatorname {sgn} {\ bigg (} \ operatorname {sgn} (x_ {j}) \ cdot \ prod _ {i} x_ {i} {\ bigg)}}$for any .${\ displaystyle x_ {i}, x_ {j} \ in \ mathbb {R}}$

### Derivative and integral

The sign function is not continuous at the 0 position.

The sign function is not continuous at this point and therefore not classically differentiable there. For all other places the sign function can be differentiated with . The sign function also has no weak derivative . However, it is differentiable in the sense of distributions , and its derivative is , where denotes the delta distribution . ${\ displaystyle x = 0}$${\ displaystyle x \ neq 0}$${\ displaystyle \ operatorname {sgn} ^ {\ prime} (x) = 0}$${\ displaystyle 2 \ delta}$${\ displaystyle \ delta}$

Furthermore applies to everyone ${\ displaystyle x \ in \ mathbb {R}}$

${\ displaystyle | x | = \ int _ {0} ^ {x} \ operatorname {sgn} (t) \, dt \ ,.}$

The sign function is also the weak derivative of the absolute value function .

## Sign function on the complex numbers

### definition

Signum of four complex numbers

Compared to the sign function of real numbers, the following extension to complex numbers is rarely considered:

${\ displaystyle \ operatorname {sgn} (z): = {\ begin {cases} {\ frac {z} {| z |}} & \; {\ text {if}} \ quad z \ neq 0 \\ 0 & \; {\ text {falls}} \ quad z = 0 \\\ end {cases}}}$

The result of this function is on the unit circle and has the same argument as the output value, in particular applies ${\ displaystyle z \ neq 0}$

${\ displaystyle \ operatorname {sgn} \ left (r \ mathrm {e} ^ {\ mathrm {i} \ varphi} \ right) = \ mathrm {e} ^ {\ mathrm {i} \ varphi}, \ qquad \ mathrm {if} \ r> 0.}$

Example: (red in the picture) ${\ displaystyle z_ {1} = 2 + 2 \ mathrm {i}}$

${\ displaystyle \ operatorname {sgn} (z_ {1}) = \ operatorname {sgn} (2 + 2 \ mathrm {i}) = {\ frac {2 + 2 \ mathrm {i}} {\ left | 2+ 2 \ mathrm {i} \ right |}} = {\ frac {2 + 2 \ mathrm {i}} {2 {\ sqrt {2}}}} = {\ frac {1+ \ mathrm {i}} { \ sqrt {2}}} = {\ frac {\ sqrt {2}} {2}} + {\ frac {\ sqrt {2}} {2}} {\ mathrm {i}}.}$

### Calculation rules

The following calculation rules apply to the complex sign function:

For all complex numbers and the following applies: ${\ displaystyle z}$${\ displaystyle w}$

• ${\ displaystyle z = | z | \ cdot \ operatorname {sgn} z}$for all where denotes the amount of ;${\ displaystyle z,}$${\ displaystyle | z |}$${\ displaystyle z}$
• ${\ displaystyle \ operatorname {sgn} ({\ bar {z}}) = {\ overline {\ operatorname {sgn} (z)}}}$where the slash denotes the complex conjugation ;
• ${\ displaystyle \ operatorname {sgn} (z \ cdot w) = \ operatorname {sgn} z \ cdot \ operatorname {sgn} w}$, in particular
• ${\ displaystyle \ operatorname {sgn} (\ lambda \ cdot z) = \ operatorname {sgn} z}$for positive real ones ,${\ displaystyle \ lambda}$
• ${\ displaystyle \ operatorname {sgn} (\ lambda \ cdot z) = - \ operatorname {sgn} z}$for negative reals ,${\ displaystyle \ lambda}$
• ${\ displaystyle \ operatorname {sgn} (-z) = - \ operatorname {sgn} (z)}$;
• ${\ displaystyle \ operatorname {sgn} (| z |) = | \ operatorname {sgn} (z) |}$.
• If is, also applies${\ displaystyle z \ neq 0}$
${\ displaystyle \ operatorname {sgn} (z ^ {- 1}) = \ operatorname {sgn} (z) ^ {- 1} = {\ overline {\ operatorname {sgn} (z)}}}$.

## literature

• Königsberger: Analysis 1 . 6th edition. Springer, Berlin 2003, ISBN 3-540-40371-X , p. 101 .
• Hildebrandt: Analysis 1 . 2nd Edition. Springer, Berlin 2005, ISBN 3-540-25368-8 , pp. 133 .