Is there a difference between the minus sign in a negative number and the unary minus operator which is essentially a function over a particular set mapping a number to it's negative? For example $-7$ is a number and is the negative sign indicate the unary minus function -(7) or just part of the numeral? The confusion is due to the fact that $-x$ seems to indicate the unary minus function but also looks as if it is written in the same way as $-7$
-
5$\begingroup$ Luckily it (usually) doesn't matter. The number $-7$ is also the negative of $7$, i.e. the result of applying the "unary minus" to $7$. If it matters in your context, then you need to let us know more about what that context is. It could be "I've had a bet with a friend, he/she says this minus is part of a numeral but I think it is the unary operation, who is right?" or it could be "I've been asked to parse an arithmetic expression in Python, so I don't know if I should parse $-7$ as a numeric literal" ... or something else... $\endgroup$– user700480Commented Sep 6, 2022 at 10:29
-
3$\begingroup$ the minus sign $-$ alone is a function, and applied to a number represent it negative, that is, $-x$ represent the negative of $x$. The difference is that $-$ is a function, however $-x$ is a number. In short: it is the same difference between $f$ and $f(x)$ $\endgroup$– user173262Commented Sep 6, 2022 at 10:44
-
$\begingroup$ @StinkingBishop I want to understand the explicit meaning of the expression $-(-7)$, does it mean $-(-7)$ where $-7$ is the most simple way of writing $-7$ or does it mean $-^2(7)$, $\endgroup$– user37577Commented Sep 6, 2022 at 10:55
-
2$\begingroup$ @user37577 $-(-7)$ is the real number that one obtains after we apply two times the function $-$ to the number $7$. This is what the expression $-(-7)$ means $\endgroup$– user173262Commented Sep 6, 2022 at 11:04
-
1$\begingroup$ I would prefer to stay on the fence on the issue whether $-7$ is a numeric literal in its own right or whether it is the result of the operation $-$ on the number $7$. However, $-(-7)$ is definitely the result of applying the operation $-$ on whatever $-7$ is. $\endgroup$– user700480Commented Sep 6, 2022 at 11:31
1 Answer
The unary minus symbol $-$ denotes the function from $\mathbb R$ to $\mathbb R$ such that $-x$ equals the unique number $y$ satisfying $x+y=0$.
The symbol $-7$, by definition, means the result of applying the function $-$ to the real number $7$. And $-7$ is of course also a real number. This is in the same way that $\sin(5)$ is a real number that means the result of applying the function $\sin$ to the number $5$.
Even though $-$ is a function just like $\sin$ is, in practice we use different notational conventions for these functions. It would be strange to write something like $-^2(7)$.
-
$\begingroup$ So the actual definition of a negative number's numeral we are taught in school, comes from the function $-$? $\endgroup$ Commented Sep 6, 2022 at 11:10
-
$\begingroup$ @user37577: Yes, that is absolutely correct. And it might be worth noting that in any context where you encounter the symbol $-$, be that the real numbers, rational numbers, or something more exotic, the meaning of $-x$ is the same: it's the unique "thing" with the property that $x+(-x)=0$. $\endgroup$– JoeCommented Sep 6, 2022 at 11:21
-
8$\begingroup$ Rather than $-^2$, the $-$ function composed with itself can be written by crossing a $-$ over another $-$, i.e. $+$ :) $\endgroup$ Commented Sep 6, 2022 at 19:40