# Definition of “well defined” in mathematics

I have encountered this term "well defined" in many places in maths like well-defined set, well-defined function, well-defined group, etc. What are the contexts in which we can talk about well definedness and what does it mean in each context?

• When one says that something is well-defined one simply means that the definition of that something actually defines something. – Mariano Suárez-Álvarez Feb 1 '16 at 8:56
• If I say a set S is well defined, then i am saying that the definition of the S defines something? what is something? another set? – user309789 Feb 1 '16 at 8:59
• I had the same question years ago, as the term seems to be used a lot without explanation. An example of something that is not well defined would for instance be an alleged function sending the same element to two different things. – Improve Feb 1 '16 at 8:59
• A naive definition of square root that is not well-defined: let $x \in \mathbb{R}$ be non-negative. We call $y \in \mathbb{R}$ the square root of $x$ if $y^2 = x$, and we denote it $\sqrt x$. This is ill-defined because there are two such $y$, and so we have not actually defined the square root. – Henry Swanson Feb 1 '16 at 9:08
• You missed the opportunity to title this question 'Is "well defined" well defined?', which I'm sure would've attracted many more votes via Hot Network Questions. – user253751 Feb 1 '16 at 21:09

The term well-defined (as oppsed to simply defined) is typically used when a definition seemingly depends on a choice, but in the end does not.

In most (but not all) cases, this applies to the definition of a function $f\colon A\to B$ in terms of two given functions $g\colon C\to A$ and $h\colon C\to B$: For $a\in A$ we want to define $f(a)$ by first picking an element $c\in C$ with $g(c)=a$ and then let $f(a)=h(c)$. Two problems arise with this: First of all, we must make sure that for each $a\in A$ there exists $c\in C$ with $g(c)=a$, in other words: $g$ must be surjective. But we also must make sure that the choice of $c$ is irrelevant, that is: Whenever $g(c)=g(c')$ it must also be true that $h(c)=h(c')$. Only if $g,h$ fulfil these conditions the above construction will actually define a function $f\colon A\to B$. To repeat: After this, $f$ is in fact defined. The definition itself does not become a "better" definition by saying that $f$ is well-defined. Instead, saying that $f$ is well-defined just states the (hopefully provable) fact that the conditions described above hold for $g,h$, and so we really have given a definition of $f$ this way. If the conditions don't hold, $f$ is not somehow "less well defined", it is not defined at all.

• In most formalisms, you will have to write $f$ in such a way that it is defined in any case; what the proof actually gives you is that $f$ is a function, i.e. maps each input to a single element. Otherwise, it becomes a (perfectly valid) definition of a relation, but not necessarily a function. Said another way, when we write "let $f:A\to B$ be defined by...", we are actually making an assertion, that the "..." gives the definition of a function from $A$ to $B$. Even if this is not the case $f$ will have been defined to be something, but when it is $f$ can be said to be "well-defined". – Mario Carneiro Feb 1 '16 at 21:34

There is an additional, very useful notion of well-definedness, that was not written (so far) in the other answers, and it is the notion of well-definedness in an equivalence class/quotient space.

Take an equivalence relation $E$ on a set $X$. We can then form the quotient $X/E$ (set of all equivalence classes). Take another set $Y$, and a function $f:X\to Y$. If $f(x)=f(y)$ whenever $x$ and $y$ belong to the same equivalence class, then we say that $f$ is well-defined on $X/E$, which intuitively means that it depends only on the class.

More rigorously, what happens is that in this case we can ("well") define a new function $f':X/E\to Y$, as $f'([x])=f(x)$.

As an example, take as $X$ the set of all convex polygons, and take as $E$ "having the same number of edges". The number of diagonals only depends on the number of edges, and so it is a well-defined function on $X/E$.

• Another example: $1/2$ and $2/4$ are the same fraction/equivalent. Consider the "function" $f: a/b \mapsto (a+1)/b$. It is not well-defined because $f(1/2) = 2/2 =1$ and $f(2/4) = 3/4$. – Paolo Franchi Feb 1 '16 at 10:55
• You might explain that the reason this comes up is that often classes (i.e. equivalence classes) are written down via some representation, like "1" referring to the multiplicative identity, or possibly "0.999..." referring to the multiplicative identity, or "3 mod 4" referring to "{3 mod 4, 7 mod 4, ...}". Well-defined is a broader concept but it's when doing computations with equivalence classes via a member of them that the issue is forced and people make mistakes. – djechlin Feb 1 '16 at 18:32

The statement '' well defined'' is used in many different contexts and, generally, it means that something is defined in a way that correspond to some given ''definition'' in the specific context.

As a simple example: if I say:

given the function $f(x)=\sqrt{x}=y$ such that $y^2=x$

this function is not well defined. A function is well defined only if we specify the domain and the codomain, and iff to any element in the domain correspons only one element in the codomain.

So, $f(x)=\sqrt{x}$ is ''well defined'' if we specify, as an example, $f : [0,+\infty) \to \mathbb{R}$ (because in $\mathbb{R}$ the symbol $\sqrt{x}$ is, by definition the positive square root) , but, in the case $f:\mathbb{R}\to \mathbb{C}$ it is not well defined since it can have two values for the same $x$, and becomes ''well defined'' only if we have some rule for chose one of these values ( e.g. the principal square root).

As another example: if I say:

consider the vector space $\mathbb{R}^n$

this is not a well defined space, if I not know what is the field over which the vector space is given. $\mathbb{R}^n$ over the field of reals is a vectot space of dimension $n$, but over the field of rational numbers it is a vector space of dimension uncountably infinite.

Also for sets the definition can gives some problems, and we can have sets that are not well defined if we does not specify the context. As an example consider the set

$D=\{x \in \mathbb{R}: x \mbox{ is a definable number}\}$

Since the concept of ''definable real number'' can be different in different models of $\mathbb{R}$, this set is well defined only if we specify what is the model we are using ( see: Definable real numbers)

Obviously, in many situation, the context is such that it is not necessary to specify all these aspect of the definition, and it is sufficient to say that the thing we are defining is '' well defined'' in such a context.

• Did you mean "if we specify, as an example, $f:[0, +\infty) \to [0, +\infty)$"? – G. Bach Feb 1 '16 at 15:15
• @G.Bach: The codomain of a function is a set that contain the image (or range) of the function. So, in this case, defining the codomain to be $\mathbb{R}$ (and given the range), as a consequence we see that the range is $[0,+\infty)$ . – Emilio Novati Feb 1 '16 at 15:28
• I don't understand how that fits with the sentence following it; we could also just pick one root each for $f:\mathbb{R}\to \mathbb{C}$, couldn't we? – G. Bach Feb 1 '16 at 15:30
• Yes, but the point is that we must ''have some rule for chose one of these values'', and this rule is part of the definition of the functions. So the definition $y= f(x)$ such that $y^2=x$ is not a good definition without this other rule. – Emilio Novati Feb 1 '16 at 15:34
• I must be missing something; what's the rule for choosing $f(25) = 5$ or $f(25) = -5$ if we define $f: [0, +\infty) \to \mathbb{R}$? – G. Bach Feb 1 '16 at 15:36

In simplest terms, $f:A \to B$ is well-defined if $x = y$ implies $f(x) = f(y)$. At first glance, this looks kind of ridiculous because we think of $x=y$ as meaning $x$ and $y$ are exactly the same thing, but that is not really how $=$ is used.

For example we know that $\dfrac 13 = \dfrac 26.$

• The function $f:\mathbb Q \to \mathbb Z$ defined by $f\left(\dfrac xy \right) = x+y$ is not well-defined because $f\left(\dfrac 13 \right) = 4$ and $f\left(\dfrac 26 \right) = 8.$
• The function $g:\mathbb Q \to \mathbb Z$ defined by $g\left(\dfrac mn \right) = \sqrt[n]{(-1)^m}$ is not well-defined because $g\left(\dfrac 13 \right) = \sqrt{(-1)^1}=-1$ and $g\left(\dfrac 26 \right) = \sqrt{(-1)^2}=1.$

This is important. A function that is not well-defined, is actually not even a function.

An example of a function that is well-defined would be the function $h:\mathbb Z_8 \to \mathbb Z_{12}$ defined by $h(\bar x) = \overline{3x}$. We can reason that \begin{align} \bar x = \bar y \text{ (In $\mathbb Z_8$) } &\implies x \equiv y \pmod 8\\ &\implies 3x \equiv 3y \pmod{24}\\ &\implies 3x \equiv 3y \pmod{12}\\ &\implies \overline{3x} = \overline{3y} \text{ (In $\mathbb Z_{12}$)}\\ &\implies h(\bar x) = h(\bar y) \text{ (In $\mathbb Z_{12}$).} \end{align}

Hence $h$ is a well-defined function.

It might differ depending on the context, but I suppose it's in a context that you say something about the set, function or whatever and say that it's well defined.

For example:

Let $f(x)$ be a function defined on $\mathbb R^+$ such that $f(x)>0$ and $(f(x))^2=x$, then $f$ is well defined.

This means that the statement about $f$ can be taken as a definition, what it formally means is that there exists exactly one such function (and of course it's the square root).

An example that I like is when one tries to define an application on a domain that is a "structure" described by "generators" by assigning a value to the generators and extending to the whole structure. Sometimes, because there are relationships between generators, the function is ill-defined (the opposite of well-defined).

For a concrete example, the linear form $f$ on ${\mathbb R}^2$ defined by $f(1,0)=1$, $f(0,1)=-1$ and $f(-3,2)=0$ is ill-defined. As a less silly example, you encounter this kind of difficulty when defining application on a tensor products by assigning values on elementary tensors and extending by linearity, since elementary tensors only span a tensor product and are far from being a basis (way too huge family).

Abstract algebra is another instance where ill-defined objects arise: if $H$ is a subgroup of a group $(G,*)$, you may want to define an operation on the quotient $G/H$ by defining $[g]*[g']=[g*g']$. This is ill-defined when $H$ is not a normal subgroup since the result may depend on the choice of $g$ and $g'$.

It is widely used in constructions with equivalence classes and partitions.For example when H is a normal subgroup of the group G, we define multiplication on G/H by aH.bH=abH and say that it is well-defined to mean that if xH=aH and yH=bH then abH=xyH.

You may also encounter well-definedness in such context:

There are situations when we are more interested in object's properties then actual form. In such cases we say that we define an object axiomatically or by properties. After stating this kind of definition we have to be sure that there exist an object with such properties and that the object is unique (or unique up to some isomorphism, see tensor product, free group, product topology).

Example

Definition. The exterior derivative on $M$ is a $\mathbb{R}$ linear map $d:\Omega^*(M)\to\Omega^{*+1}(M)$ such that

• $df$ is a differential of $f$
• $d^2=0$
• $d(\alpha\wedge\beta)=d\alpha\wedge\beta+(-1)^{|\alpha|}\alpha\wedge d\beta$

First one should see that we do not have explicite form of $d.$ There is only list of properties that $d$ ought to obey. Hence we should ask if there exist such function $d.$ We can check that indeed $$(d\omega)(X_0,\dots,X_{k})=\sum_i(-1)^iX_i(\omega(X_0,\dots \hat X_i\dots X_{k}))+\sum_{i<j}(-1)^{i+j}\omega([X_i,X_j],X_0,\dots \hat X_i\dots \hat X_j\dots X_{k})$$ satisfies three properties above.

Secondly notice that I used "the" in the definition. So one should suspect that there is unique such operator $d.$ I.e if $d_1$ and $d_2$ have above properties then $d_1=d_2.$ It is also true.

Hence $d$ is well defined!

If you know easier example of this kind, please write in comment.

Let me give a simple example that I used last week in my lecture to pre-service teachers. We define $\pi$ to be the ratio of the circumference and the diameter of a circle. But how do we know that this does not depend on our choice of circle? In fact, Euclid proves that given two circles, this ratio is the same. Therefore this definition is well-defined, i.e., does not depend on a particular choice of circle.

Whenever a mathematical object is constructed there is need for convincing arguments that the construction isn't ambigouos. Sometimes this need is more visible and sometimes less.