In set theory, the complement of a set, often denoted by
A\complement
When all elements in the universe, i.e. all elements under consideration, are considered to be members of a given set, the absolute complement of is the set of elements in that are not in .
The relative complement of with respect to a set, also termed the set difference of and, written
B\setminusA,
If is a set, then the absolute complement of (or simply the complement of) is the set of elements not in (within a larger set that is implicitly defined). In other words, let be a set that contains all the elements under study; if there is no need to mention, either because it has been previously specified, or it is obvious and unique, then the absolute complement of is the relative complement of in :[3]
The absolute complement of is usually denoted by
A\complement
\overlineA,A',
\complementUA,and\complementA.
Let and be two sets in a universe . The following identities capture important properties of absolute complements:
\left(A\cupB\right)\complement=A\complement\capB\complement.
\left(A\capB\right)\complement=A\complement\cupB\complement.
Complement laws:
A\cupA\complement=U.
A\capA\complement=\empty.
\empty\complement=U.
U\complement=\empty.
IfA\subseteqB,thenB\complement\subseteqA\complement.
(this follows from the equivalence of a conditional with its contrapositive).
Involution or double complement law:
\left(A\complement\right)\complement=A.
Relationships between relative and absolute complements:
A\setminusB=A\capB\complement.
(A\setminusB)\complement=A\complement\cupB=A\complement\cup(B\capA).
Relationship with a set difference:
A\complement\setminusB\complement=B\setminusA.
The first two complement laws above show that if is a non-empty, proper subset of, then is a partition of .
If and are sets, then the relative complement of in,[5] also termed the set difference of and,[6] is the set of elements in but not in .The relative complement of in is denoted
B\setminusA
B-A,
b-a,
Formally:
\{1,2,3\}\setminus\{2,3,4\}=\{1\}.
\{2,3,4\}\setminus\{1,2,3\}=\{4\}.
R
Q
R\setminusQ
See also: List of set identities and relations and Algebra of sets.
Let,, and be three sets. The following identities capture notable properties of relative complements:
C\setminus(A\capB)=(C\setminusA)\cup(C\setminusB).
C\setminus(A\cupB)=(C\setminusA)\cap(C\setminusB).
C\setminus(B\setminusA)=(C\capA)\cup(C\setminusB),
with the important special case
C\setminus(C\setminusA)=(C\capA)
(B\setminusA)\capC=(B\capC)\setminusA=B\cap(C\setminusA).
(B\setminusA)\cupC=(B\cupC)\setminus(A\setminusC).
A\setminusA=\emptyset.
\empty\setminusA=\empty.
A\setminus\empty=A.
A\setminusU=\empty.
A\subsetB
C\setminusA\supsetC\setminusB
A\supseteqB\setminusC
C\supseteqB\setminusA
R
X x Y.
\bar{R}
R
X x Y.
R
R
X,
Y.
aRb
a,
b.
R
Together with composition of relations and converse relations, complementary relations and the algebra of sets are the elementary operations of the calculus of relations.
See also: List of mathematical symbols by subject.
In the LaTeX typesetting language, the command \setminus
[7] is usually used for rendering a set difference symbol, which is similar to a backslash symbol. When rendered, the \setminus
command looks identical to \backslash
, except that it has a little more space in front and behind the slash, akin to the LaTeX sequence \mathbin{\backslash}
. A variant \smallsetminus
is available in the amssymb package, but this symbol is not included separately in Unicode. The symbol
\complement
C
\complement
. (It corresponds to the Unicode symbol .)