Recall that \(A\) is a subset of \(B\) (written \(A\subseteq B\)) if every element \(x\in A\) is also an element of \(B\text{.}\) When a set is defined as a subset of another set with a given property, we often use βset builderβ notation, such as
for defining the even numbers. If a set has no elements, such as
\begin{equation*}
\setof{\text{episodes } E \text{ of}\textit{ Andor}}{E\text{ is bad}},
\end{equation*}
we call it the empty set, \(\emptyset\text{.}\) The familiar intersection (\(\cap\)) and union (\(\cup\)) operators are very useful. Recall that \(A\subsetneq B\) means that \(A\) is a subset of \(B\) and \(A\ne B\text{.}\) Finally, we define \(A\setminus B\) to be the set of all elements in \(A\) which are not in \(B\text{.}\)
More interestingly, we can define infinite combinations of these things, if we have a collection of sets \(X_\alpha\text{,}\) one for each element \(\alpha \in A\text{,}\) where \(A\) is an infinite set.
A function from a set \(A\) to a set \(B\) is a subset \(f\) of the Cartesian product \(A\times B\) such that there is precisely one \((a,b)\in f\) for each \(a\in A\text{.}\) We call \(A\) the domain, and say that \(f(a) = b\) if \((a,b)\in f\text{.}\) There is no standard name for \(B\text{,}\) but if you insist on having one, use codomain. We write \(f : A\to B\text{.}\)
Note that DefinitionΒ 13 means that \(A\) and \(B\) are inextricably part of the definition of a function. The rule for determining the output for a given input is only part of the story.
Suppose that \(f : A\to B\) is given by \(f(x) = x^2\text{,}\) where \(A = B = \Z\text{.}\) Explain why \(f\) is neither one-to-one nor onto. Then, change \(A\) or \(B\) so that it is one-to-one. Finally, find a way to change it to be onto.
Notice that the preimage exists whether or not the inverse function exists (and the notation \(f^{-1}\) refers only to the preimage in this course). We call the image of the entire domain the image of the function, \(f(A)\text{.}\)