Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question
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}$$

share|cite|improve this answer
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.

share|cite|improve this answer

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$.

share|cite|improve this answer


$$(-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=$$


share|cite|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.