# Set Theory

## Set Difference

### Terms

- set difference,
*n.*
- (
*sets*) The difference of sets A and B is
the set of all elements of A
which are not also elements of B.
Symbolically,

A - B = {x|x ∈ A ∧ x ¬in B}
- relative complement,
*n.*
- (
*math*) See set difference.

### Symbols

- -
- (
*sets*) set difference
- \
- (
*sets*) set difference

### Venn Diagram

### Closure

- set difference
- The set of sets is closed under set difference.
That is, the difference of two sets is a set.

### Associativity

- set difference
- Difference of sets is
**not** associative:
that is, in general, for sets A, B, and C,

(A - B) - C ≠ A - (B - C)

### Commutativity

- set difference
- Difference of sets is
**not** Commutative:
that is, in general for sets A and B,

A - B ≠ B - A

### Identities

- set difference
- The empty set, ∅, is a right identity for set difference.
that is, in general, for set A,

A - &empty = A
- There is no left identity for set difference.

### Idempotency

- set difference
- Sets are
**not** idempotent under difference:
that is, in general, for set A,

A - A = ∅ ≠ A

### Terms

- set difference,
*n.*
- (
*sets*) The difference of sets A and B is
the set of all elements of A
which are not also elements of B.
Symbolically,

A - B = {x|x ∈ A ∧ x ¬in B}
- relative complement,
*n.*
- (
*math*) See set difference.

### Notation

- The difference of two sets A and B is denoted by
`-` or `\`:

`{a, b} - {b, c} = {a}`

`{a, b} \ {b, c} = {a}`

### Remarks

- Difference is a binary operation.
- The difference of sets A and B, A - B, is also referred to as
the relative complement of B in A.

### Reference Links

### External Links