In mathematics, a well-defined expression or unambiguous expression is an expression whose definition assigns it a unique interpretation or value. Otherwise, the expression is said to be not well defined, ill defined or ambiguous. 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 {\displaystyle f} takes real numbers as input, and if f ( 0.5 ) {\displaystyle f(0.5)} does not equal f ( 1 / 2 ) {\displaystyle f(1/2)} then f {\displaystyle f} is not well defined (and thus not a function). The term well-defined can also be used to indicate that a logical expression is unambiguous or uncontradictory.
A function that is not well defined is not the same as a function that is undefined. For example, if f ( x ) = 1 x {\displaystyle f(x)={\frac {1}{x}}} , then even though f ( 0 ) {\displaystyle f(0)} is undefined, this does not mean that the function is not well defined; rather, 0 is not in the domain of f {\displaystyle f} .