What, exactly, is a function? The intuitive idea of a “law that turns an input into an output” needs to be made precise: the heart of the definition is the uniqueness of the image. From this arise the three sets that accompany every function — domain, codomain and image — and the distinction, often overlooked, between the destination environment and the values actually taken.