Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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|improve this question
1  
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
1  
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
1  
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
add comment

3 Answers

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|improve this answer
add comment

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|improve this answer
add comment

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|improve this answer
add comment

Your Answer

 
discard

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.