How do you graph a negative number raised to $x$?

We normally can only graph functions that are continuous, or at least close to it (perhaps with a handful of points where they are not continuous). You will study this property in calculus. In brief, it means that if you vary $x$ only a little, then you will vary the value $f(x)$ only a little.

The function $(-2)^x$ is not continuous, unlike the function $2^x$.


This question is indeed tricky.

starting with the natural and integer numbers is quite easy, there you get your pattern with dots on $\{-1,1\}$.

continuing to the rationals we realize we have a problem, as $\sqrt {-1}=(-1)^{\frac12}$ is not part of the reals. However some of them are, e.g. $(-1)^3 = -1$. So you get some additional points (in fact many) wher your funciton is defined.

On all the irrational number your function is not defined, as we have the definition $a^b = e^{b\cdot \log(a)}$. Where $\log(-1)$ is not defined.


As others mention, this graph will have many points where it will not be defined. In any finite interval like $(0,1)$ there would be infinitely many points where this function is discontinuous.

Consider $f(x) = (-1)^{x}$ and $x = \frac{p}{q},$ where $p,q$ are mutually prime integers. Now if $q$ is even, $f(x)$ will not be real.