# is log 0 is or is not undefined?

per Figure 1.7 in pattern recognition and machine learning (free)

Plots of M = 9 polynomials fitted to the data set shown in Figure 1.2 using the regularized error function (1.4) for two values of the regularization parameter λ corresponding to ln λ = −18 and ln λ = 0. The case of no regularizer, i.e., λ = 0, corresponding to ln $$λ = −∞$$

ln $$0 = −∞$$

per this post

log 0 is undefined.

so, is log 0 is or is not undefined?

• There is no real number that is $\log0$. Nov 21, 2019 at 4:59
• In truth, it is $\lim_{x→0} \log x = -∞$. But $\log 0$ is meaningless. Nov 21, 2019 at 5:10
• This just depends on how the author decides to define the $\log$ function. Most authors leave $\log(0)$ undefined. You could define $\log(0)$ to be $-\infty$, but it's unclear that this is helpful. Nov 21, 2019 at 5:31
• May be relevant: mathoverflow.net/q/432396/10059 Nov 18, 2022 at 18:24
• @AweKumarJha your first equality is wrong. Dec 28, 2023 at 18:20

Both are right. How that possible?

Any function takes values from one set and returns values from another set.

If both sets are subsets of the real number set, the function must take a real number as an argument and return a real number. Standard definition of $$f(x) = \ln(x)$$ does not allow $$x$$ to be zero and we say $$\ln(0)$$ is not defined.

On the other hand, we can consider a set of real numbers with additional two elements: $$-\infty$$ and $$+\infty$$

Then we can define our functions for subsets of the "extended" real set. For example we can use limits and the definition will be absolutely legal.

We can even extend some other definitions such as continuity, so we can extend and prove some theorems for the extended real set functions. This is important. In mathematics there are no right or wrong definitions, you can define something like $$ln(1) = 50$$ but when we define functions especially standard functions we usually expect them to be "good" in many terms. They are continuous, they are analytic (infinitely differentiable / could be written as taylor series) and have lots of other properties we can use. We expect that from all standard functions including logarithm, power, exponent, trigonometric functions, their finite combinations, etc.

If we were in any other field rather than math, we'd speak about "intuitive" or "natural" definition for such functions. In math we can do it only if we define what is "natural" or what is "intuitive".

In case of $$f(x) = \ln(x)$$ we can see that for any large $$M > 0$$ there is an $$\epsilon > 0$$ such that for all positive $$x < \epsilon$$ we have $$\ln(x) < -M$$ (this is very similar to limit definition). And because that happens we can define "extended function" value: $$\ln(0) = -\infty$$

The limit based definition is also "natural or intuitive" and by that we keep some function properties and extend them to the real set extended with negative and positive infinity.

The logarithmic function $$~\log_b(x)~$$ (for any positive real number $$b\ne 1$$) is defined only for $$~x>0~$$.

If possible let $$~\log_b(0)=k~$$, where $$~k~$$ is any real number. Then by the definition of logarithm, $$~b^k=0~$$.

Now, any ‘real’ quantity (may it be positive or negative) raised to another real quantity can never result in $$~0~$$.

You may think about the case of $$(\text{any number})^{0}$$ or more specifically, $$0^0$$. But the interesting fact is that any number raised to the power $$0$$ results in $$1$$ and not $$0$$.

So, the value of the expression $$~\log_b(0)~$$ makes no sense and more specifically, we cannot determine any value for it or we cannot define it.

Thus $$~\log_b(0)~$$ is Indeterminate or Undefined or Does not exist.

For various values of the base $$~b~$$ $$($$let us consider $$~b=10,~b=e,~b=2$$ $$)$$, at $$~x=0$$, we have vertical asymptotes (see in the figure given below).