# Why in function $f(x) = a^x$, a must be greater than zero?

Suppose a function $$f(x) = a^x$$ In this case $$a$$ must be greater than zero. If we take a number less than zero like $$-0.5$$ and suppose the value of $$x$$ as $$2$$ the function should have value of $$0.25$$ and thus this function should work and show a curve in graph. But I have tried in several graphing calculators and that have showed no results. So my question is why $$a$$ is greater than zero and can't be equal to one

• Look what happens when $a=-2$ and $x=1/2$. – Gerry Myerson Nov 8 '18 at 5:17
• When a $a = -2$, $x = 1/2$ the values should be $4$ and $1/4$ – Md Ashraful Islam Nov 8 '18 at 5:18
• a square root of negative number will involve complex number. If the domain and range are expanded to complex number, it indeed makes sense. – Lance Nov 8 '18 at 5:21
• How, Md, do you get $(-2)^{1/2}=4$? – Gerry Myerson Nov 8 '18 at 5:21
• I am unable to understand. And there was no square root, there was square – Md Ashraful Islam Nov 8 '18 at 5:22

Certainly there is one problem with this approach. The function is only defined for some values of $$x$$, for example when $$x$$ is an integer. In some nice cases, decimals can work as well, but it is not defined on the entire real line, which is why most calculators will likely complain. For example, there is no way, at least in the real line, to make sense of the expression $$(-.5)^{\pi}$$. Thus the graph will not be a curve, but a discrete collection of points. You can see this by plotting your function on desmos.com. You will have to create a table as well to see the points, but you'll see that this function is undefined for the majority of points, so likely most calculators will give up trying to plot it.