If A and B are sets, then a function f from A to B, written , is a rule that associates to each element x in A a unique element denoted f(x) in B. The element f(x) is called the image of x (under f), and x is called a preimage of f(x) (under f). If , then A is called the domain of f, B is called the codomain of f, and the set is called the range of f. Note that the range of f is a subset of B. If , we denote by f(S) the set of all images of elements of S. Likewise, if , we denote by the set of all preimages of elements in T. Finally, two functions and are equal, written , if for all .
Suppose that . Let