# What is $\text{log}(-x)$?

I am having some confusion in regards to the log based value of a negative number. I know that this is said to be undefined, though I accidentally entered in '$\log(-x)$' instead of '$\log(x)$' via a graphing application, and it actually graphed a series of $x$-$y$ values, but, once again, I thought this was undefined.

So, like, apparently the value of $\log(-10) = 1$?

I get that you can have negative $y$ values, thus transforming the $y$ values over the $x$ axis, as well as things like $1/\log(x)$, etc., but not $\log(-x)$; I am not really sure what the $-$ sign actually implies (in this context).

By the way, if I enter in $\log(-10)$ in the graphing application of any other mathematical tool, it does indeed say that it is undefined, as expected. I also tested this in other graphing apps, and $\log(-x)$ is for some reason also a legit operation, so it doesn't seem to be some sort of bug in the software.

Thanks to those who answered, it is very much appreciated :)

In addition I'd like to mention that I realised that one could use algebra to figure out why -x works. For instance, log_2(-x) = 3 if x=8, thus -x =8, so x must equal -8, as --8 = +8.

Thus flipping the values over the y axis, from 8, to -8, but keeping the value of the y constant. So all positive values of x must be negative, since the negative of a negative is positive.

• The function $\log(-x)$ is defined on the negative real numbers. So this will flip the graph of $\log(x)$ over the $y$-axis. – MathNewbie Jun 10 '15 at 20:31
• Are you familiar with eulers formula? – grdgfgr Jun 10 '15 at 20:31
• @randomgirl: it also exist when $x>0$ and it gives $x+i\pi$. – idm Jun 10 '15 at 20:34
• @idm or $3i\pi$, or $5i\pi$, or $7i\pi$... – Matt Samuel Jun 10 '15 at 20:36
• @idm: $\ln x+i\pi$, presumably. – Brian Tung Jun 10 '15 at 20:42

When $x$ is a real number, $\log x$ exists only when $x>0$. Thus, if you write $\log(-x)$, you must have $-x>0$ i.e. $x<0$.
• You're welcome. No, log can't work with negative values, unless you consider complex numbers. I suppose you want to remain into the real numbers, so don't misunderstand the minus sign ahead of $x$: when you consider $\log(-x)$ you're not taking negative values. You simply have to set the argument of the function $\xi\mapsto\log\xi$ positive. So if $\xi=-x$ you'll take $-x>0$ i.e. $x<0$. – Joe Jun 10 '15 at 23:12
• More generally: if you have $\log f(x)$, where $f:\Bbb R\to\Bbb R$, you have to find which values of $x$ give $f(x)>0$: they are the all and only points you are allowed to take account in. In your example the function is $f(x)=-x$ which so simple to create confusion! – Joe Jun 10 '15 at 23:15
In the field of real numbers the function $\log$ is defined ( i.e. has real value) only if its argument is positive. So $\log x$ is defined only if $x>0$ and $\log (-x)$ is defined only if $x<0$ and $\log |x|$ is defined only if $x\ne 0$.