TITLE: The domain of $x^x$?
QUESTION [9 upvotes]: This one looks simple, but apparently there is something more to it. 
$$f{(x)=x^x}$$
I read somewhere that the domain is $\Bbb R_+$, a friend said that $x\lt-1, x\gt0$... 
I'm really confused, because i don't understand why the domain isn't just all the real numbers.
According to any grapher online the domain is $\Bbb R_+$.
Any Thoughts on the matter?
Can someone explain what am I missing?

REPLY [6 votes]: Split it into cases:

When $x=p/q$ where $p\in \mathbb Z,q\in\mathbb N_{>1},p\ne0,\gcd(p,q)=1$, then:
$$x^x=\left(\frac{p}{q}\right)^\frac{p}{q}=\sqrt[q]{\left(\frac{p}{q}\right)^p}$$


when $p<0$ then 
 $$x^x=\sqrt[q]{\left(-\frac{q}{|p|}\right)^{|p|}}$$
if $p$ is even, then $\left(-\frac{q}{|p|}\right)^{|p|}$ is positive, otherwise it's negative and the root doesn't exist for even $q$.
when $p>0$ then 
 $$x^x=\sqrt[q]{\left(\frac{|p|}{q}\right)^{|p|}}$$
and $\left(\frac{|p|}{q}\right)^{|p|}$ is always positive.

When $x\in\mathbb Z$ the value $x^x$ always exist except $x=0$.
When $x$ is irrational then the only way to define $x^x$ is $$x^x=\exp(x\ln x)$$ and for real numbers we have $x>0$.

Summarizing, $x^x$ exist for all

$x\in\mathbb R_+$
$x\in\mathbb Z_-$
$x\in\left\{ -\frac{p}{q}\in \mathbb Q\colon p,q\in\mathbb N_+ \land \gcd(p,q)=1\land q\text{ is odd}\right\}$

Why we don't see the negative part of the plot

Technical reason: $x^x$ in programs is usually defined as exp(x*log(x)) and the function log(x) is not defined for negative x.
Mathematical reason: set of negative $x$ which $x^x$ exists for is countable. Countable many points is not enough to form a curve.

This function may be plotted with points for negative $x$.