# Question about set notation regarding removal of elements

Consider the sets \begin{align*} \mathcal{A} &= \{1,2,3,5,7\}\\ \mathcal{B} &= \{2,4,6,8\}\\ \mathcal{R} &= \{2,5\} \end{align*}

I want to remove the elements in $\mathcal{R}$ from $\mathcal{A}$ and $\mathcal{B}$.

Does it make sense to write: \begin{align*} \mathcal{A}\backslash\mathcal{R} &= \{1,3,7\}\\ \mathcal{B}\backslash\mathcal{R} &= \{4,6,8\} \end{align*} even though $\mathcal{B}$ does not contain element $5$? I am asking because I have multiple sets that I want to remove a set of elements from, but I do not know if the sets contain the elements to remove. I cannot think of an alternative notation.

• @Hurkyl Yes, thank you, edited. – jonem Nov 5 '14 at 23:35
• Yeah it's just perfect write it this way! – brick Nov 5 '14 at 23:38

By definition, $X\setminus Y$ is the set of elements that belong to $X$ but not to $Y$.
It is irrelevant whether $Y$ is a subset of $X$ or not.
BTW, the correct TeX macro is \setminus, not \backslash. See also this.
• I've always wondered: is there a historical reason (or a reason at all) to notate the subtraction of sets as $A \setminus B$ instead of just $A-B$? (Also, small edit: "Your notation" instead of "you notation") – Miguelgondu Nov 6 '14 at 0:01
• @Miguelgondu, perhaps to avoid confusion in case subtraction makes sense for elements of $A$ and $B$. For instance, in the real line or in a vector space. But I don't know the historical reason. – lhf Nov 6 '14 at 0:04
This notation is usually shorthand for $B\cap R^c$. So this works fine if you imagine all your sets are subsets of some common set: in this case they're all subsets of $\mathbf{N}$ the natural numbers. It's also possible to write $B\setminus (R\cap B)$ if the situation worries you.