What does "well defined" mean?

For a function to be well-defined, its output needs to be unambiguous. So if $a$ = $b$, then we need $f(a) = f(b)$. Let's look at something that's not well-defined. Let's try to define addition on the rational numbers as $$ \frac{a}{b} + \frac{c}{d} = \frac{a + c}{b + d}. $$

Let's look at $\frac{1}{2} + \frac{1}{3}$. Under this proposed definition of addition we have $\frac{1}{2} + \frac{1}{3} = \frac{2}{5}$. We know that $\frac{1}{2} = \frac{2}{4}$. So we have $\frac{2}{4} + \frac{1}{3} = \frac{3}{7} \neq \frac{2}{5}$. This definition of addition isn't well-defined because our output is ambiguous.

Edit: I hope this makes sense.


Ultimately, well-defined means simply: defined, however in a special kind of defining functions. Namely, we want to define a map $f\colon A\to B$ in terms of given maps $ g\colon C\to A$ and $h\colon C\to B$. We attempt to do so by saying that for given $x\in A$, we pick $z\in C$ with $g(z)=x$ and then set $f(x):=h(z)$. But is that really a definition of a function? We need two properties:

  1. For every $x\in A$, there exists $z\in C$ with $g(z)=x$.
  2. If there are multiple choices for $z$, say $g(z_1)=g(z_2)=x$, then $h(z_1)=h(z_2)$

By showing these two properties, we prove that our attempted definition is indeed a definition. In this case we say that $f$ is well-defined.


I'll describe well-definedness in terms of a simpler function. Let's say that I wanted to describe a function on non-zero rational numbers by $$f(p/q)=q/p$$ In this case, it falls on me to show that the value of $f$ at a certain rational number is independent of the way that the ratio is formed, for instance that $f(1/2)=f(2/4)$. If I can show that, then I can get away with defining a function whose "input" is not a single independent variable.