### Author Topic: A little bit of a maths problem with indices  (Read 7204 times)

0 Members and 1 Guest are viewing this topic.

#### Simon

• Global Moderator
• Posts: 14449
• Country:
• Did that just blow up? No? might work after all !!
##### A little bit of a maths problem with indices
« on: December 29, 2014, 12:09:49 pm »
I have to solve an equation I've been through all of the learning material and cannot find an explanation for my dilemma. I have to solve an equation with three unknowns and the problem gives me those unknowns. Two of them are negative numbers and in the equation the unknowns are raised to the power of two and to the power of three. Now do I treat the racing to the power of an unknown as though the whole of the unknown is in parentheses and the index is applied to everything in the parenthesis. Or do I raised a number to its index and then apply the sign of what is now the variable.

I am wondering if the idea of the problem is to demonstrate putting into an equation -2 to the power of two in which case maybe you raised two to the power of two and give it a minus because the index takes precedence over the sign and perhaps when an X is raised to a power and then that X is replaced with a negative number in which case everything within the X is raised to the power and therefore it would be like putting the whole value of X in parentheses and raising everything in the parenthesis to the power.

So I would say that -2 to the power of two is perhaps -4 but if I have exited the power of two and replace X with -2 then the result is for.

#### Leuams

• Contributor
• Posts: 21
• Country:
##### Re: A little bit of a maths problem with indices
« Reply #1 on: December 29, 2014, 12:41:54 pm »
In Algebra everything in the parentheses is raised to the power. Remember PEMDAS

(-2)^2 = 4

Your post and use of math is confusing me unless I am reading your post wrong and forget basic math.

#### Simon

• Global Moderator
• Posts: 14449
• Country:
• Did that just blow up? No? might work after all !!
##### Re: A little bit of a maths problem with indices
« Reply #2 on: December 29, 2014, 12:44:56 pm »
That's what I thought basically the difference is as follows:

-2^2 = -4

x^2,
for x = -2,
(-2)^2 = 4

#### Christopher

• Frequent Contributor
• Posts: 429
• Country:
##### Re: A little bit of a maths problem with indices
« Reply #3 on: December 29, 2014, 12:48:58 pm »
Negative number times negative number is positive as signs cancel out

#### Simon

• Global Moderator
• Posts: 14449
• Country:
• Did that just blow up? No? might work after all !!
##### Re: A little bit of a maths problem with indices
« Reply #4 on: December 29, 2014, 12:53:30 pm »
Well according to this video on the Khan Academy unless you explicitly put a negative number embraces the index is considered as a first operation without considering the negative: https://www.khanacademy.org/math/cc-seventh-grade-math/cc-7th-negative-numbers/cc-7th-exponents-negative-base/v/exponents-with-negative-bases

In my case things are slightly more complicated because it is a variable which is been raised to the power and that variable is then replaced by a negative number so I am assuming I believe correctly that I would put the whole variable in brackets and then raise everything in brackets to the power. To expand on my thinking there will be nothing to stop the whole variable being replaced by an expression in which case it would definitely have to go in brackets and then the whole expression would be raised to the power of two.

I suspect the whole purpose of the exercise is to check my understanding of this subtlety in dealing with negative numbers or negative variables which have to be raised to a power.

#### Falcon69

• Super Contributor
• Posts: 1475
• Country:
##### Re: A little bit of a maths problem with indices
« Reply #5 on: December 29, 2014, 09:14:45 pm »
If you have three unknowns, and one of them is a power, i.e 3x, you can use substitution.  Make 3x, X.  Then make the other 2 unknowns Y and Z.  If you are given any of the unknowns, then it is simple.  Solve for the others.

If You have three unknowns, and they are, well, unknown, you can again use substitution. For example...

(3x-4y)/6=z becomes (x-4y)/6=z  which again, you can substitute which becomes u/6=z

Solve for u, which is u=6z....and so on.

I think the only way to solve for multiple unknowns is to use substitution.

EDIT:  actually, making 3x = x (substitution) might be confusing. You can pick any letter, like b or something.  But keep in mind what it is. some letters, like s (seconds) or t (time) can get confusing too.  It works for any letter, you just have to remember what it is.  Always write down somewhere on the paper that 3x = x (or whatever letter you choose)
« Last Edit: December 29, 2014, 09:17:41 pm by Falcon69 »

#### Simon

• Global Moderator
• Posts: 14449
• Country:
• Did that just blow up? No? might work after all !!
##### Re: A little bit of a maths problem with indices
« Reply #6 on: December 29, 2014, 09:22:29 pm »
The three "unknowns" were all given. The point of the exercise was to correctly substitute the X the Y and the Z for the numbers given two of which were negative. I'm not sure what you were getting at but to be able to solve an equation with three unknowns you need to have the same three unknowns in three equations and use the methods of solving for simultaneous equations.

#### suicidaleggroll

• Super Contributor
• Posts: 1455
• Country:
##### Re: A little bit of a maths problem with indices
« Reply #7 on: December 29, 2014, 09:26:20 pm »
It just seems like you're getting hung up on where the parenthesis go.

-2^2 is ambiguous.  Is it -(2^2) or (-2)^2?

Obviously if the (-2) is a variable x, and the equation is x^2, then you're dealing with the latter.  If the (2) is a variable x, and the equation is -x^2, then you're back to the ambiguous beginning, unless some parenthesis are added.  If this is an excerpt from an equation, eg: y-x^2, then you can safely assume that it means y-(x^2), because the - is not a negative sign anymore, it's the mathematical operation "minus" or "subtract", which comes after exponents in the order of operations.

#### electr_peter

• Supporter
• Posts: 936
• Country:
##### Re: A little bit of a maths problem with indices
« Reply #8 on: December 29, 2014, 09:29:35 pm »
"^" has priority over "-". So:
Code: [Select]
-2^2 = -(2^2) = -4(-2)^2 = 4

#### Simon

• Global Moderator
• Posts: 14449
• Country:
• Did that just blow up? No? might work after all !!
##### Re: A little bit of a maths problem with indices
« Reply #9 on: December 29, 2014, 09:30:31 pm »
It just seems like you're getting hung up on where the parenthesis go.

-2^2 is ambiguous.  Is it -(2^2) or (-2)^2?

Obviously if the (-2) is a variable x, and the equation is x^2, then you're dealing with the latter.  If the (2) is a variable x, and the equation is -x^2, then you're back to the ambiguous beginning, unless some parenthesis are added.  If this is an excerpt from an equation, eg: y-x^2, then you can safely assume that it means y-(x^2), because the - is not a negative sign anymore, it's the mathematical operation "minus" or "subtract", which comes after exponents in the order of operations.

There aren't any parentheses per se, the whole point of the parentheses is to correctly isolate the parts been raised to a power. Your conclusion is correct. I am being asked to resolve an equation in which X is -2 therefore when X is raised to the power of two it is the whole -2 that is being raised to the power of two the actual section is -3XY^2 the Y being -1 which could sway the equation one way or the other.

#### Simon

• Global Moderator
• Posts: 14449
• Country:
• Did that just blow up? No? might work after all !!
##### Re: A little bit of a maths problem with indices
« Reply #10 on: December 29, 2014, 09:31:30 pm »
"^" has priority over "-". So:
Code: [Select]
-2^2 = -(2^2) = -4(-2)^2 = 4

Not in this case because it is x^2 and x=-2 so it is (-2)^2 = 4

#### suicidaleggroll

• Super Contributor
• Posts: 1455
• Country:
##### Re: A little bit of a maths problem with indices
« Reply #11 on: December 29, 2014, 09:37:09 pm »
"^" has priority over "-". So:
Code: [Select]
-2^2 = -(2^2) = -4(-2)^2 = 4

Only when the "-" means the mathematical operation "minus", as in y-x^2.  When the - is defining the number itself (eg: negative two), it doesn't have any place in the order of operations, it's part of the definition of the number and of course needs to be a part of the base being raised to the exponent.

The problem is the symbol "-" has two definitions.  The mathematical operation "minus", and the symbol to denote a number with a value less than 0.  Which definition is appropriate depends on context.

-2^2 is ambiguous, either definition could be appropriate.  I would tend to lean towards (-2)^2 unless there were parenthesis around the (2^2), simply because -(2^2) would almost certainly be written as -1*2^2 instead.

5 - 2^2 is not ambiguous, clearly it means 5 - (2^2)

5 + -2^2 is not ambiguous either, it means 5 + (-2)^2.

It all depends on context.
« Last Edit: December 29, 2014, 09:45:34 pm by suicidaleggroll »

#### Simon

• Global Moderator
• Posts: 14449
• Country:
• Did that just blow up? No? might work after all !!
##### Re: A little bit of a maths problem with indices
« Reply #12 on: December 29, 2014, 09:47:11 pm »
Which definition is appropriate depends on context.

And that was the point of the exercise in the assignment to see if I would screw it up or not.

#### Fsck

• Super Contributor
• Posts: 1157
• Country:
• sleep deprived
##### Re: A little bit of a maths problem with indices
« Reply #13 on: December 29, 2014, 10:15:25 pm »
"^" has priority over "-". So:
Code: [Select]
-2^2 = -(2^2) = -4(-2)^2 = 4

Only when the "-" means the mathematical operation "minus", as in y-x^2.  When the - is defining the number itself (eg: negative two), it doesn't have any place in the order of operations, it's part of the definition of the number and of course needs to be a part of the base being raised to the exponent.

The problem is the symbol "-" has two definitions.  The mathematical operation "minus", and the symbol to denote a number with a value less than 0.  Which definition is appropriate depends on context.

-2^2 is ambiguous, either definition could be appropriate.  I would tend to lean towards (-2)^2 unless there were parenthesis around the (2^2), simply because -(2^2) would almost certainly be written as -1*2^2 instead.

5 - 2^2 is not ambiguous, clearly it means 5 - (2^2)

5 + -2^2 is not ambiguous either, it means 5 + (-2)^2.

It all depends on context.

not really ambiguous, no brackets = no priority.
"This is a one line proof...if we start sufficiently far to the left."

#### electr_peter

• Supporter
• Posts: 936
• Country:
##### Re: A little bit of a maths problem with indices
« Reply #14 on: December 29, 2014, 10:17:42 pm »
"^" has priority over "-". So:
Code: [Select]
-2^2 = -(2^2) = -4(-2)^2 = 4

Not in this case because it is x^2 and x=-2 so it is (-2)^2 = 4
Yes, it holds in this case because if x = -2, for example,
Code: [Select]
x*(-5) = (x)*(-5) = (-2)*(-5) = 10 When x is used in context, then you can (and should) add additional/extra parenthesis around x before expanding it.

"^" has priority over "-". So:
Code: [Select]
-2^2 = -(2^2) = -4(-2)^2 = 4
Only when the "-" means the mathematical operation "minus", as in y-x^2.  When the - is defining the number itself (eg: negative two), it doesn't have any place in the order of operations, it's part of the definition of the number and of course needs to be a part of the base being raised to the exponent.

The problem is the symbol "-" has two definitions.  The mathematical operation "minus", and the symbol to denote a number with a value less than 0.  Which definition is appropriate depends on context.
Yes, "-" (minus) has two meanings. Meaning depends on the context. Which meaning makes sense? If only one holds, then use that. If both meanings are probable, higher prioritity operation wins. In this case, "^".

-2^2 is ambiguous, either definition could be appropriate.  I would tend to lean towards (-2)^2 unless there were parenthesis around the (2^2), simply because -(2^2) would almost certainly be written as -1*2^2 instead.

5 - 2^2 is not ambiguous, clearly it means 5 - (2^2)

5 + -2^2 is not ambiguous either, it means 5 + (-2)^2.

It all depends on context.
"Ambiguousness" depends on how strictly you or somebody else adhere to the rules. This is not ambiguous with priority rules
Code: [Select]
-2^2 =-(2^2) = -4x = -2; x^2 = (-2)^2 = 4If you know the rules and everybody plays by the rules, then all is OK. If either condition is broken ...

Which definition is appropriate depends on context.
And that was the point of the exercise in the assignment to see if I would screw it up or not.
I do not know original problem, so cannot comment
« Last Edit: December 29, 2014, 10:20:35 pm by electr_peter »

#### Simon

• Global Moderator
• Posts: 14449
• Country:
• Did that just blow up? No? might work after all !!
##### Re: A little bit of a maths problem with indices
« Reply #15 on: December 29, 2014, 10:21:41 pm »
Code: [Select]
{x^2 -3xy^3 +2z^2} / {x(y^2 -z)} x=-1y=-2z=1
I make the result 7

#### suicidaleggroll

• Super Contributor
• Posts: 1455
• Country:
##### Re: A little bit of a maths problem with indices
« Reply #16 on: December 29, 2014, 10:24:47 pm »
"Ambiguousness" depends on how strictly you or somebody else adhere to the rules. This is not ambiguous with priority rules
Code: [Select]
-2^2 =-(2^2) = -4x = -2; x^2 = (-2)^2 = 4If you know the rules and everybody plays by the rules, then all is OK. If either condition is broken ...

I disagree.  The problem is that one of those definitions of "-" is NOT an operation, and therefore is not subject to the agreed upon order of operations.  It's part of the definition of the number, and therefore must come before ANY mathematical operation on that number.

#### electr_peter

• Supporter
• Posts: 936
• Country:
##### Re: A little bit of a maths problem with indices
« Reply #17 on: December 29, 2014, 10:27:33 pm »
Code: [Select]
{x^2 -3xy^3 +2z^2} / {x(y^2 -z)} x=-1y=-2z=1
I make the result 7
Correct (-21/-3 = 7)
So what is the problem?

#### Simon

• Global Moderator
• Posts: 14449
• Country:
• Did that just blow up? No? might work after all !!
##### Re: A little bit of a maths problem with indices
« Reply #18 on: December 29, 2014, 10:30:35 pm »
Code: [Select]
{x^2 -3xy^3 +2z^2} / {x(y^2 -z)} x=-1y=-2z=1
I make the result 7
Correct (-21/-3 = 7)
So what is the problem?

none now that it is established that x^2 and for x=-1 the result of x^2 is (-1)^2 ad not -1^2 as the results would have been the opposite.

#### electr_peter

• Supporter
• Posts: 936
• Country:
##### Re: A little bit of a maths problem with indices
« Reply #19 on: December 29, 2014, 10:39:48 pm »
"Ambiguousness" depends on how strictly you or somebody else adhere to the rules. This is not ambiguous with priority rules
Code: [Select]
-2^2 =-(2^2) = -4x = -2; x^2 = (-2)^2 = 4If you know the rules and everybody plays by the rules, then all is OK. If either condition is broken ...

I disagree.  The problem is that one of those definitions of "-" is NOT an operation, and therefore is not subject to the agreed upon order of operations.  It's part of the definition of the number, and therefore must come before ANY mathematical operation on that number.
Please show a clear case where this is the issue. You do it by the rules, result should be the same. Also, those two meanings are almost identical in practice.

5 - 4 means either
• (5) - (4) or
• (5) (-4) = [so what now? What is the operation between two numbers? We seem to have broken math by your interpretation. Obviously, addition] = (5) + (-4)
We interpreted minus symbol both ways and got the same result. No surprises here.
Mathematics has rules to make it consistent.

Have you studied any math subject in college/uni? How do compare math there to school level?
Maybe there is difference in teaching of such things. Many of my lecturers have strong (negative) observations about school math level teaching. There were even articles released about some of the issues.
« Last Edit: December 29, 2014, 10:48:30 pm by electr_peter »

#### suicidaleggroll

• Super Contributor
• Posts: 1455
• Country:
##### Re: A little bit of a maths problem with indices
« Reply #20 on: December 29, 2014, 11:05:59 pm »
Please show a clear case where this is the issue. You do it by the rules, result should be the same. Also, those two meanings are almost identical in practice.
You mean other than the entire premise on which this thread is based?

-2^2

That's as clear-cut an example where the definition of "-" changes the result.  Either it's the mathematical operation "minus", in which case there is an implied 0 that you're subtracting from, and order of operations defines that the exponent is computed first, OR there's an implied "1*" and it should actually be -1*2^2, in which case order of operations defines that the exponent is computed first, OR it's defining the number "negative two", in which case it's actually (-2)^2.

If you type "-2^2" into a program, chances are most languages would return -4, but that doesn't mean it's not ambiguous.  If somebody were to write down on a piece of paper "-2^2", chances are they mean "(-2)^2", since as I said before, nobody would write -2^2 and mean -(2^2) (unless it was following some other number, eg y-2^2), they would write -1*2^2 instead.  If somebody on my team were to put "-2^2" into a program, I would demand that they add parenthesis to clarify the operation.  Even if they actually did mean -(2^2), as the compiler would most likely interpret it, that doesn't mean it won't trip up every person who reads through the code.  The person reading through the code might know it would come out as -4, but how do they know that's what the developer meant to do?  Most of the time you see that in code, it's a typo, and the developer actually meant (-2)^2.  A side effect of translating a written equation into code without taking into account the interpretation of the "-" symbol by the compiler.

Have you studied any math subject in college/uni? How do compare math there to school level?
Maybe there is difference in teaching of such things. Many of my lecturers have strong (negative) observations about school math level teaching. There were even articles released about some of the issues.
Yes, I have a BSEE with a math minor.  Grade school math was a joke by comparison, and the teachers were beyond useless.
« Last Edit: December 29, 2014, 11:14:37 pm by suicidaleggroll »

#### Neganur

• Supporter
• Posts: 1114
• Country:
##### Re: A little bit of a maths problem with indices
« Reply #21 on: December 29, 2014, 11:14:45 pm »
[...]none now that it is established that x^2 and for x=-1 the result of x^2 is (-1)^2 ad not -1^2 as the results would have been the opposite.

-1^2 is terrible style, avoid it at all cost. You can spend all day arguing with someone about if it is -(1^2) or (-1)^2 because both have a strong case.

In university math and engineering it is strongly advised to use parenthesis, since the goal is to minimize errors and to communicate proof. It can be assumed that 9 out of 10 times (-1) is what was meant and the author was just lazy, this is very common. Again, avoid this by all means.

#### Simon

• Global Moderator
• Posts: 14449
• Country:
• Did that just blow up? No? might work after all !!
##### Re: A little bit of a maths problem with indices
« Reply #22 on: December 29, 2014, 11:21:34 pm »
-1^2 is terrible style, avoid it at all cost. You can spend all day arguing with someone about if it is -(1^2) or (-1)^2 because both have a strong case.

Well the whole question was around how to write the equation when the unknowns were substituted in and how to interpret that substitution. At the end of the day there is only one way of interpreting each way of writing it down it's a case of writing it down correctly in the first place and then interpreting it correctly when you work it out.

I have found from limited personal experience that using parentheses even slightly in excess does help clarify matters particularly when writing software to ensure the compiler does not get it wrong.

#### IanB

• Super Contributor
• Posts: 9632
• Country:
##### Re: A little bit of a maths problem with indices
« Reply #23 on: December 29, 2014, 11:36:22 pm »
This is an awfully long thread for a question that shouldn't be a question, so let's try to clarify it:

x2 means "x squared" which means "x times x". There can be no possible ambiguity about this.

If x = 2 then x2 is 2 times 2 which is 4.

If x = -2 then it is -2 times -2, which is also 4.

I'm writing this in words rather than symbolic notation to make it especially clear what is going on here. It is about taking one number and multiplying it by another number. A number is a "thing", and a negative number is just as much a "thing" as a positive number.
I'm not an EE--what am I doing here?

#### Simon

• Global Moderator
• Posts: 14449
• Country:
• Did that just blow up? No? might work after all !!
##### Re: A little bit of a maths problem with indices
« Reply #24 on: December 29, 2014, 11:38:47 pm »
Yes we have been over it twice already although some of us still struggle with the concepts.

Smf