# What's $(-1)^{2/3}\;$?

I know that $\left ( -1 \right )^{2/3}=\left ( \left ( -1 \right )^{2} \right )^{1/3}=1$

But Matlab computes this as $- 0.5 + 0.8660254038i$ a complex number.Why?

-
You could also say that, $\left ( -1 \right )^{2/3}=\left ( \left ( -1 \right )^{\frac{1}{3}} \right )^{2}$ – Salech Alhasov Oct 17 '12 at 13:44
You are both right. As a function of a real variable, $f(x)=x^\frac{2}{3}$ means $(\sqrt[3]{x})^2$ and $f(-1) = 1$. One of the complex roots of $-1$ is $\frac{1}{2} + \frac{\sqrt{3}}{2}i$ and its square is $-\frac{1}{2} + \frac{\sqrt{3}}{2}i$, which Matlab gave you (approximately). – Stefan Smith Oct 17 '12 at 13:52
Remember that in the complex numbers there are three third roots for $1$; and that $\sqrt[3]{-1}^2$ is not necessarily the same thing as $\sqrt[3]{(-1)^2}$ for complex numbers. – Asaf Karagila Oct 17 '12 at 14:21

By convention, $-\frac12 + \frac{\sqrt3}2i \approx -0.5+0.866i$ is the principal value of $(-1)^\frac23$.

In particular, Matlab is presumably evaluating $(-1)^\frac23$ as $\exp(\frac23\log(-1))$ and choosing the principal branch of the logarithm, where $\log(-1) = \pi i$, and thus ending up with

\begin{aligned} (-1)^\frac23 &= \exp\left(\tfrac23\log(-1)\right) \\ &= \exp\left(\tfrac23\pi i\right) \\ &= -\frac12+\frac{\sqrt3}2 i \\ &\approx -0.5+0.866i. \end{aligned}

-
Wolfram Alpha gives the principal root, but then is kind enough to ask you whether you would prefer the real-valued root. – TonyK May 12 '15 at 18:06

Terminology. The way Matlab seems to be seeing this, when you ask for $k^{2/3}$, you are asking for the number $z$ that solves the equation $$z^3 = k^2.$$

In case $k = -1$, there are three solutions to this equation in the complex plane, one of which happens to be the real number 1, and for some reason Matlab has instead given you the one in the second quadrant. I am a little surprised that it is reading the input this way; it seems to me that from the standpoint of applied math it ought to return the unique real root when it exists, unless you specifically ask it not to.

-

If the argument of the function is taken to be a complex number, the roots of (negative) unity are given by the equation $e^\frac{i\pi(2k - 1)}{n}, k = 1,2,3...n.$ So for $n=3$, the third roots of unity will be $e^\frac{i\pi}{3} \approx 0.5 + 0.866i$, $e^{i\pi} = -1$, and $e^\frac{i5\pi}{3} \approx 0.5 - 0.866i$. Squaring these gives the three solutions mentioned above by countinghaus: $-0.5 + 0.866i$, $1$, and $-0.5 - 0.866i$.

-

Because:

$$(-1)^{\frac{2}{3}}=\left|(-1)^{\frac{2}{3}}\right|e^{\arg\left((-1)^{\frac{2}{3}}\right)i}=1e^{\frac{2}{3}\pi i}=e^{\frac{2}{3}\pi i}=\cos\left(\frac{2}{3}\pi\right)+\sin\left(\frac{2}{3}\pi\right)i=$$

$$-\frac{1}{2}+\frac{\sqrt{3}}{2}i$$

-
You can't do that! You are using the value of $\arg((-1)^\frac23)$ to evaulate $(-1)^\frac23$. – TonyK May 12 '15 at 18:04