Functions on sets
A function or mapping is a relationship between one set (called the domain) and another set (called the range). To each element of the domain is assigned an element of the range. For example:- The function Score assigns a test scores to each member of the set Students = {JohnBrown, JaneDoe, JamesChen, ...}.
- The domain of the function Score is Students and the range is Scores = [0, 100].
- Score: Students → [0, 100]
- Score(JohnBrown) = 90, Score(JaneDoe) = 90.2, ...
If x is a variable over X, we also say f is a function of x. For each element x in the domain, we write f(x) for the element of the range that is assigned to that value x.