This random thought just struck me: how can one calculate $(-1)^{\sqrt{2}}$?
Different tools gives different results: according to google, the result is undefined (as it does not support complex numbers); python gives me a complex number (-0.2662553420414156-0.9639025328498773j) with (-1) ** math.sqrt(2). Why is it a complex number though?
I understand why it is a complex number when it is raised to the power of e, thanks to this question here. However, I do not understand why it is complex when raised to the power of $\sqrt{2}$.
Ps: I am only a curious tenth-grade student, and it is highly possible that I might forget something fundamental; thanks for responses in advance.
Assuming you are talking about only real numbers (not complex) then it is not possible to define $(neg)^x$ for all real number $x$ in any reasonable way.
We define $b^k; k \in \mathbb N$ in the usual way via $b^k = b*b*....*b; k$ times. We note that $b^kb^j = b^{k+j}$ and we extend our definition to note that means $b^0 = 1$ and $b^{-k} = \frac 1{b^k}$ and so can define it for $k \in \mathbb Z$.
We extend that definition to the rationals as $b^{m/n} = \sqrt[n]{b^m}$ based on the idea that $(b^k)^j = b^{kj}$ so $(b^{m/n})^n= b^m$[~].
We extend that to the irrational reals by... well, by waving our hands at high-school students and saying "don't worry about it". In actuality what we do is this:
As for every irrational $x$ we ... "can get as close as we like" to $x$ by approximating with rational numbers $q_i$.[$*$] So $b^x$ is an approximation of $b^{q_i}$ when $x$ is an approximation of $q_i$[$**$].
We have immediate problems if we take $b$ to be negative. If $x$ is approximated by $q_i$ some of the $q_i$ will have even numerators and some will have odd numerators and these $q_i$ will be infinitely close together. If $q_i$ has any even numerator than $b^{q_i}$ will be positive. If $q_i$ has an odd numerator $b^{q_i}$ will be negative. So there is no $y = b^x$ that can be approximated by $b^{q_i}$.
It can't be done.
Also if $q_i$ has an odd numerator and an even denominator, then $b^{q_i} = b^{m/n} = \sqrt[n]{b^m} = \sqrt[even]{negative}$ is not defined. So $b^x$, an approximation of several $b^{q_i}$, will hop around from positive to negative to undefined like a flea.
So $(-1)^{\sqrt{2}}$ can not be defined in any meaningful way....
... for real numbers.
For complex numbers where we can talk about $i = \sqrt{-1}$ this is possible but it has a very different sort of answer.
Do you want me to tell you about it?
EDIT: You wrote "I understand why it is a complex number when it is raised to the power of e, thanks to this question here. However, I do not understand why it is complex when raised to the power of $\sqrt{2}$." So I guess you do what me to tell you about it.
$neg^{x}$ will be real if $x$ is rational and has an odd denominator. ($neg^{m/n} = \sqrt[n]{b^m}$ which is a very legitimate value.) But if $x$ is rational with an even denominator (when put in lowest terms) then $neq^{x}$ will be a complex number. ($neg^{m/n} = \sqrt[n]{neg^m} = \sqrt[n]{-1}\sqrt[n]{|neg|^m}$). If $x$ is irrational then $b^x = ?????$.
Okay, for complex numbers we define $z^{a + bi} = z^a*z^{bi}$. Okay... what the heck is $z^{\sqrt{-1}}$? Okay, to make all the rules of exponents that we know from calculus and before hold true. ($e^{x+y} = e^xe^y$ and $\frac {de^x}{dx} = e^x$), If we want those rules to still be true for $e^{complex}$ we have to define $e^{ix}$ as $\cos x + i \sin x$ [$***$].
This is why $e^{i\pi} = \cos \pi + i \sin \pi = -1$.
So $e^{a + bi} = e^a(\cos b + i \sin b)$ (for real numbers, $b = 0$ and everything works out.)
And $(-1)^{\sqrt{2}} = e^{\ln {-1}(\sqrt{2})}$. So what is $\ln neg$? In the reals that is undefined. But in the complex: $e^{(2k+1)\pi i} = \cos (2k+1) \pi + i \sin (2k+1)\pi = -1$ we know that $\ln -1 = (2k+1)\pi i$. That is why it is a complex number even though it doesn't appear to have any complex parts.
So $(-1)^{irrational} = e^{\ln {-1}*irrational} =e^{(2k+1)\pi i*irrational} = \cos ((2k+1)\pi*irrational) + i \sin ((2k+1)\pi*irrational)$. A complex number. Actually an infinite number of complex numbers.
Very non-intuitional put none the less perfectly logical.
====
[~] (It's actually not that simple. We have to prove that is consistent with $r = m/n = p/q$ and that all numbers have $n$-th roots. Which if $b$ is negative is not the case for even $n$. But we may assume it is true for positive $b$.)
[$*$] (That is a really lousy way of putting it but I think it is typical for a high school level. In actuality we note that we can find sequences of rationals {$q_i$} so that $q_i - q_j$ get infinitely close together for large $i, j$ so $q_i\rightarrow$ some limit $x$. If $x$ isn't rational... that is what the irrationals are. Limits of infinitely precise sequences of rational numbers thatget infinitely close to values that can not be express as ratio of two integers.)
(Actually, it's a lot more subtle and sophisticated than that and it took mathematicians thousands of years to figure it out. You will learn a little bit about it in calculus, and if you become a math major you will learn a lot about it in Real Analysis.)
(Okay... where was I?)
[$**$] (Actually... we define euler's constant $e$ and the definition of natural logarithms. But it boils down to the same thing.)
[$***$] (Because .... oh, I'll explain if you want but ... just take my word for it.)