Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to express the sign of $a$ multiplied by $b$ in a formula but do not know how to mathematically express the sign of $a$?

I am not sure but using the plus-minus sign isn't correct, is it?

In latex style I would write:

$\pm a \times b$

share|cite|improve this question
Sign function – Henning Makholm Dec 16 '12 at 14:53
up vote 1 down vote accepted

Supposing $a,b\neq 0$, the sign of $ab$ is $$\text{sgn}(ab)=\frac{\left|ab\right|}{ab}$$ The sign of $a$ is $$\text{sgn}(a)=\frac{\left|a\right|}{a}$$ and so the [sign of $a$] times $b$ is nothing but $$\frac{\left|a\right|}{a}b$$

share|cite|improve this answer
What about $a= 0$? Is there convention for $\mathrm{sgn}(0)$? – user50554 Dec 16 '12 at 14:56
We define $\text{sgn}(0)=0$ – Nameless Dec 16 '12 at 14:57
So $\mathrm{sgn}(a) :=\left\{\begin{array}{cc} \frac{|a|}{a} & \text{if } a \neq 0 \\ 0 & \text{if } a = 0\end{array}\right. $ – user50554 Dec 16 '12 at 14:59
@user50554 Yes it is – Nameless Dec 16 '12 at 14:59
Many thanks for this! Would sgn(a) = a / |a| also be correct or is it really defined as |a| / a ? – Johnny Dec 16 '12 at 15:16

The correct way to formalize the sign of $a$ multiplied by $b$ is $$ \mathrm{sgn} (a) \cdot b.$$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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