

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer

Both the negative sign symbol and subtraction's minus symbol look the same, so how does anyone tell them apart?

share|cite|improve this question

The same way we distinguish different meanings of ‘$\cdot$’, for instance (e.g., $x\cdot y$, meaning ordinary multiplication of real numbers $a$ and $b$; $\vec a\cdot\vec y$, meaning the dot product of vectors $\vec x$ and $\vec y$; $\|\cdot\|$, in which the dot is a place-holder): by context. It’s no different from dealing with the problem in English of distinguishing various quite different meanings of strike, including ‘a labor action’ and the baseball player’s strike that occurs when he swings and does not manage to strike the ball.

Everyday language is full of words with multiple meanings, sometimes even contradictory meanings (cleave ‘to cut something’ and cleave ‘to adhere’). Mathematical language may perhaps suffer a bit less from such overloading, but it’s far from immune: just look at the overloading of the words regular and normal. The same goes for mathematical notation; the use of a single symbol for unary and binary minus is just one of the most familiar examples. And in all of these settings the answer to your question is that we rely on the context to disambiguate the word or symbol. This generally works quite well, especially in mathematics; occasionally it fails.

In the specific case under discussion, the most relevant contextual clue is simply the number of operands associated with the $-$: if there are two, as in $a-b$, it’s the binary operator of subtraction; if there is just one, as is clear from the parenthesis in $a(-b)$, it’s the unary operator of taking the additive inverse.

share|cite|improve this answer
Yes, and we distinguish the meanings of "-" by context, too. – FrenzY DT. Oct 20 '12 at 9:52

Excerpt from Wikipedia: +/-#-.

The minus sign has three main uses in mathematics:

  1. The subtraction operator: A binary operator to indicate the operation of subtraction, as in $5 − 3 = 2$. Subtraction is the inverse of addition.
  2. Directly in front of a number and when it is not a subtraction operator it means a negative number. For instance $−5$ is negative $5$.
  3. A unary operator that acts as an instruction to replace the operand by its opposite. For example, if $x$ is $3$, then $−x$ is $−3$, but if $x$ is $−3$, then $−x$ is $3$. Similarly, $−(−2)$ is equal to $2$.


  1. If you have numbers or variables on both sides of symbol $-$ then it means substraction.
  2. If you have no number or variables before the symbol $-$ then it means negation. Beware: parenthesis aren't variables.
share|cite|improve this answer
Also note that $\LaTeX$ manages to distinguish the two from mere syntax analysis and use different spacing between the minus and the two in $5-2$ and $5+(-2)$. Thus it shouldn't be hard for a human. – Hagen von Eitzen Oct 20 '12 at 9:45
@HagenvonEitzen: But (La)$\TeX$'s spacing rules in this matter are not infallible: $-1$, $--1$, $---1$, $3--1$, $3---1$, $-3/-7$ which should be $-1$, $-{-1}$, $-{-{-1}}$, $3--1$, $3--{-1}$, $-3/{-7}$ – Marc van Leeuwen Oct 20 '12 at 11:40

I beg to differ with the wikipedia description, which seems to be written for the feeble of mind, but does not describe the use of the sign "$-$" in mathematics, or in computer programming, correctly. Notably there is no need at all to distinguish the use of a "negative indicator" (case 2., as in $-5$) from the use as a (unary) "negation operator" (case 3. ,as in $-x$, or I suppose for instance in $-\pi$ or in $-i$ when $i$ designates the imaginary unit). One can of course decree that case 2. applies if and only if the sign "$-$" has no left operand and a right operand that is an explicit numeric constant (a sequence of digits, possible fractional part starting with decimal point); one then needs to remove that case from case 3. to avoid ambiguity. But the point is that case 3. perfectly well covers cases like $-5$ or $-5.272023$: the value denoted is the opposite of that of the (right) operand of the minus sign. Saying that case 2. is a "negative sign" has no added value; it just happens that explicit numeric constants as described above always designate non-negative numbers, so that particular case always describes a non-positive real number. Making the distinction just raises useless questions like whether there is a negative indicator in $-\frac15$, and in $-1/5$? Or in $-0.00$, which is no more negative than $0$ is positive. Therefore I would say

  • There is no such thing as a negative sign in mathematics. To expresss the fact that the value of an expression $E$ is negative, one writes $E<0$, and this does not involve the sign "$-$" at all.

  • The basic meaning of "$-$" is as a binary operator, where $x-y$ describes the unique value $z$ such that $z+y=x$.

  • When used without a left operand (so as a unary operator) the value $0$ is implicitly taken as left operand. So $-x$ means $0-x$. And $-5$ means $0-5$, the unique value $z$ such that $z+5=0$, which might seem roundabout, but is correct.

The fact that $-5$ is not an explicit constant expression like $24$, but the resultof applying a unary operator to "$5$", and that the value denoted by "$-5$" does not have any direct numeric representation should not be shocking; neither do $\pi$ or $\frac17$ (because decimals have to stop somewhere) or $3+4i$ have any numeric constant designating them, without using operators. As far as programming goes, I hardly know any language whose syntax for numeric constants allows for $-5$; most if not all would take that to be the unary minus applied to the constant $5$. (However if scientific notation with exponent-of-$10$ is included, the possible minus sign for the exponent will be part of the constant syntax, as an operator makes no sense in that position.)

So the only relevant question is whether "$-$" is used in a specific case as unary or binary operator, which is determined merely by the absence or presence of an applicable left operand; which is the case is quite clear in practice.

I might add that it makes sense in the points above to reverse the order in discussing unary and binary use, making $-x$ the more basic case (the unique value $z$ with $z+x=0$), and considering $x-y$ and abbreviation for $x+-y$; in the end for the meaning of each operator it makes no difference which approach is used.

share|cite|improve this answer
Yes. And, No. 2 in the Wikipedia list really makes me feel sick. – FrenzY DT. Oct 20 '12 at 10:42
@FrenzYDT. If No. 2 really sickens you, be sure to read down to the last sentence in that section where you will find "However in some programming languages and Excel in particular, unary operators bind strongest, so in these $−5^2$ is $25$ but $0−5^2$ is $−25$." I first encountered this while trying to calculate $\exp(-x^2/2)$ using Microsoft Excel. – Dilip Sarwate Oct 20 '12 at 13:09
@DilipSarwate Hmm... what I wanted to mean is that "2.Directly in front of a number and when it is not a subtraction operator it means a negative number." is inaccurate and is covered in item 3. You are right. In programming solvers like LINGO, one can switch the priority of unary minus to high/low in the settings. – FrenzY DT. Oct 20 '12 at 13:16
@DilipSarwate Operator precedence is really a separate issue (if unary $-$ is stronger than squaring then it affects $-x^2$ as well as $-5^2$, and if binary $-$ is weaker then this affects $a-x^2$ as well as $3-5^2$), but it may be noted that if $-5$ is taken as denoting a single constant just like $2.07$ does, then one has no choice but to make it unbreakable in $-5^2$ so that it has to be $+25$ (after all $2.07^2$ must mean squaring all of $2.07$ as well). Yet one very often finds things like $(-1)^n$, the parentheses proving that mathematicians do not consider "$-1$" unbreakable. – Marc van Leeuwen Oct 20 '12 at 14:13
After parsing the double negative (pun intended) in the last sentence of your comment above, I agree that mathematicians consider $-1$ to be eminently breakable and assign different values to $-1^{2n}$ and $(-1)^{2n}$. But what of your assertion in your answer that "it makes sense in the points above to reverse the order between unary and binary use, making $−x$ the more basic case"? If this is adopted, then $-1^{2n} = (-1)^{2n}$ must hold. Would mathematicians be willing to adopt your suggestion that $-x$ be the more basic case here too? – Dilip Sarwate Oct 20 '12 at 15:46

The sign "-" as a unary operator is derived from the fundamental definitions. This is usually done in the framework of abelian groups where the basic operation is "+". By definition there is an identity (additive) denoted by say $0$: $a+0=a$. Also each element has an additive inverse say $a'$: $a+a'=0$. This invese is unique. So we write $-a$ instead of $a'$. $b-a$ is by definition $b+(-a)$. And we can extend to any number of elements and operations.


share|cite|improve this answer

Your Answer


