Venn diagram
A Venn diagram is a visual way of representing the mathematical relationship between sets.
Two Set Example
The following diagram is a Venn diagram for sets and
:
The red region contains all the elements that are in only. The blue region contains all the elements that are in
only. The black region contains all the elements in both
and
which is called the intersection of
and
, denoted
. The red, black, and blue regions together represent the elements that are in
,
, or both. This is called the union of
and
, denoted
.
If we consider the region bounded by the rectangle to be the universal set, then the gray area is called the complement of -- that is, the things which are neither in
nor in
.
All of this information can be summarized in the following table:
Region (by color) | Description | Notation |
---|---|---|
Red | elements in ![]() |
![]() |
Blue | elements in ![]() |
![]() |
Black | elements in both ![]() ![]() |
![]() |
Gray | elements in neither ![]() ![]() |
![]() |
or ![]() | ||
or ![]() | ||
or ![]() |
Three Set Example
The following diagram is a Venn diagram for the sets and
.
The following table describes the various regions in the diagram:
Region (by color) | Description | Notation |
---|---|---|
Blue | elements in ![]() |
![]() |
Yellow | elements in ![]() |
![]() |
Red | elements in ![]() |
![]() |
Green | elements in both ![]() ![]() ![]() |
![]() |
Orange | elements in both ![]() ![]() ![]() |
![]() |
Purple | elements in ![]() ![]() ![]() |
![]() |
Black | elements in ![]() ![]() |
![]() |
Gray | elements in neither ![]() ![]() |
![]() |
or ![]() | ||
or ![]() | ||
or ![]() |
Using Venn Diagrams
Venn diagrams are very useful for organizing data. In particular, the Principle of Inclusion-Exclusion can be explained for small cases nicely using them.