There is no universal definition for "well defined." Here are three common uses of the term.
- $X, Y$ are sets, $\sim$ is an equivalence relation on $X$, $\tilde{X}$ is the set of subsets $S$ of $X$ having the property that $x, y \in S$ if and only if $x \sim y$. A typical element $S$ of $\tilde{X}$ is often written as $\overline{x}$, for some $x \in S$. Let $f: X \rightarrow Y$ be a function, and let $\overline{f}: \tilde X \rightarrow Y$ be the function given by $\overline{f}(\tilde x) = f(x)$.
When someone says that $\overline{f}$ is well defined, they mean that $f(x) = f(y)$ whenever $x \sim y$. Otherwise, $\overline{f}$ makes no sense as a function.
Example: $f: R \rightarrow S$ is a homomorphism of rings, $I$ is an ideal of $R$, and $\overline{f}: R/I \rightarrow S$ is given by the formula $\overline{f}(x+I) = f(x)$. Then $\overline{f}$ is well defined if and only if $I$ is contained in the kernel of $f$.
2 . $X, Y$ are sets, and $f:X \rightarrow Y$ is a function which is given by some formula. It is clear that the output of the formula is either undefined or else an element of $Y$.
When someone says that $f$ is well defined, they mean that the formula gives a valid output.
Example: $f: (-1,1) \rightarrow \mathbb{R}$, $$f(x) = 1 + x + x^2 + \cdots $$ Here $f$ is defined in terms of a limit, and to say that $f$ is well defined is to say that the limit exists.
Example: $f: (0,\infty) \rightarrow \mathbb{R}, x \mapsto \ln x$. This function is not well defined, because no one has given $\ln 0$ a definition as a real number.
3 . $X, Y$ are sets, and $f:X \rightarrow Y$ is a function which is given by some formula. The formula makes sense if we regard $f$ as a function from $X$ into a larger set $Z$ which contains $Y$.
When someone says that $f$ is well defined, what they mean that if $x \in X,$ then $f(x)$ by its formula is actually an element of the set $Y$.
Example: let $f: (-1,1) \cap \mathbb{Q} \rightarrow \mathbb{Q}$ be given by $$f(x) = 1 + x + x^2 + \cdots$$
Suppose we have already established that $f(x)$ is an element of $\mathbb{R}$. To say that $f$ is well defined, we would have to argue that $f(x)$ is actually in $\mathbb{Q}$.
For instance, in the context of R-integrability, $\displaystyle \int_0^1f$, where $f\colon ]0,1[\to \mathbb{R},, x \mapsto \dfrac{1}{x}$, isn't well defined because $f$ isn't bounded on its domain, in other words, the integral doesn't exist.
– Git Gud Jul 17 '16 at 23:25