# Algebra's Laws of Powers and Roots: Handle With Care

Recently, for entertainment, I tried to solve a puzzling algebra problem featured on YouTube . In due course I learned that algebra’s $$(a^x)^y=a^{xy}\qquad\qquad\qquad\qquad\qquad(1)$$

Law of Powers identity is not always valid (not always true) if variable a is real and exponents x and y are complex-valued.

The fact that Eq. (1) can’t reliably be used with complex x and y exponents surprised me. And then I thought, “Humm, …what other of algebra’s identities may also be invalid when the exponents are complex?” This blog provides a table to answers that question.

I’ve examined several algebra identities and tabulated under what conditions they are invalid for two scenarios. In Scenario# 1 the x and y exponents are real-valued, and in Scenario# 2 the x and y exponents are complex-valued whose real and imaginary parts are real numbers. In the following table the mantissa scalar variables a and b are real-valued.

In the table the phrase “Not always valid” means there exist x and y exponent values for which the listed identity is not valid. This blog’s appendix gives MATLAB command examples that verify the entries in the above table.

My Test Method

For Test Scenario# 1 I tested the validity of the above algebra identities using the following steps:

 Assigned real bipolar values to scalar variables a and b. Those values ranged from ‑10 to +10 not including zero.

 Assigned random real values to exponents x and y. Those real values had magnitudes in the range of zero to 20.

 Using the assigned a, b, x, and y variables, compute the numerical values of the left and right sides of an algebra identity using MATLAB. (When computing roots MATLAB computes the principle root.)

 Compute the difference (error) between the two computed numbers from Step# 3.

 Repeat Steps  through  thousands of times for various random numerical combinations of the x and y exponents.

For Test Scenario# 2 I performed the above Steps using random complex values for the x and y exponents. Those complex values had magnitudes in the range of zero to 20 and random angles in the range of zero to 2p radians.

Conclusion

The validity of algebra’s Laws of Powers and Roots identities, with real or complex exponents, depend on the polarities of the a and b mantissa scalars. I found no discernable pattern in which x and y values caused any given identity to be invalid.

My conclusion for this blog is: In your mathematical derivations, be cautious when using algebra’s Laws of Powers and Roots. Acknowledgements

I thank Randy Yates and Dan Boschen for their advice regarding the content of this blog.

References

 “Breaking the rules of math π = 0. Where is the mistake?” Online:

Appendix

This appendix provides example MATLAB commands that verify the entries in the above table. The following Left and Right variables are the computed left and right sides of a given identity. A MATLAB-computed result where LeftRight is proof that a given identity is “Not always valid.”

Identity# 1a:

Real x and y:

a = -2; x = 2; y = 2; Left = a^(x/y), Right = (a^x)^(1/y)

Complex x and y:

a = 2; x = -4 -9i; y = -5 + 6i; Left = a^(x/y), Right = (a^x)^(1/y)

a = -2; x = -4 -9i; y = -5 + 6i; Left = a^(x/y), Right = (a^x)^(1/y)

Identity# 1b:

Real x and y:

a = -2; x = 1.1; y = 0.7; Left = a^(x/y), Right = (a^(1/y))^x

Complex x and y:

a = -2; x = 3 + 4i; y = -1 + 0i; Left = a^(x/y), Right = (a^(1/y))^x

Identity# 2:

Real x and y:

a = -2; b = -5; x = -2.2; Left = (a*b)^x, Right = (a^x)*(b^x)

Complex x and y:

a = -2; b = -5; x = 1 + 4i; Left = (a*b)^x, Right = (a^x)*(b^x)

Identity# 3:

Real x and y:

a = 2; b = -5; x = 1.3; y = 1.02; Left = (a^x)*(b^(x*y)), Right = (a*b^y)^x

a = -2; b = -5; x = 1.3; y = 1.02; Left = (a^x)*(b^(x*y)), Right = (a*b^y)^x

Complex x and y:

a = 2; b = 5; x = 6 + 2i; y = 0 -7i; Left = (a^x)*(b^(x*y)), Right = (a*b^y)^x

a = 2; b = -5; x = 6 + 2i; y = 0 -7i; Left = (a^x)*(b^(x*y)), Right = (a*b^y)^x

a = -2; b = 5; x = 6 + 2i; y = 0 -7i; Left = (a^x)*(b^(x*y)), Right = (a*b^y)^x

a = -2; b = -5; x = 6 + 2i; y = 0 -7i; Left = (a^x)*(b^(x*y)), Right = (a*b^y)^x

Identity# 4:

Real x and y:

a = 2; b = -5; x = 1.4; Left = ((a)/(b))^x, Right = ((a)^(x))/((b)^(x))

Complex x and y:

a = 2; b = -5; x = 1 + 2i; Left = ((a)/(b))^x, Right = ((a)^(x))/((b)^(x))

Identity# 5:

Real x and y:

a = -2; x = 1.1; y = 0.7; Left = (a^x)^y, Right = a^(x*y)

Complex x and y:

a = 2; x = 2 + 5i; y = 3 -12i; Left = (a^x)^y, Right = a^(x*y)

a = -2; x = 2 + 5i; y = 3 -12i; Left = (a^x)^y, Right = a^(x*y)

Identity# 6:

Real x and y:

a = -2; b = -5; x = -0.8; Left = (a*b)^(1/x), Right = (a^(1/x))*(b^(1/x))

Complex x and y:

a = -2; b = -5; x = -1 - 3i; Left = (a*b)^(1/x), Right = (a^(1/x))*(b^(1/x))

Identity# 7:

Real x and y:

a = -2; x = 1.1; y = 0.7; Left = (a^(1/y))^(1/x), Right = a^(1/(x*y))

Complex x and y:

a = 2; x = -3 - 4i; y = 0 + 0i; Left = (a^(1/y))^(1/x), Right = a^(1/(x*y))

a = -2; x = 10 + 8i; y = -1 + 0i; Left = (a^(1/y))^(1/x), Right = a^(1/(x*y))

Identity# 8:

Real x and y:

a = 2; b = -5; x = 1.4; Left = (a/b)^(1/x), Right = (a^(1/x))/(b^(1/x))

Complex x and y:

a = 2; b = -5; x = 2 + 1i; Left = (a/b)^(1/x), Right = (a^(1/x))/(b^(1/x))

[ - ]
Comment by September 29, 2023 This is an "artifact" of MATLAB selecting the principal root.  I believe there are always combination(s) of roots that work out true, none-the-less your "buyer beware" caution is very true.

[ - ]
Comment by October 2, 2023 To add some more to what wcp said, when you allow for complex results, you don't even need complex numbers in the exponent for multiple solutions to arise.  A factor of 1 can be multiplied onto any expression, even multiple times.

Consider the value of 1^(1/N), where N is an integer.  There is only one real solution, which is 1.  However, by using 1=e^(i2pi) as the factor n number of times, the expression becomes

1^(1/N) = ((e^(i2pi)^n)^(1/N) = e^(i[2pi/N]n)

All possible values of n, both negative and positive, end up landing on N evenly spaced points around the unit circle.  When each of these points, as complex values, are raised to the Nth power, the answer is 1+i0.  Therefore

[1^(1/N)]^N always equals one

[1^N]^(1/N) can equal one

This set of points is your basis set for the Discrete Fourier Transform (DFT) and are called the Roots of Unity.

Similar considerations occur taking inverse trig functions.

acos(cos(theta)) may not equal theta

cos(acos(x)) always equals x

It's important to know your tools.  Sometimes extraneous solutions provide extra answers, sometimes they are meaningless or redundant.
[ - ]
Comment by October 2, 2023 Hi Cedron.

Your '1^(1/N) = ((e^(i2pi)^n)^(1/N) = e^(i[2pi/N]n)' expression is a good example of how a real number raised to a real exponent can have multiple complex values. Another example of that situation is:

1^pi = e^(i2pi*n)^pi = cos(i2n*pi^2) + isin(i2n*pi^2),  n = 1,2,3,...

Years ago I thought ome raised to any real power was always equal to one. But that's not true.

[ - ]
Comment by October 2, 2023 For 1^x, It makes a big difference whether the exponent is rational or irrational.  If it is rational, the answer is a number of evenly spaced points on the unit circle having the count of the lowest denominator in the ratio.  If the exponent is irrational, no two solutions will ever coincide, yet you are trying to cover an uncountable infinite number of points on the unit circle with a countable infinite number of points.  That doesn't work.  You get, in effect, zero coverage.

My favorite example is a real number raised to an imaginary number equaling an imaginary number raised to a real.

e^i = i^(2/pi)

Looking at the principles, these represent a point on the unit circle one radian (one radius length along the circumference) from unity.  You can pick any point on the unit circle (including unity if you consider it once around) and it forms a scale with 0 at unity and 1 at your point along the circumference.  The value at the point squared will end up at 2 on the scale.  When it is cubed, you end up at three, etc.  Yes, fractional values work.

Since e^i represents one radian along the circumference then (e^i)^theta represents a point theta distance along the circumference.  This is the key to understanding Euler's equation, IMO.  The real part of the value at the point is then cos(theta) and the imaginary part is sin(theta), hence:

(e^i)^theta = e^(i theta) = cos(theta) + i sin(theta)
[ - ]
Comment by October 3, 2023 Hi Cedron.

So j^(2/pi) is a complex number whose magnitude is one and whose angle is one radian. Neat!

[ - ]
Comment by October 3, 2023 Very nice Cedron. To clarify, if x is real this doesn't make any difference : 1^x = 1 always for real x (with all the other ways to represent 1 if we like as Rick demonstrated), correct?

Another favorite to mention of course is the "most beautiful equation in the world":

e^j\pi + 1 = 0

So building on my response to Rick, I'll "uglify" that with:

e^j\pi - je^(log(2)+jpi/2) - 1 = 0

[ - ]
Comment by October 3, 2023 Not correct.

If you are allowing complex values, 1^x is always on the unit circle and |1^x|=1.

This stuff is the topic of my first article:

"The Exponential Nature of the Complex Unit Circle"

Which is also my most read, by like a factor of five to the runner up

z = 1^(1/3)

z^3 = 1

z^3 - 1 = 0

(z-1)(z^2+x+1) = 0

z = 1 or z = -1/2 +/- i sqrt(3)/2

[ - ]
Comment by October 3, 2023 Isn’t 1^x=1, always, when x is real (including all the ways to represent 1 as Rick showed)? I just wanted to clarify that. So 1^pi=1 etc

[ - ]
Comment by October 3, 2023 Well that's incorrect.

If x is an integer then 1^x is always one.

If x is a rational =a/b in reduced form, then 1^x has b solutions as evenly space points around the circle, the a one being the nominal.

If x is irrational then there are a countable infinite number of solutions on the unit circle.

1 is always a solution, but not always the only solution.

[ - ]
Comment by October 3, 2023 I believe the only way to have a solution for 1^x on the unit circle besides the trivial case of 1 angle 0 is for x to be imaginary.

How is it not?

[ - ]
Comment by October 3, 2023 I added it late, did you see this example?

z = 1^(1/3)

z^3 = 1

z^3 - 1 = 0

(z-1)(z^2+z+1) = 0

z = 1 or z = -1/2 +/- i sqrt(3)/2

1 raised to a third, a real rational number, has three solutions.  They are called the Cubic Roots of Unity.  Note, they are the points of an equilateral triangle.

Only when b is one in the rational case, i.e. x is an integer, do you get a single solution, and it is indeed 1.

Even simpler:

1^(1/2) = +/- 1

[ - ]
Comment by October 3, 2023 Ah yes of course, the roots of unity! Thank you Cedron. Very good, I got it. The nth root of 1 is n points on the unit circle.

[ - ]
Comment by October 3, 2023 That's neat! Yet, it is for each of those cases still equal to one, right? Perhaps you meant that you thought one could only be represented by "1", whereas e^(j2pi)=1, e^(j4pi)=1, etc. along with the infinite other cases you gave, and trivial other examples for the non-complex people such as "1^x = 101-100", for real x. In the end they are all one in different representations.

I have to remember next time I want exactly two of something to instead as for

-je^(log(2)+jpi/2)

Thanks for the fun with math Rick!

[ - ]
Comment by October 3, 2023 Hi Dan.

Ha ha. Yes, you can use -je^(log(2)+jpi/2) to represent the number two. Then again you could also use an irrational number, sqrt(3), and write: [ - ]
Comment by October 3, 2023 Nice one!

[ - ]
Comment by October 3, 2023 [ - ]
Comment by October 3, 2023 Hi Cedron.

Are you replying to Dan or me?

[ - ]
Comment by October 3, 2023 Those posts didn't thread well, did they?

Your expression.  Dan's can take as many multiples of added i2pi as you want, but since he is not taking a fractional exponent there are no extra solutions introduced.

[(-1+sqrt(3))^3] / 4 is unambiguous.

To post reply to a comment, click on the 'reply' button attached to each comment. To post a new comment (not a reply to a comment) check out the 'Write a Comment' tab at the top of the comments.