# Set builder notation for pairs?

I have a set $S$ of integers. I want to select the element pairs $(i,j)$ of it such that $i=2*j$ and order of elements does not matter. How can I show it with the set builder notation ?

$\{\ (i,j)\ |\ i \in S\ \;and\;\ j \in S\; \ and\;i=2*j\}$ Is it correct and are there any ways to achieve this? Thanks in advance.

• Why not simply $$\{(2i,i) \mid i \in S\}$$? – Clement C. Aug 6 '18 at 22:32
• @ClementC. What if $2i\notin S$ – Don Thousand Aug 6 '18 at 22:33
• @RushabhMehta Good point. Then it's a bit less nice, indeed: $$\{(2i,i) \mid i \in S\}\cap S^2$$ – Clement C. Aug 6 '18 at 22:34
• More, that both are in the set S: $~\{(2j,j): j\in S, 2j\in S\}$ – Graham Kemp Aug 6 '18 at 22:34
• @ClementC. I wouldn't really call that set builder notation – Don Thousand Aug 6 '18 at 22:34

$\{\ (i,j)\ |\ i \in S\ \;and\;\ j \in S\; \ and\;i=2*j\}$ Is it correct and are there any ways to achieve this? Thanks in advance.
That is okay, although the use of words should be discouraged, and it can be compacted a bit more.   Any of the following should be acceptable: $${\{(i,j)\mid i\in S, j\in S, i=2j\}\\\{(2j,j)\mid j\in S, 2j\in S\}\\\{(i,j) \in S^2 \mid i= 2 j \} \\\{(2j,j)\in S^2\}}$$
It's better if you write: $\{(i,j) \in S^2| i= 2*j \}$
• I don't think including $\in S$ in the left part of the set builder notation is considered appropriate, but I am not too knowledgeable on the subject. – Don Thousand Aug 6 '18 at 22:45
• @RushabhMehta It should be $\in S^2$, otherwise it is correctly placed. $~\{(i,j) \in S^2 \mid i= 2\cdot j \}$ says: the set of pairs, $(i,j)$, drawn from the Cartesian square of $S$ such that $i$ equals twice $j$. – Graham Kemp Aug 6 '18 at 22:49
• It should be $\in S^2$. And @RushabhMehta it is appropriate to put $\in$ there(some would even say it should be there) as without it it is not guarantee to be a set – ℋolo Aug 6 '18 at 22:51