Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Possible Duplicate:
What is 48÷2(9+3)?

My friend asked me value of expression 16/4*4. So what is value of 16/4*4? Is it 16 or 1. if you solve it right to left it's 1. But if you solve it from left to right its value is 16. So which one is correct. And why?

share|improve this question

marked as duplicate by Rahul, Fabian, Noah Snyder, Pedro Tamaroff, Asaf Karagila Jan 7 '13 at 22:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3  
It depends on which of the two options you adopt, of course. Usually, it's done "left to right"; but this is just convention. –  David Mitra Jan 2 '13 at 15:50
    
How is the above a regular expression? (mathworld.wolfram.com/RegularExpression.html) –  anorton Jan 2 '13 at 16:09
1  
You can also review Order of Operations. Regards –  Amzoti Jan 2 '13 at 16:13
add comment

2 Answers

up vote 11 down vote accepted

It's an ambiguous expression, which is best clarified with the use of parentheses to make explicit the first operation to perform, and on which two integers.

That is, the expression is best expressed by presenting it as one of:

$\;(16 / 4)* 4 = 16\;\tag{1}$ OR $\;16/(4* 4)=1\,\;\tag{2}$

leaving no room for confusion or ambiguity on the part of the reader.

That said:

Since division and multiplication are equal in precedence (see order of operations), and absent any parentheses, then by convention, we evaluate from left to right.

That is: we evaluate $\;16/4*4 = 4 * 4 = 16,\;$ just as we would evaluate $(1)$ above.


I'll quote from Gerry Myerson's answer to this post:

"There is no Supreme Court for mathematical notation; there were no commandments handed down on Sinai concerning operational precedence; all there is, is convention, and different people are free to adhere to different conventions. Wise people will stick in enough parentheses to make it impossible for anyone to mistake the meaning."

They use $(1)$ when they mean $(1)$, and use $(2)$ when they mean $(2)$.

share|improve this answer
add comment

Order of Operations demands that expressions are evaluated left to right.

share|improve this answer
2  
Not always. $2^{2^3}$ is usually interpreted as $2^{(2^3)} = 256$, rather than $(2^2)^3=64$. –  Rick Decker Jan 2 '13 at 18:26
    
Right. I should have mentioned that OO demands left to right after all other considerations. Thank you for pointing that out. –  Ron Gordon Jan 2 '13 at 18:28
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.