Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Expression (mathematics)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Well-defined expressions== {{Main|Well-defined expression}} 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 (logic)|syntax]] and [[Formal semantics (natural language)|semantics]]. Syntax is concerned with the rules used for constructing, or transforming the symbols of an expression without regard to any [[Interpretation (logic)|interpretation]] or [[Meaning (linguistics)|meaning]] given to them. Expressions that are syntactically correct are called [[Well-formedness|well-formed]]. Semantics is concerned with the meaning of these well-formed expressions. Expressions that are semantically correct are called [[Well-defined expression|well-defined]]. === Well-formed === The syntax of mathematical expressions can be described somewhat informally as follows: the allowed [[operator (mathematics)|operator]]s 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-formedness|''well-formed'']], and those that are not well-formed are called, ''ill-formed'', and do not constitute mathematical expressions.<ref>{{cite book |last=Stoll |first=Robert R. |title=Set Theory and Logic |publisher=Dover Publications |isbn=978-0-486-63829-4 |location=San Francisco, CA |year=1963}}</ref> For example, in [[arithmetic]], the expression ''1 + 2 Γ 3'' is well-formed, but :<math>\times4)x+,/y</math>. is not. However, being well-formed is not enough to be considered well-defined. For example in arithmetic, the expression <math display="inline">\frac{1}{0}</math> is well-formed, but it is not well-defined. (See [[Division by zero]]). Such expressions are called [[Undefined (mathematics)|undefined]]. ===Well-defined=== [[Semantics]] is the study of meaning. [[Formal semantics (natural language)|Formal semantics]] is about attaching meaning to expressions. An expression that defines a unique [[Value (mathematics)|value]] or meaning is said to be [[Well-defined expression|well-defined]]. Otherwise, the expression is said to be ill defined or ambiguous.'''<ref name="MathWorld2">{{cite web |last=Weisstein |first=Eric W. |title=Well-Defined |url=http://mathworld.wolfram.com/Well-Defined.html |access-date=2 January 2013 |publisher=From MathWorld β A Wolfram Web Resource}}</ref>''' In general the meaning of expressions is not limited to designating values; for instance, an expression might designate a condition, or an [[equation]] that is to be solved, or it can be viewed as an object in its own right that can be manipulated according to certain rules. Certain expressions that designate a value simultaneously express a condition that is assumed to hold, for instance those involving the operator <math>\oplus</math> to designate an internal [[direct sum]]. In [[algebra]], an expression may be used to designate a value, which might depend on values assigned to [[variable (mathematics)|variable]]s occurring in the expression. The determination of this value depends on the [[semantics]] attached to the symbols of the expression. The choice of semantics depends on the context of the expression. The same syntactic expression ''1 + 2 Γ 3'' can have different values (mathematically 7, but also 9), depending on the [[order of operations]] implied by the context (See also [[Order of operations#Calculators|Operations Β§ Calculators]]). For [[real number]]s, the product <math>a \times b \times c</math> is unambiguous because <math>(a \times b)\times c = a \times (b \times c)</math>; hence the notation is said to be ''well defined''.<ref name="MathWorld2"/> This property, also known as [[associativity]] of multiplication, guarantees the result does not depend on the sequence of multiplications; therefore, a specification of the sequence can be omitted. The [[subtraction]] operation is non-associative; despite that, there is a convention that <math>a-b-c</math> is shorthand for <math>(a-b)-c</math>, thus it is considered "well-defined". On the other hand, [[Division (mathematics)|Division]] is non-associative, and in the case of <math>a/b/c</math>, parenthesization conventions are not well established; therefore, this expression is often considered ill-defined. Unlike with functions, notational ambiguities can be overcome by means of additional definitions (e.g., rules of [[Operator precedence|precedence]], associativity of the operator). For example, in the programming language [[C (programming language)|C]], the operator <code>-</code> for subtraction is ''left-to-right-associative'', which means that <code>a-b-c</code> is defined as <code>(a-b)-c</code>, and the operator <code>=</code> for assignment is ''right-to-left-associative'', which means that <code>a=b=c</code> is defined as <code>a=(b=c)</code>.<ref>{{Cite web |date=2014-02-07 |title=Operator Precedence and Associativity in C |url=https://www.geeksforgeeks.org/operator-precedence-and-associativity-in-c/ |access-date=2019-10-18 |website=GeeksforGeeks |language=en-US}}</ref> In the programming language [[APL (programming language)|APL]] there is only one rule: from [[APL (programming language)#Design|right to left]] β but parentheses first.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)