# Doubt about the domain in logarithmic functions. According to my book, the logarithmic function log_(a)x=y is defined if both x and a are positive and x!=0 and a!=1.

Doubt about the domain in logarithmic functions.
According to my book, the logarithmic function
${\mathrm{log}}_{a}x=y$
is defined if both x and a are positive and $x\ne 0$ and $a\ne 1$.
So are these not correct?
${\mathrm{log}}_{-3}9=2$
${\mathrm{log}}_{-2}-8=3$
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

DoryErrofbi
The easy argument is that the two equations are incorrect because they violate the definition. The logarithm function permits a base that is strictly positive and not equal to one, and a domain that is strictly positive.
Another way to see that your two examples can lead us to trouble is that you lose two very important properties of the logarithm. Namely,
${\mathrm{log}}_{a}\left(xy\right)={\mathrm{log}}_{a}\left(x\right)+{\mathrm{log}}_{a}\left(y\right)\phantom{\rule{2em}{0ex}}\text{and}\phantom{\rule{2em}{0ex}}{\mathrm{log}}_{a}\left({x}^{p}\right)=p{\mathrm{log}}_{a}\left(x\right)$
To put this into practice, let's start with the first equation you provided, ${\mathrm{log}}_{-3}\left(9\right)=2$. Supposing for the sake of contradiction that that equation is valid, we should also be able to apply the logarithm property
${\mathrm{log}}_{-3}\left(9\right)={\mathrm{log}}_{-3}\left({3}^{2}\right)=2{\mathrm{log}}_{-3}\left(3\right)$
This means we should find that ${\mathrm{log}}_{-3}\left(3\right)=1$. Yet clearly it is not true that $\left(-3{\right)}^{1}=3$, so ${\mathrm{log}}_{-3}\left(3\right)=1$ is an invalid equation, meaning we have the following contradiction:
$2{\mathrm{log}}_{-3}\left(3\right)\ne 2={\mathrm{log}}_{-3}\left(9\right)=2{\mathrm{log}}_{-3}\left(3\right)$
At this point we can either choose to allow negative values of $a$ (which if we do will almost assuredly mean the logarithm will produce complex numbers), or choose to keep the logarithm property ${\mathrm{log}}_{a}\left({x}^{p}\right)=p{\mathrm{log}}_{a}\left(x\right)$. But we cannot have both. You can derive a similar contradiction with your second equation as well. Ultimately it is much more beneficial to keep $a$ positive and not equal to one than it is to lose those nice logarithm properties. The same can be said for allowing negative arguments in the logarithm. This is all from the perspective that you are working with real numbers, as things must be handled differently with complex numbers.