# 3: Sets, Functions, and Relations

- Page ID
- 9685

We deal with the complexity of the world by putting things into categories. There are not just hordes of individual creatures. There are dogs, cats, elephants, and mice. There are mammals, insects, and fish. Animals, vegetables, and minerals. Solids, liquids, and gases. Things that are red. Big cities. Pleasant memories.... Categories build on categories. They are the subject and the substance of thought. In mathematics, which operates in its own abstract and rigorous world, categories are modelled by sets . A set is just a collection of elements. Along with logic, sets form the ‘foundation’ of mathematics, just as categories are part of the foundation of day-to- day thought. In this chapter, we study sets and relationships among sets. And, yes, that means we’ll prove theorems about sets!

- 3.1: Basic Concepts
- A set is a collection of elements. A set is defined entirely by the elements that it contains. An element can be anything, including another set. You will notice that this is not a precise mathematical definition. Instead, it is an intuitive description of what the word ‘set’ is supposed to mean: any time you have a bunch of entities and you consider them as a unit, you have a set. Mathematically, sets are really defined by the operations that can be performed on them.

- 3.2: 4.2 The Boolean Algebra of Sets
- Set theory is closely related to logic. The intersection and union of sets can be defined in terms of the logical ‘and’ and logical ‘or’ operators.