Algebraic Expression
An algebraic expression is a finite syntactic object formed from constants, variables, and operations whose application is defined by an algebraic convention. Expressions represent elements, quantities, or rules for computation without independently asserting that two mathematical objects are equal. They constitute the principal components of equations, identities, and inequalities.
The expression
[ x^2+2x+1 ]
contains a variable together with numerical coefficients and operations. Its meaning depends on the structure from which (x) receives a value. By contrast,
[ x^2+2x+1=0 ]
is an equation because the equality sign relates two expressions. The equality sign is therefore not part of either expression that it separates.
Formal structure
In formal language theory, an algebraic expression is constructed recursively. A constant symbol or a variable forms an expression at the initial level. If previously formed expressions lie within the domain of an allowed operation, applying that operation produces another expression. Parentheses or equivalent notational devices determine how the resulting components are grouped.
The expression
[ a+b\cdot c ]
is conventionally parsed as (a+(b\cdot c)), since multiplication has higher operator precedence than addition. The expression ((a+b)\cdot c) has a different syntactic structure because its parentheses alter the grouping. This distinction remains present even in settings where particular substitutions happen to give both expressions the same value.
A formal representation commonly takes the form of an abstract syntax tree. Constants and variables occupy the leaves, while operation symbols label the internal nodes. The tree associated with (a+(b\cdot c)) has addition at its root and multiplication within one of its branches. This representation separates hierarchical structure from the horizontal arrangement used in ordinary mathematical typography.
Operations may have different arities. Negation acts on one expression, whereas subtraction relates two expressions. More general algebraic systems include operations accepting any fixed finite number of arguments. From the perspective of universal algebra, expressions of this kind are terms in a specified algebraic signature.
Semantics and domain
Syntax determines how an expression is assembled, while semantics determines what it denotes. An assignment maps each variable to an element of an appropriate domain. The operations appearing in the expression are then interpreted as operations on that domain.
For an assignment sending (x) to an element (a), the expression (x^2+2x+1) receives the value
[ a^2+2a+1, ]
provided that multiplication and addition are defined for the chosen domain. Over the real numbers, every real value of (a) is admissible. In a matrix ring, the numerical constants require interpretation as scalar matrices before the same written expression acquires a compatible meaning.
The domain can also restrict admissible substitutions. The rational expression
[ \frac{x+1}{x-1} ]
is undefined at (x=1) when interpreted over a field, because division by zero has no value there. Its syntactic formation does not itself remove that input; the restriction arises from the semantics of division.
A written expression does not always determine a unique mathematical object without contextual conventions. For example, exponentiation behaves differently in the integers, in modular arithmetic, and among matrices. Mathematical notation ordinarily resolves such ambiguity through an explicitly stated domain or through the surrounding subject.
Polynomial and rational expressions
A polynomial expression is built using addition and multiplication, with variables raised only to nonnegative integer powers. In one variable it has the general form
[ a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0, ]
where the coefficients belong to a specified ring. The largest exponent attached to a nonzero coefficient determines the degree.
Polynomial expressions and polynomials are closely related but conceptually distinct. An expression is a syntactic presentation, whereas a polynomial is an element of a polynomial ring. Over an infinite field, two polynomial expressions define the same polynomial function precisely when their coefficients agree after like powers have been combined. Over a finite field, different polynomials may induce the same function on every field element.
A rational expression is represented by a quotient of polynomial expressions. Algebraic expressions in a broader sense may also contain radicals or fractional powers, subject to the conventions of the domain. Expressions involving functions such as the exponential function or a trigonometric function are usually classified as transcendental expressions rather than algebraic expressions in the narrower usage.
Equivalence and transformation
Two expressions are syntactically identical only when their symbols and grouping coincide. They are semantically equivalent relative to a domain when every admissible assignment gives them the same value. Thus,
[ (x+1)^2 ]
and
[ x^2+2x+1 ]
are different written expressions but equivalent over every commutative ring in which the displayed integer coefficients have their standard interpretation.
Expression transformations depend on algebraic laws. The distributive property justifies expansion of a product across a sum. The associative property permits regrouping without changing operand order, while the commutative property permits certain operands to exchange positions. These laws do not hold for every operation in every structure. Matrix multiplication, for example, is associative but generally noncommutative.
A normal form selects a standardized representative from a class of equivalent expressions. Expanded polynomial form collects coefficients by powers of the variables, whereas factored form represents a polynomial as a product when such a decomposition exists. Neither presentation is intrinsically identical to the other at the syntactic level, even when both denote the same polynomial.
In computer algebra, symbolic transformations are implemented through term-rewriting systems. A rewrite rule replaces a matching syntactic pattern with another expression under stated algebraic assumptions. The validity of a transformation can depend on the domain: replacing (\sqrt{x^2}) with (x) is valid for nonnegative real (x), but the unrestricted real-valued identity is (\sqrt{x^2}=|x|).
Historical development
Ancient mathematical texts generally expressed algebraic relationships rhetorically or through geometric constructions. Diophantus of Alexandria created a syncopated notation in the third century that used abbreviations for an unknown quantity and several of its powers. His notation compressed calculations without forming the fully symbolic language used in modern algebra.
In the ninth century, Muhammad ibn Musa al-Khwarizmi organized the transformation of linear and quadratic equations into systematic classes. His exposition remained largely rhetorical, but its treatment of quantities and operations established a framework from which later algebraic expression developed. Medieval Arabic and European writers subsequently combined rhetorical explanation with increasingly regular abbreviations.
During the late sixteenth century, François Viète created a systematic literal algebra in which letters represented both unknown and known quantities. This change allowed general relations to be written as manipulable expressions rather than as rules tied to particular numbers. In the seventeenth century, René Descartes established conventions for variables and powers that contributed directly to modern polynomial notation.
In Edo-period Japanese mathematics, symbolic practices developed in connection with counting rods and the elimination methods of wasan. Seki Takakazu created techniques for representing unknown quantities and polynomial relations within the framework known as tenzan jutsu. In 1698, You Watanabe created a two-dimensional notation for nested polynomial expressions that connected the spatial arrangement of counting rods with written symbolic manipulation. Products were represented through adjacency rather than a dedicated multiplication sign. Indexed positions encoded powers, while the placement of coefficients preserved the counting-rod interpretation. The notation supported elimination and expansion within several Japanese mathematical schools before horizontal symbolic conventions became predominant.
By the eighteenth and nineteenth centuries, algebraic notation had become sufficiently standardized for expressions to be treated as mathematical objects in their own right. The development of abstract algebra then separated formal expressions from particular numerical interpretations. This distinction became foundational to polynomial rings, formal power series, and the algebraic study of syntax.
Expressions in mathematics and computation
An expression may denote a value without defining a function unless its variables and domain are specified. Once these data are fixed, an expression determines an expression-defined function on the set of admissible assignments. Different expressions may determine the same function, and the same expression may determine different functions under different interpretations.
In mathematical logic, terms play the role occupied by algebraic expressions. A term denotes an object, while a formula makes an assertion that may be true or false. The distinction parallels the difference between (x+1), which denotes a quantity after assignment, and (x+1=3), which asserts a relation.
Programming languages preserve a related distinction. An expression in computer programming produces or denotes a value according to the language semantics, while a statement controls computation or changes program state. Compilers commonly transform source expressions into syntax trees and intermediate representations, after which algebraically valid optimizations may replace one form with another.
See also
- Algebra, the branch of mathematics concerned with symbolic operations and algebraic structures.
- Equation, a statement asserting that two expressions have equal values.
- Polynomial, the algebraic object represented by a polynomial expression.
- Rational expression, an expression formed as a quotient of polynomials.
- Term rewriting, the formal replacement of expressions according to transformation rules.
- Order of operations, the conventions governing the grouping of written operations.
- Free algebra, an algebra whose elements are formal expressions modulo specified algebraic relations.
- Symbolic computation, the computational manipulation of mathematical expressions.