Open and closed equivalence relations

I am looking for canonical examples of open and closed equivalence relations, especially ones that are generated by a continuous functions. Intuitively I think that an open /closed continuous function $f:X \rightarrow Y$ should also generate a closed/open equivalence relation by $x R y :\Leftrightarrow f(x)=f(y)$. Is this true? Or are there other ways to construct typical candidates of such relations by using continuous functions?

• I didn't know this terminology, so I looked it up in Bourbaki's General topology, Ch I. §5.2: An equivalence relation $R$ on $X$ is called open (or closed) when the quotient map $X \to X/R$ is open (or closed). Proposition 3 answers your question. – Martin Brandenburg Jul 20 '14 at 11:40
• Do you mean by an open equivalence relation an open subset of $X\times X$ ? – Stefan Hamcke Jul 20 '14 at 11:53
• an equivalence relation is open if $\pi : X \rightarrow X/R$ is an open map. – user159356 Jul 20 '14 at 14:53

Every $G_\delta$ equivalence relation $E$ on a standard Borel space $X$ is so called smooth, which means that there is a Borel function $f : X \rightarrow X$ such that $x \ E \ y$ if and only if $f(x) = f(y)$.
All closed and open sets are $G_\delta$ hence if you weaken continuous function to Borel functions, in some sense the method you described above is the only way to get such equivalence relations.