TITLE: What does it mean when I say that addition/multiplication for an equivalence relation is well defined?
QUESTION [16 upvotes]: I have trouble understanding this concept. Why is it necessary to prove that addition or multiplication is well defined in equivalence classes? My understanding of equivalence classes is that it must be reflexive, symmetric and transitive. Doesn't proving it automatically imply that addition and multiplication can be done? Why the additional need to prove that it is 'well defined'?
Apologies if this question is too trivial; my understanding of this topic is limited.

REPLY [5 votes]: Elaborating on Henning Makholm's answer:

Consider this equivalence relation on $\mathbb N$:
  $$a \sim b \quad\text{iff}\quad \lfloor a/10 \rfloor = \lfloor b/10 \rfloor $$
  which says that two naturals are related if they differ only in their last digit.
  [Define $+$ (1)]:
  $$[a]_\sim + [b]_\sim = [a+b]_\sim$$

The problem lies in the attempted definition (1) of the function
$$
+: \mathbb{N}/_\sim \times \mathbb{N}/_\sim \to \mathbb{N}/_\sim.
$$
Definition (1) is meant to be a shortcut (as a programmer you could call it syntactic sugar) for the following indirection defintion:

(2) $+$ is the unique function, so that for every $a, b \in \mathbb{N}$ the following holds: $[a]_\sim + [b]_\sim = [a+b]_\sim$.

For this definition to be well-defined you need to prove two things:

Existence of such a function
Uniqueness of it

However, such a function cannot exist as Henning Makholm's answer demonstrates.
Going deeper and uncovering the 'hidden' problems
You would see the problem more easily if you tried to define $+$ in a direct way:

(3) Let $x, y \in \mathbb{N}/_\sim$. ... Then set $\mathbb{N}/_\sim \ni z = \cdots$ We set $x + y = z$.

How would you construct the "…" part to match the attempted definition above? You could say:

(4) Let $x, y \in \mathbb{N}/_\sim$. Let $a \in x, b \in y$. Then set $\mathbb{N}/_\sim \ni z = [a + b]_\sim.$. 

Here you can see that the definition of $z$ might depend on the choice of $a$ and $b$. Even if that was not true, you would need to prove that $x, y \neq \emptyset$.
Even in the attempted definition (4) the problem is well-hidden, you could say. Let us remove the boilerplate and remind us what a function really is:

If $X, Y$ are sets, then the relation $f \subseteq X \times Y$ is called a function $f: X \to Y$ $:\Leftrightarrow$

$f$ is a left-total relation: $\forall x \in X\ \exists y \in Y. (x, y) \in f$
$f$ is a right-unique relation: $\forall (x, y) \in f\ \exists_1 z \in B. (x, z) \in f$


With $+$ being intended to be a function $+: \mathbb{N}/_\sim \times \mathbb{N}/_\sim \to \mathbb{N}/_\sim$ in mind, we can now attempt definition

(5) $+$ is the function $\{\left((a, b), c\right) \in (\mathbb{N}/_\sim \times \mathbb{N}/_\sim) \times \mathbb{N}/_\sim\, |\, [c]_\sim = [a + b]_\sim \}$.

It still needs to be proved that the given set is indeed a function. Which property of it will be violated?
Spoiler:

 The set is not right-unique as Henning Makholm's answer demonstrates.

In summary, sometimes, operating only on the high-level thinking can easily lead to unforeseen and skipped-over problems.
Well-definedness in other areas
This problem is not restricted to equivalence classes, it always appears if one uses such an indirect definition. For example,

let the exponential function $\mathrm{exp}: \mathbb{R} \to \mathbb{R}$ be the unique function so that $\forall x, y \in \mathbb{R}. f(x + y) = f(x)f(y)$.

Is $\mathrm{exp}$ well-defined?
Spoiler:

 No, uniqueness is violated. This equation is satisfied by all exponential functions. For instance, apart from the obvious $x \mapsto e^x$ solution, $x \mapsto 3^x$ also satisfies the equation: $3^{x+y} = 3^x 3^y$.

 Indeed, one needs some more properties, so that uniqueness is guaranteed:

 The exponential function $\mathrm{exp}: \mathbb{R} \to \mathbb{R}$ is the unique Lebesgue-measurable function with $f(1) = e$, so that $\forall x, y \in \mathbb{R}. f(x + y) = f(x)f(y)$.
 Source: https://en.wikipedia.org/wiki/Characterizations_of_the_exponential_function
 Original source: Hewitt and Stromberg, Real and Abstract Analysis (Springer, 1965), exercise 18.46