# Set Equations using distributive law

So, I was writing equations for sets and I noticed something

$$A \cup ( A \cap B) = (A \cup A) \cap (A \cup B) = A \cap (A \cup B) = A$$

This makes sense, can be proven by the distribution law and checks out in the Venn diagram. But this however,

$$A \cup ( A \setminus B) = (A \cup A) \setminus (A \cup B) = A \setminus (A \cup B) = \emptyset ?$$

If I approach this equation using a Venn diagram the answer I get is $$A$$ and if I use the distributive law I get null ? Can someone explain what I am doing wrong here or does distributive laws not apply to $$\setminus$$ ?

• Correct, distributivity doesn't work that way with $\setminus$.
– J.G.
Commented Aug 18, 2022 at 13:25
• You can replace $A\setminus B$ with $A\cap B^c$. You get $A\cup (A\setminus B) = A\cup (A\cap B^c) = A$ with the final equality being just an application of your first property you proved. Commented Aug 18, 2022 at 13:32
• Thanks for your help ! I did not think of that. Commented Aug 18, 2022 at 13:33

The distributive law can't be used for the set difference operation, denoted by the $$\setminus$$ symbol.
$$A \cup ( X \setminus Y) = (A \cup X) \setminus (A \cup Y)$$ fails given the choices $$A=\{1,2\},\,X=\{1\},\,Y=\{1,2,3\}.$$