HOME

TheInfoList



OR:

Infix notation is the notation commonly used in
arithmetic Arithmetic () is an elementary part of mathematics that consists of the study of the properties of the traditional operations on numbers— addition, subtraction, multiplication, division, exponentiation, and extraction of roots. In the 19th ...
al and
logic Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the science of deductively valid inferences or of logical truths. It is a formal science investigating how conclusions follow from prem ...
al formulae and statements. It is characterized by the placement of operators between
operand In mathematics, an operand is the object of a mathematical operation, i.e., it is the object or quantity that is operated on. Example The following arithmetic expression shows an example of operators and operands: :3 + 6 = 9 In the above exam ...
s—" infixed operators"—such as the
plus sign The plus and minus signs, and , are mathematical symbols used to represent the notions of positive and negative, respectively. In addition, represents the operation of addition, which results in a sum, while represents subtraction, res ...
in .


Usage

Binary relation In mathematics, a binary relation associates elements of one set, called the ''domain'', with elements of another set, called the ''codomain''. A binary relation over sets and is a new set of ordered pairs consisting of elements in and in ...
s are often denoted by an infix symbol such as
set membership In mathematics, an element (or member) of a set is any one of the distinct objects that belong to that set. Sets Writing A = \ means that the elements of the set are the numbers 1, 2, 3 and 4. Sets of elements of , for example \, are subsets o ...
''a'' ∈ ''A'' when the set ''A'' has ''a'' for an element. In
geometry Geometry (; ) is, with arithmetic, one of the oldest branches of mathematics. It is concerned with properties of space such as the distance, shape, size, and relative position of figures. A mathematician who works in the field of geometry is c ...
, perpendicular lines ''a'' and ''b'' are denoted a \perp b \ , and in projective geometry two points ''b'' and ''c'' are in perspective when b \ \doublebarwedge \ c while they are connected by a projectivity when b \ \barwedge \ c . Infix notation is more difficult to parse by computers than prefix notation (e.g. + 2 2) or postfix notation (e.g. 2 2 +). However many
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
s use it due to its familiarity. It is more used in arithmetic, e.g. 5 × 6.


Further notations

Infix notation may also be distinguished from function notation, where the name of a function suggests a particular operation, and its arguments are the operands. An example of such a function notation would be S(1, 3) in which the function S denotes addition ("sum"): .


Order of operations

In infix notation, unlike in prefix or postfix notations, parentheses surrounding groups of operands and operators are necessary to indicate the intended order in which operations are to be performed. In the absence of parentheses, certain precedence rules determine the
order of operations In mathematics and computer programming, the order of operations (or operator precedence) is a collection of rules that reflect conventions about which procedures to perform first in order to evaluate a given mathematical expression. For examp ...
.


See also

*
Tree traversal In computer science, tree traversal (also known as tree search and walking the tree) is a form of graph traversal and refers to the process of visiting (e.g. retrieving, updating, or deleting) each node in a tree data structure, exactly once. ...
: Infix (In-order) is also a tree traversal order. It is described in a more detailed manner on this page. *
Calculator input methods There are various ways in which calculators interpret keystrokes. These can be categorized into two main types: * On a single-step or immediate-execution calculator, the user presses a key for each operation, calculating all the intermediate resul ...
: comparison of notations as used by pocket calculators * Postfix notation, also called
Reverse Polish notation Reverse Polish notation (RPN), also known as reverse Łukasiewicz notation, Polish postfix notation or simply postfix notation, is a mathematical notation in which operators ''follow'' their operands, in contrast to Polish notation (PN), in wh ...
* Prefix notation, also called Polish notation *
Shunting yard algorithm In computer science, the shunting yard algorithm is a method for parsing arithmetical or logical expressions, or a combination of both, specified in infix notation. It can produce either a postfix notation string, also known as Reverse Polish ...
, used to convert infix notation to postfix notation or to a tree * Operator (computer programming)


References

{{Reflist


External links


''RPN or DAL? A brief analysis of Reverse Polish Notation against Direct Algebraic Logic''Infix to postfix convertor
' ic' Mathematical notation Operators (programming)