Why you can’t take the logarithm of a negative number or of 0 ?

In summary: This is why 0 is excluded from the domain of logarithm, in any base. In summary, the concept of logarithm has been defined differently over time by different people. Some defined it with a specific domain, such as (0,∞), while others defined it in a more general sense. This can lead to confusion when trying to take the logarithm of a negative number or 0, as these values do not fall within the specific domain. In complex analysis and calculus, there are ways to define logarithms for these values, but they result in a multivalued function. Additionally, the concept of logarithm is closely related to exponentiation and the behavior of imaginary numbers.
  • #1
mather
146
0
hello

why "you can’t take the logarithm of a negative number or of 0" ?

thanks!
 
Mathematics news on Phys.org
  • #2
If I define a function, I get to tell you what its domain is. There's a function ##\log : (0,\infty)\to \mathbb{R}## that some people defined. By fiat, its domain is ##(0,\infty)##, and so it doesn't make any sense to ask what ##\log(x)## is for ##x\notin(0,\infty)##.
 
  • #3
Now, the question to ask would be why some people defined ##\log## as a function with domain ##(0,\infty)##. To know for sure, we would have to be able to read minds.

One guess is that it's nice for the equation ##\log(x) = \int_1^x \frac1t \text{ d}t## (where the right-hand side is a Riemann integral) to hold for every ##x## in the domain. This would force us to avoid ##x<0##, lest the integral not be well-defined. It would also force us to avoid ##x=0## if we want the function to be real-valued (and in particular not take on the value ##-\infty##).

Of course, you could always define an alternative function with a bigger domain, say ##\mathbb R## or ##[0,\infty)## or ##[-12.3, \infty)##, which agrees with ##\log## on ##(0,\infty)## and takes some values you specify for other inputs. But then you would be defining a new function.
 
  • #4
Another way of looking at it (though, frankly, I prefer the approach economicsnerd is taking) is that ln(x) can be defined as the inverse function to [tex]y= e^x[/tex]. Since that is a positive number to the x power, while x can be any number, y must be positive (less than 1 of x< 0, greater than 1 if x> 0). Reversing, x= log(y), so that, while the value of the function can be any number, the "domain" is all positive numbers.
 
  • #5
mather said:
why "you can’t take the logarithm of a negative number or of 0" ?
Looking at what 'logarithm' of N is, you need to find an x to satisfy this equation: N = 10x

x is known as the logarithm of N (to base 10).

Your task: give N any negative value and see whether you can discover an x that makes the equation true.
 
  • #6
economicsnerd said:
Now, the question to ask would be why some people defined ##\log## as a function with domain ##(0,\infty)##. To know for sure, we would have to be able to read minds.

To know better, we could delve into the history of the subject:

http://en.wikipedia.org/wiki/Logarithm#History
 
  • #7
mather, consider changing the base of the logarithm. Can you have a negative base? Does this logarithm have a solution?$$\log_{-2}{4}$$How about this one?$$\log_{-2}(-8)$$
To answer these you must consider the definition of the logarithm to be $$\log_{b}{c}=a \iff b^a=c$$You can see that we are given ##b## and ##c## and we need to find ##a##. If you take ##b## and ##c## and plug them into the equation ##b^a=c##, you can sometimes recognize the value of ##a##.

Now consider ##b=e=2.718## and ##c=..## say.. ##-2##. Evaluate ##\log_{e}(-2)=\ln(-2)##. In other words, find the value of ##a## so that ##e^a=-2##. In other words, plot the function ##y=e^x## and find where ##y=-2##. What x value does this occur at? Are there any better negative values to try besides -2? What about 0?

This is why for some bases (positive bases in particular) you can't take the logarithm of a negative number or zero. In fact, you can take these types of logarithms if you know how logarithms behave in the complex numbers. But before you can understand that, you need to understand what it means when you have an imaginary number in an exponent. Say.. ##e^{i\theta}## where ##\theta## is a constant.

And yes, it's quite interesting that $$\frac{d}{dx}\ln{x}=\frac{1}{x}$$
 
  • #8
First of all, exponentiation is a tricky thing. Two cases are solid:
  • Any invertible thing (i.e. non-zero number) in an integer power.
  • Positive number in a real or complex power.
But there is no natural and unambiguous definition of, say, negative number in the power ½.

That’s why logarithms of negative numbers are so messy. What can we hope to achieve? If we chose a negative base, such as −2, then we have logarithms of its powers, such as 4, −8, 16, −32… half of those are negative. But for a negative base we fail with all other numbers, that are not integer powers of the base. This is a valid topic for number theory, but useless in calculus.

Another possibility is to find a complex power of a positive base, that results in given negative number. That’s how logarithm is understood in complex analysis and calculus in general, but it is a multivalued function.

In neither case you can obtain log 0. Any power of a non-zero number is not zero, whereas log0 is ill-defined.
 
  • Like
Likes 1 person

Related to Why you can’t take the logarithm of a negative number or of 0 ?

1. Why can't you take the logarithm of a negative number?

The logarithm function is defined as the inverse of the exponential function. In other words, it tells us what power we need to raise a certain base to in order to get a given number. However, when we try to find the logarithm of a negative number, there is no real number that we can raise to a power to get a negative result. Therefore, the logarithm of a negative number is undefined.

2. Can you take the logarithm of 0?

No, the logarithm of 0 is also undefined. This is because the exponent we would need to raise the base to in order to get 0 is infinity, and infinity is not a real number. In other words, there is no real number that we can raise to infinity to get 0, so the logarithm of 0 is undefined.

3. Why does the logarithm of a negative number or 0 result in an error?

When we try to take the logarithm of a negative number or 0, we are essentially asking the computer to perform an impossible mathematical operation. The computer is programmed to only work with real numbers, and since the logarithm of a negative number or 0 is undefined, it cannot provide a meaningful result and instead gives an error.

4. Can the logarithm of a negative number or 0 ever be defined?

No, the logarithm of a negative number or 0 will always be undefined. This is a fundamental property of the logarithm function and cannot be changed. However, in some advanced mathematical contexts, we can define a complex logarithm that can take the logarithm of a negative number. But for most purposes, the logarithm of a negative number or 0 will remain undefined.

5. Are there any real-life applications where taking the logarithm of a negative number or 0 would be useful?

No, because taking the logarithm of a negative number or 0 is undefined, there are no practical applications where it would be useful. In fact, in many scientific and mathematical fields, it is important to avoid taking the logarithm of a negative number or 0, as it can lead to incorrect results or errors in calculations.

Similar threads

Replies
5
Views
1K
  • General Math
Replies
5
Views
3K
Replies
4
Views
2K
Replies
2
Views
873
Replies
1
Views
963
  • General Math
Replies
8
Views
1K
Replies
10
Views
1K
Replies
1
Views
720
  • Topology and Analysis
Replies
14
Views
566
Back
Top