0
$\begingroup$

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$

  • 0
    [Sign function](http://en.wikipedia.org/wiki/Sign_function)2012-12-16

2 Answers 2

2

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$$

  • 0
    What about $a= 0$? Is there convention for $\mathrm{sgn}(0)$?2012-12-16
  • 0
    We define $\text{sgn}(0)=0$2012-12-16
  • 0
    So $\mathrm{sgn}(a) :=\left\{\begin{array}{cc} \frac{|a|}{a} & \text{if } a \neq 0 \\ 0 & \text{if } a = 0\end{array}\right. $2012-12-16
  • 0
    @user50554 Yes it is2012-12-16
  • 0
    Many thanks for this! Would sgn(a) = a / |a| also be correct or is it really defined as |a| / a ?2012-12-16
  • 0
    @Johnny Both are correct since $\frac{a}{\left|a\right|}=\frac{\left|a\right|}{a}$2012-12-16
  • 0
    ok that's great! thanks for your comments :)2012-12-16
0

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