“Well-defined” is a slightly fuzzy word in mathematics. Broadly, an object is said to be “well-defined” if it has been given a definition that is completely unambiguous, can be executed without regard to any arbitrary choices the mathematician might make, or generally is crisply defined.

(The Wikipedia page on well-definedness contains many examples for those who are more comfortable with mathematical notation.)

Specific instances


One of the most common uses of the phrase “well-defined” is when talking about functions. A function is well-defined if it really is a bona fide function. This usually manifests itself as the following:

Whenever \(x=y\), we have \(f(x) = f(y)\): that is, the output of the function doesn’t depend on how we specify the input to the function, only on the input itself.

This property is often pretty easy to check. For instance, the function from \(\mathbb{N}\) to itself given by \(n \mapsto n+1\) is “obviously” well-defined: it’s trivially obvious that if \(n=m\) then \(f(n) = f(m)\).

However, sometimes it is not so easy. The function \(\mathbb{N} \to \mathbb{N}\) given by “take the number of prime factors” is not obviously well-defined, because it could in principle be the case that some number \(n\) is equal to both \(p_1 p_2 p_3\) and \(q_1 q_2\) for some primes \(p_1, p_2, p_3, q_1, q_2\); then our putative function might plausibly attempt to output either \(3\) or \(2\) on the same natural number input \(n\), so the function would not be well-defined. (It turns out that there is a non-trivial theorem, the Fundamental Theorem of Arithmetic, guaranteeing that this function is in fact well-defined.)

Well-definedness in this context comes up very often when we are attempting to take a quotient. The fact that we can take the quotient of a set \(X\) by an equivalence relation \(\sim\) is tantamount to saying:

The function \(X \to \frac{X}{\sim}\), given by \(x \mapsto [x]\) the equivalence class of \(X\), is well-defined.

Another, different, way a function could fail to be well-defined is if we tried to take the function \(\mathbb{N} \to \mathbb{N}\) given by \(n \mapsto n-5\). This function is unambiguous, but it’s not well-defined, because on the input \(2\) it tries to output \(-3\), which is not in the specified codomain.


  • Mathematics

    Mathematics is the study of numbers and other ideal objects that can be described by axioms.