# What is the formalism of category theory to express an equivalence relation?

Say I have an abstract set $X$ (could be points, functions, functors or whatever). Say I have an equivalence relation $R\in X\times X$.

What would be the category-theory way to express $X/R$, that is, the set of subsets of $X$ equivalent by $R$. Or using another formalism, $\{xR^*| x\in X\}\in{\frak P}(X)$.

• Quotients of equivalence relations are a special case of coequalisers. – Zhen Lin Feb 22 '16 at 21:49
• @ZhenLin I feel that category theory is a very powerful tool to express abstract relations, but (shame on me) I could never gain much experience and understanding. Could you pleas explain and make a connection to layman's language? (Or, give a link on where I should look and learn about this?) – Gyro Gearloose Feb 22 '16 at 21:55
• My (selfish) goal is to improve my question here math.stackexchange.com/q/1658608/290307 . – Gyro Gearloose Feb 22 '16 at 21:57

Let $C$ be a category, an equivalence relation defined on the object $X$ is an object $R$ together with a morphism $R\rightarrow X\times X$ such that for every object $Y$ in $C$, $Hom_C(Y,R)\rightarrow Hom_C(Y,X)\times Hom_C(Y,X)$ defines an equivalence relation on $Hom_C(Y,X)$.
If $X$ is a set, and $R\subset X\times X$ an equivalence relation, you can define $f,g:R\rightarrow X$ such that for $(x,y)\in R$, $f(x,y)=x$ and $g(x,y)=y$. The quotient $X/R$ is the coequalizer of $f$ and $g$.