Well-defined

In mathematics, a function is well-defined if it gives the same result when the form (the way in which it is presented) but not the value of an input is changed. For example, a function that is well-defined will take the same value when 0.5 is the input as it does when 1/2 is the input. An example of a "function" that is not well-defined is "f(x) = the first digit that appears in x". For this function, f(0.5) = 0 but f(1/2) = 1. A "function" such as this would not be considered a function at all, since a function must have exactly one output for a given input.

In group theory, the term well-defined is often used when dealing with cosets, where a function on a quotient group may be defined in terms of a coset representative. Then the output of the function must be independent of which coset representative is chosen. For example, consider the group of integers modulo 2. Since 4 and 6 are congruent modulo 2, a function defined on the integers modulo 2 must give the same output when the input is 6 that it gives when the input is 4.

A function that is not well-defined is not the same as a function that is undefined. For example, if f(x) = 1/x, the 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.