In mathematics, an expression is an arrangement of symbols following the context-dependent, syntactic conventions of mathematical notation. Symbols can denote numbers, variables, operations, and functions. Other symbols include punctuation marks and brackets, used for grouping where there is not a well-defined order of operations. Expressions are commonly distinguished from formulas: expressions usually denote mathematical objects, whereas formulas are statements about mathematical objects, such as an equality. This is analogous to natural language, where a noun phrase refers to an object, and a whole sentence refers to a fact. For example, 8x−5 and 3 are both expressions, while the inequality 8x−5≥3 is a formula. However, formulas are often considered as expressions that can be evaluated to the Boolean values true or false. To evaluate an expression means to find a numerical value equivalent to the expression. Expressions can be evaluated or simplified by replacing operations that appear in them with their result. For example, the expression 8×2−5 simplifies to 16−5, and evaluates to 11. 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 evaluation of the resulting expression. For example, x↦x2+1 and f(x)=x2+1 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."
Elementary mathematics
Variables and evaluation In elementary algebra, a variable in an expression is a letter that represents a number whose value may change. To evaluate an expression with a variable means to find the value of the expression when the variable is substituted with given number. Expressions can be simplified by replacing operations that appear in them with their result, or by combining like-terms. The evaluation of an expression consists of repeating simplification steps until getting eventually a single number. For example, take the expression 4x2+8; it can be evaluated for x = 3 in the following steps: 4⋅32+8, (replace x with 3) 4⋅9+8 (evaluate the square) 36+8 (evaluate the multiplication) 44 (evaluate the addition) A term is a constant or the product of a constant and one or more variables. Some examples include 7,5x,13x2y,4b The constant of the product is called the coefficient. Terms that are either constants or have the same variables raised to the same powers are called like terms. If there are like terms in an expression, one can simplify the expression by combining the like terms. One adds the coefficients and keeps the same variable. 4x+7x+2x=13x Any variable can be classified as being either a free variable or a bound variable. For a given combination of values for the free variables, an expression may be evaluated, although for some combinations of values of the free variables, the value of the expression may be undefined. Thus an expression represents an operation over constants and free variables and whose output is the resulting value of the expression. For a non-formalized language, that is, in most mathematical texts outside of mathematical logic, for an individual expression it is not always possible to identify which variables are free and bound. For example, in ∑i<kaik, depending on the context, the variable i can be free and k bound, or vice-versa, but they cannot both be free. Determining which value is assumed to be free depends on context and semantics.
Equivalence
An expression is often used to define a function, or denote compositions of functions, by taking the variables to be arguments, or inputs, of the function, and assigning the output to be the evaluation of the resulting expression. For example, x↦x2+1 and f(x)=x2+1 define the function that associates to each number its square plus one. An expression with no variables would define a constant function. In this way, two expressions are said to be equivalent if, for each combination of values for the free variables, they have the same output, i.e., they represent the same function. The equivalence between two expressions is called an identity and is sometimes denoted with ≡. For example, in the expression ∑n=13(2nx), the variable n is bound, and the variable x is free. This expression is equivalent to the simpler expression 12 x; that is ∑n=13(2nx)≡12x. The value for x = 3 is 36, which can be denoted ∑n=13(2nx)|x=3=36.
Well-defined expressions
The language of mathematics exhibits a kind of grammar (called formal grammar) about how expressions may be written. There are two considerations for well-definedness of mathematical expressions, syntax and semantics. Syntax is concerned with the rules used for constructing, or transforming the symbols of an expression without regard to any interpretation or meaning given to them. Expressions that are syntactically correct are called well-formed. Semantics is concerned with the meaning of these well-formed expressions. Expressions that are semantically correct are called well-defined.
Well-formed The syntax of mathematical expressions can be described somewhat informally as follows: the allowed operators must have the correct number of inputs in the correct places (usually written with infix notation), the sub-expressions that make up these inputs must be well-formed themselves, have a clear order of operations, etc. Strings of symbols that conform to the rules of syntax are called well-formed, and those that are not well-formed are called, ill-formed, and do not constitute mathematical expressions. For example, in arithmetic, the expression 1 + 2 × 3 is well-formed, but ×4)x+,/y is not. However, being well-formed is not enough to be considered well-defined. For example in arithmetic, the expression 10 is well-formed, but it is not well-defined (see Division by zero). Such expressions are called undefined.
… excerpt ends here. Continue reading the full article.


![Expression (mathematics): Representation of the expression (8 − 6) × (3 + 1) as a Lisp tree, from a 1985 Master's Thesis[18]](https://thumb.wikimedia.org/wikipedia/commons/thumb/e/ef/Cassidy.1985.015.gif/500px-Cassidy.1985.015.gif?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail)


