Infix notation is the notation commonly used in
arithmetic
Arithmetic is an elementary branch of mathematics that deals with numerical operations like addition, subtraction, multiplication, and division. In a wider sense, it also includes exponentiation, extraction of roots, and taking logarithms.
...
al and
logic
Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the study of deductively valid inferences or logical truths. It examines how conclusions follow from premises based on the structure o ...
al formulae and statements. It is characterized by the placement of
operators between
operands—"infixed operators"—such as the
plus sign
The plus sign () and the minus sign () are mathematical symbols used to denote positive and negative functions, respectively. In addition, the symbol represents the operation of addition, which results in a sum, while the symbol represents ...
in .
Usage
Binary relation
In mathematics, a binary relation associates some elements of one Set (mathematics), set called the ''domain'' with some elements of another set called the ''codomain''. Precisely, a binary relation over sets X and Y is a set of ordered pairs ...
s are often denoted by an infix symbol such as
set membership ''a'' ∈ ''A'' when the set ''A'' has ''a'' for an element. In
geometry
Geometry (; ) is a branch of mathematics concerned with properties of space such as the distance, shape, size, and relative position of figures. Geometry is, along with arithmetic, one of the oldest branches of mathematics. A mathematician w ...
,
perpendicular lines ''a'' and ''b'' are denoted
and in
projective geometry
In mathematics, projective geometry is the study of geometric properties that are invariant with respect to projective transformations. This means that, compared to elementary Euclidean geometry, projective geometry has a different setting (''p ...
two points ''b'' and ''c'' are in
perspective when
while they are connected by a projectivity when
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.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
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
An argument is a series of sentences, statements, or propositions some of which are called premises and one is the conclusion. The purpose of an argument is to give reasons for one's conclusion via justification, explanation, and/or persua ...
are the operands. An example of such a
function notation would be in which the function 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 is a collection of rules that reflect conventions about which operations to perform first in order to evaluate a given mathematical expression.
These rules are formalized with a ...
.
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), tree data stru ...
: Infix (In-order) is also a tree traversal order. It is described in a more detailed manner on this page.
*
Calculator input methods: comparison of notations as used by pocket calculators
* Postfix notation, also called
Reverse Polish notation
* Prefix notation, also called
Polish notation
Polish notation (PN), also known as normal Polish notation (NPN), Łukasiewicz notation, Warsaw notation, Polish prefix notation, Eastern Notation or simply prefix notation, is a mathematical notation in which Operation (mathematics), operator ...
*
Shunting yard algorithm, used to convert infix notation to postfix notation or to a tree
*
Operator (computer programming)
In computer programming, an operator is a programming language construct that provides functionality that may not be possible to define as a user-defined function (i.e. sizeof in C) or has syntax different than a function (i.e. infix addit ...
*
Subject–verb–object word order
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)