How to express difference of sets?

142 Views Asked by At

Suppose I have two sets, $A$ and $B$. Now, which method is more appropriate to express the difference of sets? See below:-

$A - B$ or,

$A\setminus B$

If there's any problem in my question please inform me. Thanks!

2

There are 2 best solutions below

2
On BEST ANSWER

$A\setminus B$ is fully standard. $A-B$ is also widely used, but bears the risk of ambiguity in some contexts as it could also stand for $\{\,a-b\mid a\in A,b\in B\,\}$

0
On

In general the second notation is the less ambiguous. In some contexts $A-B$ can also mean

$$ A-B:=\{a-b \mid a \in A, \ b \in B\} $$