You type (-8)^{1/3} into your scientific calculator, expecting -2. The textbook page in front of you clearly states that the cube root of -8 is -2, because (-2)^3 = -8. But the calculator flashes "Math ERROR" or, on some models, returns a complex number with a tiny imaginary part.
Which is right? Is (-8)^{1/3} equal to -2, or is it undefined?
Both answers are right — within their own worlds. The textbook is doing real-number mathematics, where the cube root of a negative is a perfectly well-behaved negative number. The calculator is running a specific algorithm that happens to break on negative bases. The disagreement is not about mathematics. It is about implementation.
The mathematical answer
Start from the definition. The cube root of -8 is the number that, when cubed, gives -8:
So -2 cubed is -8. That makes -2 a cube root of -8 by definition.
Is it the only real cube root? Yes. Raising to the third power is a one-to-one function on the real numbers — x^3 sends each distinct real number to a distinct cube. So -2 is the unique real cube root, and
No ambiguity, no sign choice, no "plus or minus" business. The textbook is just stating a clean mathematical fact.
Why calculators say "error"
Inside your calculator, there is no special routine for cube roots ready to catch the case "base negative, exponent one-third." What the calculator has is a single general-purpose routine for a^b, and that routine uses the logarithm trick:
This identity is beautiful and efficient when a > 0. It reduces any exponentiation to one logarithm, one multiplication, and one exponential — operations the calculator already knows how to do very fast.
But look at what happens when a is negative. The formula wants \ln(-8). The real-valued natural logarithm is only defined for positive numbers. Plugging in -8 is like dividing by zero — the routine cannot produce a real number. So the calculator throws an error.
The calculator has no way to know that 1/3 is a "special" exponent that could be handled by a different method. To the exponentiation routine, 1/3 is just the floating-point number 0.333333\ldots — indistinguishable from any other fraction. It applies the log-trick formula uniformly, and hits a wall at any negative base.
The two different definitions
There are two distinct definitions of a^{1/3}, and they agree for positive a but disagree for negative a.
Definition 1: The cube root. a^{1/3} is the unique real number whose cube is a. For a = -8, that is -2. This is the definition your textbook uses.
Definition 2: The real-exponential formula. a^{1/3} = e^{(1/3) \cdot \ln a}. Defined only for a > 0, because \ln a needs a positive argument. For a = -8, undefined in the reals. This is the definition your calculator implements.
Both coincide when a > 0. They part ways at negative a: Definition 1 still gives a clean answer, Definition 2 refuses to play. Mathematicians and textbooks pick Definition 1 for cube roots. Calculators pick Definition 2 because it is the one they know how to compute.
How to get the calculator to give you -2
Three workarounds.
Use the explicit cube root key. Most scientific calculators (Casio fx-991, TI-30, and similar) have a dedicated \sqrt[3]{x} or \sqrt[y]{x} button. These buttons run a different internal routine — one that handles negative arguments correctly by taking absolute values first and then restoring the sign. Typing \sqrt[3]{-8} returns -2, as it should.
Pull the sign outside first. Rewrite (-8)^{1/3} as -(8^{1/3}). Compute 8^{1/3} = 2 (the calculator is happy to do this, since the base is positive), then negate to get -2.
Use the odd-root identity. For any odd positive integer n, the identity (-a)^{1/n} = -(a^{1/n}) holds in the real numbers. Whenever you see a negative base and an odd-denominator fractional exponent, pull the sign outside, evaluate the positive-base version, and reattach the sign.
Even roots of negatives — genuinely undefined
Cube roots of negatives are calculator errors but mathematically fine. Square roots of negatives are something else: genuinely undefined in the real numbers, not a computational quirk.
Ask "what real number squared gives -4?" No real number. Every real number squared is non-negative, because the product of two numbers with the same sign is positive. There is no x in the reals satisfying x^2 = -4, so (-4)^{1/2} has no real value at all.
Here the calculator's error message matches the mathematics. The textbook also says undefined. Inside the complex numbers, (-4)^{1/2} = 2i, and Python will tell you so, returning (1.225e-16+2j) if you type (-4)**0.5. But most calculators stay in the real world and refuse.
The deeper question — why cube roots of negatives are safe but square roots of negatives are not — is covered in Can the Base Be Negative With a Fractional Exponent?.
Why odd vs even matters so much
The pattern comes from a structural property of x^n.
Odd n. The function x^n is one-to-one on all the real numbers. Negatives go to negatives, positives go to positives, and every real number has a unique real n-th root. Cube roots, fifth roots, seventh roots — all safe for negative inputs.
Even n. The function x^n is non-negative for every real x: x^2 \geq 0, x^4 \geq 0, always. Negative numbers are not in the range, so they have no real n-th root. Square roots, fourth roots, sixth roots of negatives — all undefined in the reals.
So (-8)^{1/3} = -2 (odd n, safe) but (-4)^{1/2} is undefined (even n, outside the range). The index of the root is doing all the work.
In programming
Different languages handle (-8)^{1/3} differently.
- Python:
(-8) ** (1/3)returns a complex number near 1 + 1.732i — the log-trick extended into the complex plane picks the principal complex cube root, not -2. - Python, better:
math.cbrt(-8)(added in 3.11) returns -2.0 exactly. - C:
pow(-8.0, 1.0/3.0)returnsNaN.cbrt(-8.0)returns -2.0. - NumPy:
numpy.power(-8, 1/3)returnsnan.numpy.cbrt(-8)returns -2.0.
The moral: when you need the real cube root of a possibly negative number, use a function called literally "cube root," not general exponentiation.
The broader lesson
The function a^x is cleanly defined when a > 0. For a < 0 it depends on what kind of exponent you have: integer exponents are always fine; odd-denominator fractions work in the reals; even-denominator fractions and irrational exponents do not.
Calculators cannot easily distinguish these cases on the fly — by the time 1/3 hits the pow routine, it is a floating-point approximation 0.3333\ldots, indistinguishable from nearby non-special fractions. So calculators apply the log-trick uniformly and fail on negative bases. Textbooks, working symbolically, can see the 1/3 for what it is and handle the case correctly.
Quick-check mental model
When you encounter a^b with a negative base, run through this checklist.
- Odd integer exponent, negative base: safe. (-8)^3 = -512.
- Even integer exponent, negative base: safe. Result positive. (-8)^2 = 64.
- Fraction p/q in lowest terms, odd q, negative base: safe. (-8)^{1/3} = -2, (-8)^{5/3} = -32.
- Fraction p/q with even q, negative base: undefined in the reals.
- Irrational exponent, negative base: undefined in the reals.
Your calculator, using the log trick, will say "error" for the third and fourth categories, treating them the same. Your textbook will say "defined" for the third and "undefined" for the fourth.
Closing
(-8)^{1/3} = -2. That is the mathematical answer, full stop. The calculator's "error" message is a feature of how general-purpose exponentiation is implemented, using a logarithm formula that cannot handle negative bases. It is not a mathematical truth about the cube root.
When the textbook and the calculator disagree, the textbook is almost always using the cleaner, more general definition, and the calculator is using the one that was easiest to code. Know which tool you are holding. If you need a cube root of a negative, look for a \sqrt[3]{x} button or a function called cbrt, or just pull the sign outside and let the calculator handle the positive part. Either way, the answer is -2 — exactly what your textbook told you.