9
$\begingroup$

Let A be a set of finite elements.

$A=\{1,2,3,4,5\}$

If I want to remove one element and show I removed one element, how should I do?

Pseudo mathematical notation:

$A - \{2\} = \{1,3,4,5\}$

Thank you very much!

n

  • 9
    People often prefer to write $A\setminus\{2\}$ or $A \smallsetminus \{2\}$ to simply $A -\{2\}$ but what you wrote is fine. [See here](http://en.wikipedia.org/wiki/Complement_(set_theory)) for example where `\setminus` $\setminus$ is used.2011-09-18
  • 3
    Why is your notation *psuedo*-mathematical?2011-09-18
  • 2
    i thought it wasn't mathematical enough to be mathematical2011-09-18
  • 0
    Somehow, the previous comments sound like a Zen koan.2011-09-18
  • 0
    This is a case where you stumbled onto acceptable terminology. But even if you hadn't you can always write "For the purpose of this exercise I am going to define the notation A - B where A and B are sets as ...."2015-11-16
  • 0
    I have the impression that people prefer A/B, or other, to A - B as in *some* instances A - B *might* be defined as {x = a - b| a in A and b in B} (although when they *do* mean it in that way, they usually define it as such explicitly).2015-11-16

1 Answers 1

7

Your notation above is actually used in set theory.

In general if you have two sets $A$ and $B$, the difference $A - B$ is the set

$A - B = \{x \in A : x \notin B\}$

Also, note that $\{1, 2, 3, 4, 5\} - \{2, 6\} = \{1,3,4,5\}$. $B$ need not be a subset of $A$.

  • 7
    One reason to prefer $A \setminus B$ is that I've also seen $A - B$ occasionally used for the set $\{a-b: a \in A, b \in B\}$. That is, by that definition $\{1,2,3,4,5\} - \{2,6\} = \{-5,-4,-3,-2,-1,0,1,2,3\}$. Of course, there's no problem as long as you explain which definition you're using, but $A \setminus B$ avoids that ambiguity completely.2011-09-18