Skip to content
LoveToCalc

Definition — what does that mean?

Sign function

The sign of a number with its size taken away: 1, −1 or 0.

In Swedish: Teckenfunktionen

Sign function

The relation

sgn x=1,x>0−1,x<00,otherwise

sgn x is 1 when x is positive, −1 when x is negative, and 0 when x is 0: the sign of a number with its size taken away.

sgn x=−1

sgn x equals 1 if −2 is greater than 0, −1 if −2 is less than 0, 0 otherwise, −2 is less than 0, so the second row, equals −1

Working2 steps

Practice questions

You are given

  • x=7

What the definition says

sgn x = 1 if x > 0, −1 if x < 0, and 0 otherwise

Three rows. The first two take every positive and every negative number, so the last row, “otherwise”, is read for x = 0 alone. Many books write that row as “0 if x = 0”, which is the same function. The name signum is also used, from the Latin for sign.

Worked examples

x = 7.5. 7.5 > 0, so the first row: sgn 7.5 = 1.

x = −0.2. −0.2 < 0, so the second row: sgn(−0.2) = −1. The size of x does not matter, only the side of zero it lies on.

x = 0. Neither 0 > 0 nor 0 < 0 holds, so the last row: sgn 0 = 0.

With the absolute value

For every real x, x = sgn x · |x|: the sign times the size gives the number back. For x ≠ 0 it follows that sgn x = x/|x|, which is how the graph on this page is drawn. At x = 0 that quotient has no value, and the definition gives 0 there.

The graph

Two horizontal half-lines, at −1 to the left of zero and at 1 to the right, and the single point (0, 0) between them. The function is defined at 0 and jumps there, so it is not continuous at 0.

Common mistakes

The absolute value is defined by cases in the same way: see the definition of |x|.

Looking for another letter? The formula solved for each one
Solved for each letter
Solve forRearrangedWith the numbersComes to
sgn x1,x>0−1,x<00,otherwise1,−2>0−1,−2<00,otherwise−1

Last reviewed October 12, 2026 ·How pages are reviewed

Functions and graphsAll formulas

Put this formula on your site

Copy the code into your page where the formula card should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.