Re:We need to talk about parentheses
by tsimionescu on Monday February 12, 2024 @08:50AM
(#39344691)
For expnentiation I was talking about something else:
1+3
x + 4
In this case, the exponent notation makes it unambiguous that this is (x^(1+3))+4, and not x^(1+3+4).I agree that xy² could mean both (xy)² and x(y²), and that perhaps you need to understand precedence to disbiguate. I would still contend that the notation is defined as "each term has its own exponent, possibly 1 which need not be written" to disambiguate, where terms are separated by parentheses or by other operators.
That is, in my mind, the grammar for usual algebraic notation is something like this:
expression = term (op term)*
expression___________ (expression)?
term = (num | var | fraction | \( expression \) | \/expression)
op = + | - | / | × | ° etc
And the rules are that you first evaluate each term, and then the operators between the terms. You only need to follow precedence rules for those operators between terms, the evaluation of a term is unambiguous.You appear to be inventing elaborate ways to talk about precedence without saying "precedence".
Precedence, under the term "order of operations", predates computers by several centuries. Which is not to apply that it was fixed in stone from the beginning, or perfectly consistent, but mathematics agreed on the modern rules universally in the first couple decades of the 20th century.
The textual representation even for exponents is not enough if you don't already know that exponentiation has higher precedence than multiplication.
"1 - 3xy + 2xy²"
Both of us know that only the y term is squared in that expression. How do we know that?
I claim that we know that because we know the precedence rules and that someone never exposed to our system of algebra would not inherently and unambiguously know that it was 2·x·(y²) rather than (2·x·y)² or even 2·(x·y)² merely by visual inspection of the expression.
This (the meaning of the above expression, including the precedence/grouping) is something that has to be taught in Alegbra/Prealgebra courses, and is something that some students struggle with.