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 only | |
Blue | elements in only | |
Black | elements in both and | |
Gray | elements in neither nor | |
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 only | |
Yellow | elements in only | |
Red | elements in only | |
Green | elements in both and but not | |
Orange | elements in both and but not | |
Purple | elements in and but not | |
Black | elements in and | |
Gray | elements in neither or | |
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.