Can we take the negative numbers as base in taking log?
For example:$$\log_{(-2)}4=2$$ $$\log_{(-3)}81=4$$ etc.
Can we take the negative numbers as base in taking log?
For example:$$\log_{(-2)}4=2$$ $$\log_{(-3)}81=4$$ etc.
In the context of complex numbers, yes:
$\log_b(z)$ is a complex number $w$ such that $b^w = z$. Since by definition $b^w = \exp(w \log(b))$, (where $\log$ is any branch of the natural logarithm), $$\log_b(z) = \frac{\log(z) + 2 \pi i n}{\log(b) + 2 \pi i m}$$ for integers $m$ and $n$.
I understand the reasoning behind the OP's question: the expression $\log_b(a)=c$ is equivalent to the exponential expression $b^c=a$. Since (for example) $(-3)^4=81$, it seems reasonable to say that $\log_{-3}(81)=4$.
What this reasoning overlooks is that we want logarithms to also be defined for powers of the base that are not integer powers. For example, $\log_2(10)$ is defined even though there is no integer power of $2$ that equals $10$.
This is where negative bases fail us: In general, it is hard to make sense of an expression like $(-2)^r$ if $r$ is not an integer. Notice that even for a "friendly" fraction like $r=\frac{1}{2}$ this expression has no real-valued interpretation. How much harder would it be to assign a meaning to it if $r$ were an irrational number?
Since exponents with negative bases can't be well-defined in real numbers, logarithms with negative bases can't be either.
Usually, in a pre-calculus or calculus class (don't ask me about Complex Analysis, I don't know anything there), the following definition is used: $$\log_b(x) = \dfrac{\ln(x)}{\ln(b)}$$ Particularly, since $\ln(b)$ is not defined for negative $b$ values, $\log_{(-2)}4$ would be undefined. As mentioned in the comments, we need not use $\ln$ here - we can use a logarithm of any base - but regardless, logarithms of any base are not defined for an input negative value.
If you defined $\log_b(x) = y$ using the usual $b^{y} = x$ relationship, you would think that this would make sense since $(-2)^{2} = 4$, but by convention, the base is taken to be a positive value. Note:
The logarithm of a positive real number $x$ with respect to base $b$, a positive real number not equal to $1$