$\newcommand{\ms}{\mathscr}$Equivalence relations and partitions are very intimately related; indeed, it’s fair to say that they are two different ways of looking at basically the same thing.
Start with a set $A$. A partition $\ms P$ of $A$ is just a way of chopping $A$ up into pieces. More formally, it’s a collection of subsets of $A$ with a very simple property: every element of $A$ belongs to exactly one of the sets in $\ms P$. This is often expressed in a slightly more roundabout fashion: a collection $\ms P$ of non-empty subsets of $A$ is a partition of $A$ if
- $A=\bigcup_{P\in\ms P}P$, and
- if $P_1,P_2\in\ms P$ and $P_1\ne P_2$, then $P_1\cap P_2=\varnothing$, i.e., the members of $\ms P$ are pairwise disjoint.
The first of these conditions says that each element of $A$ belongs to at least one member of $\ms P$, and the second says that no element of $A$ belongs to more than one member of $\ms P$; put the two together, and you get my original definition.
We can use the partition $\ms P$ to define an associated relation $\overset{\ms P}\sim$ on $A$: for any $x,y\in A$, $x\overset{\ms P}\sim y$ if and only if $x$ and $y$ are in the same piece of the partition $\ms P$. For instance, if $A$ is a set of people, we can partition them according to their ages: the $20$-year-olds are one piece of the partition, the $50$-year-olds are another, and so on. The associated relation is simply has the same age as: $x\overset{\ms P}\sim y$ if and only if $x$ and $y$ are the same age. It’s easy to see in this case that $\overset{\ms P}\sim$ is an equivalence relation $-$ reflexive, symmetric, and transitive $-$ and it’s not hard to prove that this is always the case: if $\ms P$ is a partition of a set $A$, then $\overset{\ms P}\sim$ is an equivalence relation on $A$.
Now what are the equivalence classes of this relation $\overset{\ms P}\sim$? Fix $a\in A$. The equivalence class of $a$ is by definition $\{x\in A:a\overset{\ms P}\sim x\}$. But $a\overset{\ms P}\sim x$ just means that $a$ and $x$ are in the same piece of the partition $\ms P$, so $x$ is in the equivalence class of $a$ if and only if is in the same piece as $a$. In other words, the equivalence class of $a$ is the piece of $\ms P$ that contains $a$. And this is true for every $a\in A$, so the equivalence classes of the relation $\overset{\ms P}\sim$ are exactly the pieces of the partition $\ms P$, the ‘chunks’ into which it divides $A$.
Now set that aside for a moment, and let $R$ be an equivalence relation on $A$. For each $a\in A$ we set $[a]/R=\{x\in A:aRx\}$; this is the equivalence class of $a$, the set of things to which $a$ is related by $R$. It’s a subset of $A$. One of the first things that you prove about equivalence classes is that for any $a,b\in A$, either $aRb$, in which case $[a]/R=[b]/R$, or $a\not Rb$, in which case $[a]/R\cap[b]/R=\varnothing$: any two equivalence classes are either the same set or completely disjoint from each other. In other words, the equivalence classes chop up $A$ into pairwise disjoint pieces, and every element $a$ of $A$ belongs to exactly one of these pieces, namely $[a]/R$.
But this is exactly what it means to say that $A/R$, the collection of all of these equivalence classes, is a partition of $A$: each element of $A$ belongs to exactly one of the sets in the collection $A/R$. Just as a partition $\ms P$ of $A$ gives rise to an associated equivalence relation $\overset{\ms P}\sim$ on $A$, an equivalence relation $R$ on $A$ gives rise to an associated partition $A/R$ of $A$. What happens if we start with the partition $A/R$ and construct its associated equivalence relation $\overset{A/R}\sim$ on $A$? For any $x,y\in A$ we have by definition $x\overset{A/R}\sim y$ if and only if $x$ and $y$ are in the same piece of $A/R$. But the pieces of $A/R$ are the $R$-equivalence classes, so $x$ and $y$ are in the same piece of the partition $A/R$ if and only if $[x]/R=[y]/R$, i.e., if and only if $xRy$. That is, $x\overset{A/R}\sim y$ if and only if $xRy$, and $\overset{A/R}\sim$ and $R$ are exactly the same relation on $A$.
To recapitulate:
Each partition $\ms P$ of $A$ induces an associated equivalence relation $\overset{\ms P}\sim$ on $A$, and each equivalence relation $R$ on $A$ induces an associated partition $A/R$ of $A$ into equivalences classes.
These conversion operations from partition to equivalence relation and vice versa are inverses. If you start with a partition $\ms P$ of $A$, construct the equivalence relation $\overset{\ms P}\sim$ on $A$, and then construct the associated partition $A/\overset{\ms P}\sim$ of $A$, you’re back where you started: $A/\overset{\ms P}\sim=\ms P$. Similarly, if you start with an equivalence relation $R$ on $A$, construct the associated partition $A/R$ of $A$, and then build from that partition its associated equivalence relation $\overset{A/R}\sim$, you get the original relation $R$ back: $\overset{A/R}\sim=R$.
Given some set $X$ and $R$ an equivalence relation on it, what is partitionned is what is called technically the quotient set noted $X/R$ of $X$ by $R$, that is the set of all distinct equivalence classes which can be generated from any element of $X$ with the relation of equivalence.
Consider $R$ as being represented by some binary graph also noted $R$, some subset of $X\times X$. $(x,y)\in R$ meaning $x$ and $y$ are equivalent modulo $R$. For $R$ to be an equivalence on $X$ it has to be represented by an equivalence graph:
(1) $R$ is reflexive $\forall x\in X\ (x,x)\in R$
otherwise stated the diagonal of $X\times X$ belongs also to $R$.
(2) $R$ is symmetrical, i.e. it does not differ from its symetrical graph noted $R^{-1}=\{(y,x)\ s.t.\ (x,y)\in R\}$ otherwise stated $(x,y)\in R \iff (y,x)\in R$.
(3) $R$ is transitive, $R=R\circ R$ the compound graph being defined by $R\circ R=\{(x,z)\ s.t.\ (\exists y)[(x,y)\in R \wedge (y,z)\in R]\}$ otherwise stated $(x,y)\in R \wedge (y,z)\in R \Rightarrow (x,z)\in R$
Now consider one element of $X$ and consider its image $R(\{x\})$ noted
$R(x)$ for short i.e. the set of all elements corresponding to $x$ by the relation: $R(x)=\{y\in X \ s.t.\ (x,y)\in R\}$. It is some cut in the graph $R$ for some fixed $x$ abscissa along $y$ ordinates which is called the class of equivalence of $x$ and is also noted $[x]_R$. $x$ is said to be one representant of the class $[x]_R$ which is a subset of $X$. Now the quotient set $X/R$ is nothing else than the union of all these equivalence classes $X=\bigcup_{x\in X} R(x)$. By construction it is easy to show that two distinct equivalence classes have no element in common: if $x$ and $y$ are not equivalent then $[x]_R\cap [y]_R=\emptyset$. Hence the quotient set $E/R$ can be seen as a disjoint union, i.e. a partition of $X$ into equivalence classes.
What you have to do in your particular example is to find for each ordered pair $x\in X$ its equivalence class $[x]_R$ i.e. the set of all other ordered pairs (including $x$ itself) equivalent to $x$. Then select among these classes only those which are distinct. By symetry you can generate all the equivalence classes considering only half of your elements in $X$ as representants.
$(1,1)\quad [(1,1)]_{R}=\{(1,1)\}$
$(1,2)\quad [(1,2)]_{R}=\{(1,2),(2,1)\}$
$(1,3)\quad [(1,3)]_{R}=\{(1,3),(3,1),(2,2)\}$
$(1,4)\quad [(1,4)]_{R}=\{(1,4),(4,1),(2,3),(3,2)\}$
$(1,5)\quad [(1,5)]_{R}=\{(1,5),(5,1),(2,4),(4,2),(3,3)\}$
$(2,5)\quad [(2,5)]_{R}=\{(2,5),(5,2),(3,4),(4,3)\}$
$(3,5)\quad [(3,5)]_{R}=\{(3,5),(5,3),(4,4)\}$
$(4,5)\quad [(4,5)]_{R}=\{(4,5),(5,4)\}$
$(5,5)\quad [(5,5)]_{R}=\{(5,5)\}$
Best Answer
Yes your idea is the good one. Take any subset of $ X \subseteq A$ (there is only 8 of those) and compute $X \cap B$ (easy!). Then look at the values of $X \cap B$ to find the equivalence classes.
You’ll find
$\overline{\{1\}}=\{\{1\}, \{1,3\}\}$, $\overline{\{2\}}=\{\{2\}, \{2,3\}\}$, $\overline{\emptyset}=\{\emptyset, \{3\}\}$, $\overline{\{1,2\}}=\{\{1,2\}, \{1,2,3\}\}$