Define a binary relation $R$ on a set $A$ by saying $xRy$ iff $x$ and $y$ have the same whatever.
"Whatever" is of course some specified function on $A$.
This is a "trivial" equivalence relation: you specify it in effect by specifying the partition of the set $A$.
Define another binary relation $S$ on $A=\{\ldots,-3,-2,-1,0,1,2,3,\ldots\}$ by saying $xSy$ iff $x-y$ is a multiple of $3$.
Undergraduates who haven't thought about this do not instantly say "Oh, I see: $xSy$ iff $x$ and $y$ leave the same remainder on division by $3$." Instead they go through proving reflexiveness, symmetry, and transitivity from the definition. In proving transitivity they ask whether $x-y$ is a multiple of $3$ and $y-z$ is a multiple of $3$ implies $x-z$ is a multiple of $3$, and they may have to think about it before they come up with $x-z=(x-y)+(y-z)$. After all, what would possess anyone to subtract $y$ only to instantly add it back in again?
So this is a "nontrivial" equivalence relation in that one doesn't instantly specify the partition of $A$, and proving the three properties requires some algebra rather than just knowing the definition of the three properties or knowing which partition is used. In fact, after they've proved the three properties it's not obvious until they think further just what the partition is. But on the other hand, it's trivial in that they can do the algebra without having abstruse ideas in algebra appear to be what the problem is all about.
What other examples of this sort are there, suitable as exercises in a class where the idea of equivalence relations is first introduced?
In other words, examples are sought in which
- Reflexiveness, symmetry, and transitivity will not be obvious in virtue of the relation having been defined by saying what the set-partition is;
- Proving those three properties takes more work that merely chasing the definitions of those three properties;
- But proving them isn't so hard that that becomes the hard part of the problem;
- After they've proved them, they still have to do some further thought to figure out what the partition is.
Later edit: I'd like things that are usable in a course I'm teaching, whose only prerequisite is first-semester calculus, which is not actually used. I can't use concepts that would take substantial time to develop.