# Complement (set theory)

 related topics {math, number, function} {math, energy, light} {law, state, case}

In set theory, a complement of a set A refers to things not in (that is, things outside of), A. The relative complement of A with respect to a set B, is the set of elements in B but not in A. When all sets under consideration are considered to be subsets of a given set U, the absolute complement of A is the set of all elements in U but not in A.

## Contents

### Relative complement

If A and B are sets, then the relative complement of A in B, also known as the set-theoretic difference of B and A, is the set of elements in B, but not in A.

The relative complement of A in B is denoted B ∖ A according to the ISO 31-11 standard (sometimes written B − A, but this notation is ambiguous, as in some contexts it can be interpreted as the set of all b − a, where b is taken from B and a from A).

Formally

Examples:

• {1,2,3} ∖ {2,3,4}   =   {1}
• {2,3,4} ∖ {1,2,3}   =   {4}
• If $\mathbb{R}$ is the set of real numbers and $\mathbb{Q}$ is the set of rational numbers, then $\mathbb{R}\setminus\mathbb{Q}$ is the set of irrational numbers.

The following proposition lists some notable properties of relative complements in relation to the set-theoretic operations of union and intersection.

PROPOSITION 2: If A, B, and C are sets, then the following identities hold:

• C ∖ (A ∩ B)  =  (C ∖ A)∪(C ∖ B)
• C ∖ (A ∪ B)  =  (C ∖ A)∩(C ∖ B)
• C ∖ (B ∖ A)  =  (A ∩ C)∪(C ∖ B)
• (B ∖ A) ∩ C  =  (B ∩ C) ∖ A  =  B∩(C ∖ A)
• (B ∖ A) ∪ C  =  (B ∪ C) ∖ (A ∖ C)
• A ∖ A  =  Ø
• Ø ∖ A  =  Ø
• A ∖ Ø  =  A

### Absolute complement

If a universe U is defined, then the relative complement of A in U is called the absolute complement (or simply complement) of A, and is denoted by Ac or sometimes A′, also the same set often is denoted by $\complement_U A$ or $\complement A$ if U is fixed, that is: