In this chapter, we study relations and functions, which are two of the most central ideas in mathematics. Informally, a function f is a rule that takes each object x in some set of inputs and transforms it into a new object y = f(x) in some set of outputs. A key point is that for every allowable input x, there must exist exactly one output y assigned to this x by the function. One of our main goals is to translate this informal description into a formal definition within set theory. To do so, we first define and study relations, which can be regarded as generalizations of functions in which each input x can be associated with more than one output, or perhaps no outputs at all. Many important mathematical concepts — including functions, partial orders, and equivalence relations — can be developed within the unifying general framework of relation theory.