Fact-checked by Grok 2 weeks ago

Infix notation

Infix notation is a conventional of expressing mathematical and logical operations in which the is placed between its operands, as in the expression a + b, making it the most intuitive and widely used format for human-readable arithmetic and algebraic statements. This notation requires explicit rules for precedence and associativity—such as multiplication preceding —and parentheses to resolve ambiguities in order, ensuring unambiguous . Originating from ancient mathematical practices, infix notation evolved significantly during the , with key symbols like the plus sign emerging as a for "et" (Latin for "and") by the late 1400s, and algebraic forms solidifying in the early 1600s through contributions from mathematicians like and . By the 1700s, figures such as and Leonhard Euler further standardized it, introducing notations for powers and integrals that remain in use today. In , infix notation dominates programming languages due to its , though it poses challenges compared to alternatives like (Polish) or postfix (reverse Polish) notations, which eliminate the need for precedence rules and are more efficient for stack-based . Despite these complexities, it has cemented infix as the foundational notation for mathematics education and scientific communication since the .

Fundamentals

Definition

Infix notation is a syntactic form in which binary operators are placed between their two operands, adhering to the general structure A op B, where A and B represent the operands and op denotes the operator. This positioning of the operator directly between the elements it connects forms the core characteristic of the notation. Infix notation differs from syntactic forms in the placement of operators relative to operands, with operators appearing either preceding or following them in other systems. A formal syntactic definition of infix notation for expressions, such as ones, is typically provided through a in Backus-Naur Form (BNF). One standard grammar structure is as follows:
E → E + T | E - T | T
T → T * F | T / F | F
F → ( E ) | id
Here, E denotes an expression non-terminal handling additive operations, T a term non-terminal for multiplicative operations, F a factor non-terminal for atomic elements or parenthesized subexpressions, + and - represent and operators, * and / and operators, ( and ) parentheses, and id a for identifiers. This recursive enforces operator precedence via non-terminal hierarchy and left-associativity through the rules. Infix notation serves a primary role in facilitating human-readable mathematical expressions, mirroring conventional writing practices that enhance comprehension of operational relationships. To address ambiguities arising from multiple operators, it relies on established rules for .

Basic Examples

Infix notation is exemplified by simple arithmetic expressions where the operator is placed between two numeric operands. For instance, the expression $2 + 3 denotes the of the numbers 2 and 3, resulting in 5. Similarly, $5 \times 4 represents the of 5 and 4, yielding 20. In algebraic expressions, variables replace or supplement numbers, maintaining the 's position between operands. A basic example is a \times b, which signifies the product of variables a and b. Another common form is x + y \times z, where the of y and z is understood to occur before the with x, illustrating operator precedence in infix structures. Parentheses in infix notation explicitly group operands and operators to override default precedence rules, dictating the evaluation order. For example, (2 + 3) \times 4 first computes the sum inside the parentheses (yielding 5) and then multiplies by 4, resulting in 20, whereas $2 + 3 \times 4 without parentheses evaluates to 14 due to multiplication's higher precedence. The hierarchical structure of an infix expression can be visualized using a , which represents the grammar's derivation and operator associations. For the expression a + b - c, assuming left-to-right associativity for operators of equal precedence, the parse tree is as follows:
      -
     / \
    +   c
   / \
  a   b
This tree indicates subtraction as the root operation, with its left subtree being the addition of a and b, and the right subtree simply c; the expression evaluates as (a + b) - c.

Historical Context

Origins in Mathematics

Infix notation, where operators are placed between operands, emerged gradually in mathematical writing as a means to express relations more symbolically than purely verbal descriptions. One of the earliest instances appears in the works of of in the 3rd century AD, who employed a syncopated notation in his that included abbreviations for the unknown quantity and its powers, along with a symbol for placed between the sides of an equation, though operations were often indicated verbally or by , marking a preliminary shift toward symbolic placement. For example, Diophantus represented expressions like the sum of terms or equations using abbreviated Greek symbols interspersed among numbers and variables, such as a symbol resembling a final for the unknown. The development of infix notation advanced significantly during the with the introduction of specific symbols for and . In 1489, German mathematician Johannes Widmann first printed the in his treatise Behende und hüpsche Rechenung auf allen Kauffmannschafft (Mercantile ), initially using them to denote surpluses and deficits in commercial contexts rather than general operations, though they were soon adapted for arithmetic between terms. These symbols were popularized in by in 1557 in The Whetstone of Witte, where he explicitly defined + as denoting "more" (from surplus) and − as "less" (from defect), facilitating infix expressions like 4 + 5 = 9 in practical calculations. This innovation built on earlier medieval abbreviations like p () and m () but marked the widespread adoption of compact symbols between operands in European texts. Standardization of infix notation in occurred in the late 16th and 17th centuries through the works of and . Viète, in his 1591 publication In artem analyticam isagoge, pioneered systematic literal notation by using vowels for unknowns (e.g., A) and consonants for known quantities (e.g., B, Z), arranging them in infix form with abbreviated words for operations, such as A³ + B²A = B²Z to represent cubic equations while enforcing homogeneity of dimensions. Descartes further refined this in (1637), consistently employing + and − signs, letters near the end of the alphabet (e.g., x, y, z) for unknowns, and superscripts for exponents (e.g., a²), enabling fully symbolic infix equations like x² + 2xy + y² = z² that integrated with geometry. These advancements transformed infix notation from ad hoc abbreviations to a rigorous, universal framework. This period witnessed a broader transition in from verbose rhetorical descriptions—common in medieval and ancient treatises—to concise symbolic expressions, enabling complex manipulations and influencing subsequent algebraic developments. In the 18th century, introduced notations for (such as a^b) and early symbols, while Leonhard Euler further standardized forms for powers, functions, and , solidifying its use in advanced .

Adoption in Computing

In the late 1940s and early 1950s, early stored-program computers such as the (1949) and (1951) presented significant challenges for handling infix notation due to their reliance on low-level and languages. Programmers had to manually decompose mathematical expressions into sequential instructions, using subroutines for basic arithmetic operations like addition and multiplication, without any automated parsing of infix forms; this approach was labor-intensive and error-prone, limiting the complexity of expressions that could be efficiently implemented. A breakthrough came in 1954 with the Laning and Zierler system for the Whirlwind computer, the first operational algebraic compiler that accepted mathematical formulas in infix notation, translating them into machine code for guidance computations; however, it had limitations, such as restricted support for operator precedence and no handling of nested expressions beyond basic parentheses. This system highlighted the parsing difficulties of infix notation on resource-constrained hardware, where ad hoc methods like string substitution were often employed to manage associativity without full syntactic analysis. The release of in 1957 by revolutionized the adoption of infix notation in programming, standardizing its use for writing natural mathematical expressions in high-level code, complete with defined precedence rules for operators; this made complex algebraic computations accessible without manual breakdown, influencing subsequent languages and compilers. In calculator design, Hewlett-Packard's (1972) initially employed postfix notation to simplify evaluation on limited hardware, avoiding the need for a full infix parser, but later models like the HP-27S () transitioned to algebraic infix entry to better match user expectations from traditional , incorporating equation-solving capabilities. From the 1960s onward, advancements in technology addressed parsing challenges through methods like recursive descent parsers, which recursively process grammar rules to build syntax trees for expressions. A key contribution was T. Irons' 1961 syntax-directed for , which used a table-driven approach with priority tables to handle operator precedence and parse expressions, integrating semantic actions for ; this approach became widely adopted in compilers for its simplicity and adaptability to context-free grammars.

Applications

In Arithmetic and Algebra

Infix notation serves as the standard representation for arithmetic operations in mathematics, positioning the operator between two operands to express computations intuitively. Basic operations such as (+), (-), (\times or \cdot), and (\div or /) are routinely written this way; for instance, the expression $5 + 3 \times 2 evaluates to $11$, as multiplication holds higher precedence than addition, requiring evaluation from left to right among operations of equal priority. This notation facilitates everyday calculations, allowing users to directly interpret and perform mental or written without additional conversion steps. In algebraic contexts, infix notation enables the formulation and manipulation of equations involving variables and constants, promoting clarity in symbolic reasoning. A common example is the $2x + 3 = 7, solved by isolating the variable: subtract $3from both sides to obtain2x = 4, then divide by $2 to yield x = 2. Such expressions rely on the notation's familiarity to balance terms and apply inverse operations systematically, forming the basis for solving systems in introductory . Exponents and roots integrate seamlessly into infix notation, extending its utility to polynomial and radical expressions. For example, x^2 + y denotes a quadratic expression where the exponent $2applies toxbefore addition, often arising in formulas for area or distance.[22] Roots are similarly handled, as in\sqrt{x}for the principal square root, which can be rewritten asx^{1/2}$ to align with exponential form while maintaining the infix structure. A frequent pitfall in using infix notation without explicit parentheses arises from overlooking precedence rules, leading to misinterpretation of order. Consider $1 + 2 \times 3, which correctly equals $7(multiplication first:2 \times 3 = 6, then 1 + 6 = 7), but could be erroneously computed as (1 + 2) \times 3 = 9if addition is prioritized.[1] Parentheses resolve such ambiguities, as in(1 + 2) \times 3$, ensuring precise evaluation in manual computations.

In Programming and Calculators

In programming languages, infix notation is the standard for expressing operations, where operators are placed between operands, and parsing is handled through built-in precedence rules or user-defined mechanisms like . In C++, allows developers to define custom behavior for infix operators such as + or * for user-defined types, enabling intuitive infix expressions like a + b where a and b are objects of a class, by implementing functions like operator+. Similarly, supports infix notation via special methods in its , such as __add__ for the + , which permits classes like vectors to use infix syntax (e.g., vec1 + vec2) while the interpreter parses according to operator precedence. Calculators commonly implement infix notation for user input to mimic mathematical writing, with internal evaluation engines that apply . For instance, the accepts infix expressions directly on the , such as 2 + 3 * 4, evaluating them to 14 by respecting precedence ( before ) without requiring postfix conversion from the user. To handle ambiguity in infix expressions, compilers and integrated development environments () often issue warnings or errors, prompting the use of parentheses for clarification. In Microsoft Visual C++, compiler warning C4554 flags potential precedence issues in expressions like a & b == c, recommending parentheses (e.g., a & (b == c)) to resolve interpretation. The GNU Compiler Collection () similarly warns about omitted parentheses in contexts where they affect evaluation, such as assignments mistaken for comparisons, enforcing explicit grouping to avoid unintended results. Many systems employ hybrid approaches for efficient , converting infix input to postfix notation internally using algorithms like the , developed by in 1961. This -based method processes infix tokens from left to right, outputting operands immediately and managing operators via a based on precedence, producing postfix form (e.g., converting a + b * c to a b c * +) for straightforward evaluation without .

Prefix Notation

Prefix notation, also known as Polish notation, is a syntactic form in which an operator precedes its operands. In this system, binary operators are placed before the two operands they connect, and unary operators precede their single operand, eliminating the need for parentheses to denote grouping. For instance, the expression for adding 2 and 3 is written as + 2 3, and negation of a variable p as N p. This notation was invented by the Polish logician Jan Łukasiewicz in the early 1920s as a tool for formal logic, with its first documented use appearing in his 1929 book Elements of Mathematical Logic. Łukasiewicz developed it during lectures at the University of Warsaw to represent logical operations without ambiguity, such as implication (C for "if...then") in expressions like C p q. Unlike conventional infix notation, where operators appear between operands, prefix notation reverses this order to prioritize the operator. A simple conversion from to illustrates the transformation: the infix expression a + b becomes + a b in prefix form, while a more complex one like (a + b) * c converts to * + a b c. This restructuring fully encodes the directly in the sequence of symbols. One key advantage of prefix notation is its unambiguous , as the position of the inherently defines the and precedence without requiring additional rules or parentheses. This simplifies in logical and computational contexts, reducing errors in complex expressions and facilitating machine processing.

Postfix Notation

Postfix notation, also known as , is a in which operators follow their operands, eliminating the need for parentheses to specify . For instance, the infix expression $2 + 3 is written in postfix as $2\ 3\ +. This structure allows expressions to be unambiguously parsed from left to right. A common application involves converting infix expressions to postfix form. Consider the infix expression a \times (b + c): it is transformed to postfix as a\ b\ c\ +\ \times, where the addition is performed first on b and c, and the result is then multiplied by a. This conversion follows a systematic using a to handle operator precedence and parentheses. Postfix notation is well-suited for stack-based evaluation, a process where operands are pushed onto a stack as they are encountered, and operators pop the necessary operands, compute the result, and push it back onto the stack. This approach enables efficient, iterative computation without recursive calls or explicit precedence rules. It is prominently used in the Forth programming language, which relies on postfix syntax and stack operations for all expressions and control flow. The notation was developed in the 1950s by Arthur W. Burks, Don W. Warren, and Jesse B. Wright to facilitate in early electronic machines, as outlined in their analysis of a parenthesis-free . Their work demonstrated how postfix enables compact representation and straightforward hardware implementation for and logical operations.

Parsing and Evaluation

Order of Operations

Infix notation relies on established conventions to resolve ambiguities in expressions containing multiple operators, ensuring consistent evaluation across mathematical contexts. These conventions, often summarized by the mnemonic (Parentheses, , and , and ) in the , dictate that operations are performed in a specific sequence: first within parentheses (or brackets), then exponents (or orders), followed by multiplication and division from left to right, and finally addition and subtraction from left to right. An equivalent mnemonic, (Brackets, Orders, and , and ), is commonly used in the and other regions, reflecting the same underlying rules but with terminology adjusted for local preferences. To illustrate, consider the infix expression $2 + 3 \times 4^2. Evaluation proceeds as follows: first compute the exponent $4^2 = 16; then the multiplication $3 \times 16 = 48; and finally the addition $2 + 48 = 50. This step-by-step process highlights how precedence levels prevent misinterpretation, such as treating the expression as (2 + 3) \times 4^2 = 80, which would violate the conventions. A key aspect of these conventions is left-to-right associativity for operators of equal precedence, which resolves ties without additional parentheses. For instance, in $20 \div 4 \times 3, division and multiplication share precedence, so evaluate left to right: $20 \div 4 = 5, then $5 \times 3 = 15, rather than $20 \div (4 \times 3) = 20 \div 12 \approx 1.67. Similarly, $10 - 3 + 2 becomes (10 - 3) + 2 = 9, not $10 - (3 + 2) = 5. While arithmetic expressions uniformly adopt left-to-right associativity, variations exist in other fields; for example, in , the implication operator (\to or \Rightarrow) is conventionally right-associative, parsing a \to b \to c as a \to (b \to c). Related notations like and postfix avoid such precedence rules altogether by positioning operators unambiguously relative to operands.

Precedence and Associativity

In infix notation, operator precedence determines the order in which operators are evaluated when multiple operators appear in an expression without parentheses, with higher-precedence operators binding more tightly to their operands. Associativity resolves ambiguities when operators of equal precedence are encountered, specifying whether they group from left to right or right to left. These rules are essential for unambiguously constructing the parse tree of an expression, ensuring consistent interpretation across mathematical and computational contexts. The standard precedence hierarchy for common arithmetic operators in infix expressions follows the conventions of PEMDAS (Parentheses, Exponents, /, /), where exponents have the highest precedence among operators, followed by and (equal precedence), and and (lowest, equal precedence). This hierarchy is depicted in the table below, listing operators from highest to lowest precedence (excluding parentheses, which always have the highest effective precedence).
Precedence LevelOperatorsDescription
3 (Highest)^ ()Power operations
2(), / ()Multiplicative operations
1 (Lowest)+ (), - ()Additive operations
This hierarchy ensures that, for instance, in the expression a + b \times c, the multiplication is performed before addition, forming the subtree b \times c first in the . Associativity applies when multiple operators of the same precedence are chained. Most operators are left-associative, meaning they group from left to right; for example, a - b - c parses as (a - b) - c, creating a left-leaning where the left is evaluated first. Exponentiation, however, is typically right-associative, so a ^ b ^ c parses as a ^ (b ^ c), forming a right-leaning that evaluates the right first. This distinction prevents ambiguities in chained operations and aligns with mathematical conventions for non-commutative operators like and . The interplay of precedence and associativity directly influences construction. Consider the expression a / b * c: since and share the same precedence level and are left-associative, it parses as (a / b) * c. The has as the root of the left subtree, with as the overall root, binding a to b first before multiplying by c. If associativity were right instead, it would parse as a / (b * c), altering the and result, but the standard left associativity ensures predictable left-to-right evaluation for multiplicative operators. Unary operators, such as the minus (), are assigned higher precedence than arithmetic operators to treat them as modifiers of single operands. For example, in -a + b, the unary minus binds tightly to a, parsing as (-a) + b and forming a subtree for the negation before the . This elevated precedence distinguishes unary minus from subtraction, preventing incorrect groupings like -(a + b) in such contexts and maintaining the integrity of term-level negations in the overall .

References

  1. [1]
    4.9. Infix, Prefix and Postfix Expressions - Runestone Academy
    This type of notation is referred to as infix since the operator is in between the two operands that it is working on. Consider another infix example, A + B * C ...
  2. [2]
    [PDF] Order of Operations and RPN - UNL Digital Commons
    Jul 2, 2007 · In the 1920's, Polish mathematician Jan Lukasiewicz developed a formal logic system which allowed mathematical expressions to be specified ...
  3. [3]
    Mathematical Notation: Past and Future (2000) - Stephen Wolfram
    Most mathematical notation now in use is between one and five hundred years old. I will review how it developed, with precursors in antiquity and the Middle ...
  4. [4]
    Infix, Postfix and Prefix
    Infix notation needs extra information to make the order of evaluation of the operators clear: rules built into the language about operator precedence and ...<|control11|><|separator|>
  5. [5]
    [PDF] Expression Parsing & Visualizing Complex Mappings
    May 18, 2014 · Definition 1.1 (Infix Notation) Functions are written such that each operator appears in-between its operands. For example: “2 · 2 - 3”.
  6. [6]
    1.3. Enforcing Order of Operations — Programming Languages
    This first problem illustrates how grammatical structure influences the evaluation of arithmetic expressions, and thus the semantics of programs.
  7. [7]
    [PDF] CSCI 136 Data Structures & Advanced Programming
    • We (humans) primarily use “infix” notation to evaluate expressions. • (x+y)*z. • Computers traditionally used “postfix” (also called. Reverse Polish) notation.
  8. [8]
    Converting from Infix to Postfix Using a Stack - andrew.cmu.ed
    2 + 2. The style used to write this expression (two, then plus, then two) is called infix notation, and it's the style most commonly seen in arithmetic. But ...
  9. [9]
    3.9. Infix, Prefix and Postfix Expressions
    This type of notation is referred to as infix since the operator is in between the two operands that it is working on. Consider another infix example, A + B * C ...
  10. [10]
    Chapter-2 - Kent
    Annotated parse tree corresponds to semantic rules. The above annotated parse tree shows how the input infix expression 9 - 5 + 2 is translated to the prefix ...
  11. [11]
    Diophantus (200 - 284) - Biography - MacTutor History of Mathematics
    Despite the improved notation and that Diophantus introduced, algebra had a long way to go before really general problems could be written down and solved ...
  12. [12]
    Earliest Uses of Symbols of Operation - MacTutor
    The plus and minus symbols only came into general use in England after they were used by Robert Recorde in in 1557 in The Whetstone of Witte.
  13. [13]
    François Viète - Biography - MacTutor - University of St Andrews
    Viète introduced the first systematic algebraic notation in his book In artem analyticam isagoge published at Tours in 1591. The title of the work may seem ...
  14. [14]
    René Descartes - Biography
    ### Summary of Descartes's Contributions to Algebraic Notation
  15. [15]
    Earliest Uses of Symbols for Variables - MacTutor
    Diophantus (fl. about 250-275) used a Greek letter with an accent to represent an unknown. G. H. F. Nesselmann takes this symbol to be the final ...Missing: infix | Show results with:infix
  16. [16]
    Arithmetic on the EDSAC - ACM Digital Library
    The paper describes how the programmer handled (fixed point) arithmetic and emphasizes the merits of having a double length accumulator. The basic strategy ...
  17. [17]
    Laning and Zierler Develop the First High Level Algebraic Language ...
    In 1954 programmers J. H. Laning and Neil Zierler Offsite Link developed an algebraic compiler Offsite Link for the Whirlwind I—the first high-level ...Missing: infix | Show results with:infix
  18. [18]
    Parsing: a timeline -- V3.1 - GitHub Pages
    Jul 6, 2023 · The only logic in these early compilers that really deserves to be called a parsing method is that which tackles arithmetic expressions. 1950: ...Missing: infix | Show results with:infix
  19. [19]
    The history of Fortran I, II, and III - IBM Research
    Jan 8, 1978 · Before 1954 almost all programming was done in machine language or assembly language. Programmers rightly regarded their work as a complex, ...
  20. [20]
    HP-27S - The Museum of HP Calculators
    It was the first fully algebraic pocket scientific calculator that HP made. ... Introduction-Discontinuation: 1988-1991. Go back to the main exhibit hall
  21. [21]
  22. [22]
    [PDF] Mathematical Notation
    In infix notation, operators are written between operands ... such as François Viète and René Descartes, revolutionized mathematical expression. ... Algebraic ...
  23. [23]
  24. [24]
    Evaluating Expressions - TI Education
    On the TI-84 Plus CE online calculator, you enter an expression in the same order as you would write it on paper. For example: pR2 is an expression. Topic Links.Missing: infix | Show results with:infix
  25. [25]
    Microsoft C/C++ compiler warnings C4400 through C4599
    Jan 24, 2025 · 'operator': check operator precedence for possible error; use parentheses to clarify precedence. Compiler warning (level 1, off) C4555, result ...
  26. [26]
    Warning Options (Using the GNU Compiler Collection (GCC))
    This warning is enabled by -Wall in C and C++. Warn if parentheses are omitted in certain contexts, such as when there is an assignment in a context where a ...
  27. [27]
    Shunting Yard Algorithm | Brilliant Math & Science Wiki
    The shunting yard algorithm parses infix expressions, assigns operators their correct operands, and can convert to postfix or evaluate the expression. It uses ...
  28. [28]
    [PDF] Operators in the mind: Jan Lukasiewicz and Polish notation - arXiv
    ABSTRACT. In 1929 Jan Lukasiewicz used, apparently for the first time, his Polish notation to represent the operations of formal logic.
  29. [29]
    Polish notation
    In the 1920s the Polish logician Jan Lukasiewicz devised a parenthesis-free notation for logic. This nota- tion, extended for use in algebra and other ...
  30. [30]
    postfix.txt
    The form with the operator "in" between the operands is called infix notation. The form with the operator "after" the operands is called postfix notation.
  31. [31]
    Infix, Postfix and Prefix
    Oct 28, 2017 · The infix expression given above is equivalent to A B C + * D / The order of evaluation of operators is always left-to-right, and brackets ...
  32. [32]
    [PDF] Infix → Postfix Conversion Algorithms
    Infix → Postfix Conversion Algorithms. 1. Manual Algorithm: (a) Fully ... Example: A / (B + C) - D. (a) ( ( A / ( B + C ) ) - D ). (b) ( ( A. ( B. C + /. D ...
  33. [33]
    [PDF] Postfix (and prefix) notation
    Postfix notation, also called 'reverse Polish', is 'operand operand operator'. Prefix notation is 'operator operand operand'.
  34. [34]
    [PDF] Evaluate Postfix (using Stacks)
    1) Create a stack to store operands (or values). 2) Scan the given expression and do following for every scanned element. 2a) If the element is a number, push ...
  35. [35]
    Using a Stack to Evaluate an Expression
    With postfix notation, it is possible to use a stack to find the overall value of an infix expression by first converting it to postfix notation.
  36. [36]
    Stacks and Postfix notation - Gforth Manual
    In Forth, stacks are used for parameter passing, and Postfix notation (also called Reverse Polish Notation) separates parameters and operators.
  37. [37]
    AMS :: Mathematics of Computation
    An analysis of a logical machine using parenthesis-free notation. HTML articles powered by AMS MathViewer. by Arthur W. Burks, Don W. Warren and Jesse B ...
  38. [38]
    An Analysis of a Logical Machine Using Parenthesis-Free Notation
    and used by the Burroughs Corporation (see frontispiece) and it is feasible in the present state of the computer art to construct a 25-variable machine.
  39. [39]
    PEMDAS -- from Wolfram MathWorld
    PEMDAS ; P · parenthesis ; E · exponentiation ; M · multiplication ; D · division ; A, addition.
  40. [40]
    Order of arithmetic operations; in particular, the 48/2(9+3) question.
    then Exponents — then Multiplication and Division — then Addition and Subtraction", with the proviso ...
  41. [41]
    Precedence -- from Wolfram MathWorld
    Precedence of common operators is generally defined so that "higher-level" operations are performed first (i.e., advanced operations "bind more tightly")/ For ...<|control11|><|separator|>
  42. [42]
    MathematicalLogic
    Implication is not associative, although the convention is that it binds "to the right", so that a ⇒ b ⇒ c is read as a ⇒ (b ⇒ c); few people ever ...
  43. [43]
    How to Use Operator Precedence in Algebra - Interactive Mathematics
    Jul 3, 2020 · Anything in parentheses and brackets is calculated first, regardless of the operator inside. Exponents and square roots are calculated second.
  44. [44]
    Variables, Operators, and Expressions
    We being by examining the structure and evaluation process for expressions, including the concepts of operator precedence and operator associativity. Then ...