I am trying to understand the function $y=x^x$:
1) Why is $0^0$ not defined? Why isn't it defined as $0^0=1$? The limit of the function for $x\to0$ also goes to $1$
2) Why is it only defined for $x>0$ and not for $x\le0$? For example $(-2)^{(-2)}=\frac{1}{4}$ which is defined.
$0^0$ is not defined since the limits of $x^0$ and $0^x$ differ as $x\to 0^+$. Just as with $\frac00$, $0^0$ is not the limit of $x^x$, it is the limit of $x^y$ as $(x,y)\to (0,0)$.
And yes, $x^x$ is defined on the negative integers, but not on any other negative numbers.