Algebra uses an infix MathematicalNotation in which binary operators come between their operands.
a = 1 + 2
Pros:
- This is the standard way that people learn mathematical notation.
- This way is probably better for doing math on paper. This may be because of the point above. For example, in which notation is it easiest to see that the two 'a' variables cancel?
- a + b + c - a + d
- + - + + a b c a d
- a b + c + a - d +
Cons:
- One needs grouping operators (like parentheses) and/or OperatorPrecedence to disambiguate complex expressions.
- Infix notation cannot be interpreted directly by a computer. It must first be parsed into a tree using operator and operand stacks.
- This notation is limited to binary operators. One can get around this by chaining 1 + 2 + 3 (a form of currying).
Contrast: PolishNotation, PostfixNotation
CategoryMath