In mathematics, an expression is a written arrangement of symbols following the context-dependent, syntactic conventions of mathematical notation. Symbols can denote numbers (constants), variables, operations, and functions.[1] Other symbols include punctuation signs and brackets (often used for grouping, that is for considering a part of the expression as a single symbol).
Many authors distinguish an expression from a formula, the former denoting a mathematical object, and the latter denoting a statement about mathematical objects.[2] This is analogous to natural language, where a noun phrase refers to an object, and a whole sentence refers to a fact. For example, is an expression, while is a formula.
Expressions can be evaluated or partially evaluated by replacing operations that appear in them with their result. For example, the expression evaluates partially to and totally to
An expression is often used to define a function, by taking the variables to be arguments, or inputs, of the function, and assigning the output to be the total evaluation of the resulting expression.[3] For example, and define the function that associates to each number its square plus one. An expression with no variables would define a constant function. Usually, two expressions are considered equal or equivalent if they define the same function. Such an equality is called a "semantic equality", that is, both expressions "mean the same thing."
A formal expression is a kind of string of symols, created by the same production rules as standard expressions, however, they are used without regard to the meaning of the expression. In this way, two formal expressions are considered equal only if they are syntactically equal, that is, if they are the exact same expression.[4][5] For instance, the formal expressions "2" and "1+1" are not equal.