# Well-defined

(Redirected from Defined and undefined)
For other uses, see Definition (disambiguation).

In mathematics, an expression is called well-defined or unambiguous if its definition assigns it a unique interpretation or value. Otherwise, the expression is said to be not well-defined or ambiguous.[1] A function is well-defined if it gives the same result when the representation of the input is changed without changing the value of the input. For instance if f takes real numbers as input, and if f(0.5) does not equal f(1/2) then f is not well-defined (and thus: not a function).[2] The term well-defined is also used to indicate whether a logical statement is unambiguous.

A function that is not well-defined is not the same as a function that is undefined. For example, if f(x) = 1/x, then f(0) is undefined, but this has nothing to do with the question of whether f(x) = 1/x is well-defined. It is; 0 is simply not in the domain of the function.

## Simple example

Let $A_0,A_1$ be sets, let $A = A_0 \bigcup A_1$ and "define" $f: A \rightarrow \{0,1\}$ as $f(a)=0$ if $a \in A_0$ and $f(a)=1$ if $a \in A_1$.

Then $f$ is well-defined if $A_0 \bigcap A_1 = \emptyset$. This is e. g. the case when $A_0:=\{2,4\}, A_1:=\{3,5\}$ (then f(a) happens to be $\operatorname{mod}(a,2)$).

If however $A_0 \bigcap A_1 \neq \emptyset$ then $f$ is not well-defined because $f(a)$ is "ambiguous" for $a \in A_0 \bigcap A_1$. This is e. g. the case when $A_0:=\{2\}$ and $A_1:=\{2\}$. Indeed, $A_0 \bigcap A_1=\{2\}\ni 2$ and f(2) would have to be 0 as well as 1, which is impossible. Therefore, the latter f is not well-defined and thus not a function.

## "Definition" as anticipation of definition

In order to avoid the apostrophes around "define" in the previous simple example, the "definition" of f could be broken down into two simple logical steps:

1. The definition of the binary relation: In the example
$f := \bigl\{(a,i) \mid i \in \{0,1\} \wedge a \in A_i \bigr\}$,
(which is a subset of the Cartesian product $A \times \{0,1\}$.)
2. The assertion: The binary relation $f$ is a function; in the example
$f: A \rightarrow \{0,1\}$.

Whereas the definition in step 1. is formulated with the freedom of any definition and is certainly effective (without the need to classify it as „well-defined“), the assertion in step 2. has to be proved: If and only if $A_0 \cap A_1 = \emptyset$, we get a function $f$, and the $f$ of "definition" is well-defined.

On the other hand: if $A_0 \cap A_1 \neq \emptyset$ then for an $a \in A_0 \cap A_1$ there is both, $(a,0) \in f$ and $(a,1) \in f$, and the binary relation $f$ is not functional as defined in Binary relation#Special types of binary relations and thus not well-defined (as a function). Colloquially, the "function" $f$ is called ambiguous at point $a$ (although there is per definitionem never an "ambiguous function"), and the original "definition" is pointless.

Despite these subtle logical problems, it is quite common to anticipatorily use the term definition (without apostrophes) for "definitions" of this kind, firstly because it is sort of a short-hand of the two-step approach, secondly because the relevant mathematical reasoning (step 2.) is the same in both cases and finally because the assertion is up to 100% true. Or, in other words: A definition always claims its own well-definedness.

## Independence of representative

The question of well-definedness of a function classically arises when the defining equation of a function does not (only) refer to the arguments themselves, but (also) to elements of the arguments. This is sometimes unavoidable when the arguments are cosets and the equation refers to coset representatives.

### Functions with one argument

For example, consider the following function

$\begin{matrix} f : & \Z/8\Z & \to & \Z/4\Z\\ & \overline{n}_8 & \mapsto & \overline{n}_4, \end{matrix}$

where $n\in\Z, m\in \{4,8\}$ and $\Z/m\Z$ are the integers modulo m and $\overline{n}_m$ denotes the congruence class of n mod m.

N.B.: $\overline{n}_4$ is a reference to the element $n \in \overline{n}_8$, and $\overline{n}_8$ is the argument of f.

The function f is well-defined, because

$n \equiv n' \operatorname{mod} 8 \; \Leftrightarrow \; 8\mid(n-n') \; \Leftrightarrow \; 2\cdot 4\mid(n-n') \; \Rightarrow \; 4\mid(n-n') \; \Leftrightarrow \; n \equiv n' \operatorname{mod} 4.$

### Operations

In particular, the term well-defined is used with respect to (binary) operations on cosets. In this case one can view the operation as a function of two variables and the property of being well-defined is the same as that for a function. For example, addition on the integers modulo some n can be defined naturally in terms of integer addition.

$[a]\oplus[b] = [a+b]$

The fact that this is well-defined follows from the fact that we can write any representative of $[a]$ as $a+kn$, where k is an integer. Therefore,

$[a+kn]\oplus[b] = [(a+kn)+b] = [(a+b)+kn] = [a+b] = [a]\oplus[b]$

and similarly for any representative of $[b]$.

## Well-defined notation

For real numbers, the product $a \times b \times c$ is unambiguous because $(a \times b)\times c = a \times (b \times c)$. (Therefore, the notation is said to be well-defined.[1]) Because of this property of the operation (here $\times$), which is known as associativity, the result does not depend on the sequence of multiplications, so that a specification of the sequence can be omitted.

The subtraction operation, $-$, is not associative. However, there is a convention (or definition) in that the $-$ operation is understood as addition of the opposite, thus $a-b-c$ is the same as $a + (-b) + (-c)$, and is called »well-defined«.

Division is also non-associative. However, in the case of $a/b/c$ the convention $/b := *b^{-1}$ is not so well established, so this expression is considered »ill-defined«.

Unlike with functions, the notational ambiguities can be overcome more or less easily by means of additional definitions, i. e. rules of precedence and/or associativity of the operators. In the programming language C e. g. the operator - for subtraction is left-to-right-associative which means that a-b-c is defined as (a-b)-c and the operator = for assignment is right-to-left-associative which means that a=b=c is defined as a=(b=c). In the programming language APL there is only one rule: from right to left − but parentheses first.

## Other uses of the term

A solution to a partial differential equation is said to be well-defined if it is determined by the boundary conditions in a continuous way as the boundary conditions are changed.[1]