According to Excel, 4^3^2 = (4^3)^2. Is this really the standard mathematical convention for the order of exponentiation?

According to Excel,

4^3^2 = 4096

However, according to what I learnt at school, first I have to compute 3^2 = 9 and then 4^9 = 262144.

Who is right, Excel of my former teacher?


Solution 1:

Your teacher is right. According to standard rules of algebra exponents are solved from right to left, therefore

4^3^2 = 4^(3^2) = 4^9 = 262144

You can check the results Googling 4^3^2 [and pressing Enter even if you preview the result so that you also see 4^(3^2)] and then Googling 4^9. In both cases, you will get 262144. Surprisingly, Google Search is as good for straight algebra as https://www.wolframalpha.com and mathematics oriented computing languages like FORTRAN, Julia and Mathematica.

Excel solves exponents from left to right, which is the default order in the absence of specific rules. Therefore, Excel computes 4^3^2 as if it were (4^3)^2 = 4^(3*2) = 4^6 = 4096.

To practice consecutive exponentiation according to algebra rules, not according to Excel, solve on your own the expressions

-4^3^2, 4^-3^2 and 4^3^-2

and checking the results with Google Search in the same fashion I did with the example above. Remember you can delete a minus sign in the exponent if, at the same time you invert the base:

x^-b = x^(-b) = (1/x)^b = 1 / x^b

Also, you have to take into account that -x^2 = -(x^2), which is NOT equal to (-x)^2, as Excel wants you to think. Notice that if you write 0-x^2, Excel makes no mistake.

When I say mistake, I do not mean bugs in the software. what I really mean is that computer scientists who designed Excel made choices that were comfortable to programmers but not to the users, who expect that Excel conventions mimic standard algebra rules. Excel conventions are documented in "Calculation operators and precedence in Excel", section "The order in which Excel performs operations in formulas". See Why does =-x^2+x for x=3 in Excel result in 12 instead of -6? for explanations.