# How to evaluate powers of powers (i.e. $2^3^4$) in absence of parentheses?

If you look at $2^{3^4}$, what is the expected result? Should it be read as $2^{(3^4)}$ or $(2^3)^4$? Normally I would use parentheses to make the meaning clear, but if none are shown, what would you expect?

(In this case, the formatting gives a hint, because I can either enter $2^{3^4}$ or ${2^3}^4$. If I omit braces in the MathML expression, the output is shown as $2^3^4$. Just suppose all three numbers were displayed in the same size, and the same vertical offset between 2, 3 and 3, 4.)

• Without any convention it is ambiguous, same as it is for any operation that is nonassociative, i.e. $\rm\: x \circ ( y \circ x) \ne (x \circ y) \circ z.\$ Apr 12, 2013 at 16:25
• @MathGems, this operation is deemed right-associative (in programming-language-speak), i.e. $a * b * c$ means $a * (b * c)$. That makes sense, because otherwise $a^{b^c}$ would be just the same as $a^{b c}$, and the extra power would be just a waste of ^ ;-) In the end, that is just a convention, like $a b + c$ means $(a b) + c$, not $a (b + c)$. Apr 12, 2013 at 16:29
• @vonbrand That is one possible convention. But it is not universal. Apr 12, 2013 at 16:30
• @MathGems, it is universal enough for me. Haven't ever (outside of APL, that is) seen any other interpretation: In mathematics, and in computer languages like FORTRAN and others. Apr 12, 2013 at 16:32
• In normal mathematical usage, the exponential operation is "right" associative, i.e. if you see $a^{b^c}$, it means $a^{(b^c)}$. If you see "a^b^c", it usually means "a^(b^c)". However, this is not universal. e.g. Excel will interpret "a^b^c" as "(a^b)^c". Apr 12, 2013 at 16:41

Barring parentheses, $2^{3^4}$ should definitely be read as, and is equivalent to $\;2^{\left(3^4\right)}$:$$2^{3^4} = 2^{(3^4)} = 2^{81}$$ whereas $${(2^3)}^4 = 2^{3\cdot 4} = 2^{12}$$

As pointed out in the comments, it is fairly standard practice that exponents are "right associative" - which is somewhat of a misnomer which should only be taken to mean, evaluate rightmost first: read a^b^c as a^(b^c) and read a^b^c^d as a^[b^(c^d)], and so on. As the example above shows,the exponential operator is not associative. So as you have indicated you typically do, use parentheses, when possible, in your own usage, to avoid any possible confusion.
• @Dolma, I lost my brain and was thinking of $3^6$ in the exponent for some reason! ;-) Apr 12, 2013 at 16:33
i.e. because we do $(a*d)$ first in$((a*b)*c)*d$, I'd imagine it'd be the expected thing to do $x^{(y^z)}$