6.1 Definitions
Before we can start working with functions, we need to give a precise mathematical definition.
Let \(X=\{1,2,3\}\) and \(Y=\{4,5,6\}\). Then \[X\times Y=\{(1,4),\,(1,5),\,(1,6),\,(2,4),\,(2,5),\,(2,6),\,(3,4),\,(3,5),\,(3,6)\},\] \[Y\times X=\{(4,1),\,(4,2),\,(4,3),\,(5,1),\,(5,2),\,(5,3),\,(6,1),\,(6,2),\,(6,3)\}.\]
Note that \(X\times Y \neq Y \times X\).Let \(X,Y\) be non-empty sets. A function \(f\) from \(X\) into \(Y\), denoted by \(f:X\to Y\), is a set \(f\subseteq X\times Y\) which satisfies that for each element \(x\in X\) there exists exactly one element \(f(x)\in Y\) such that \((x,f(x))\in f\). That is, \[f=\{(x,f(x)):\ x\in X\ \}\subseteq X\times Y.\]
Symbolically, we have \(f\subseteq X \times Y\) is a function if \(\forall x \in X, \exists! y \in Y\) such that \((x,y)\in f\) (or \(y = f(x)\)).We negate the above statement to say that, symbolically, \(f \subseteq X\times Y\) is not a function if \(\exists x \in X\) such that \(\forall y \in Y, (x,y)\notin f\), or, \(\exists x \in X\) such that \(\exists y_1,y_2 \in Y\) such that \((x,y_1)\in f, (x,y_2) \in f\) and \(y_1\neq y_2\).
In other words, \(f \subseteq X\times Y\) is not a function if there is \(x\in X\) such that either \((x,y)\notin f\) for all \(y\in Y\), or there exists two distinct \(y_1,y_2\in Y\) with \((x,y_1),(x,y_2)\in f\).
Consider \(f:X\to Y\) and let \(A\subseteq X\). Then, the image of \(A\) under \(f\) is denoted by \[f[A] = \{f(x):x \in A\} = \{y \in Y: \exists x \in A \text{ with } y=f(x)\}.\]
We have \(f[\emptyset] = \emptyset\).
The word function comes from the Latin functus which is a form of the verb meaning “to perform”. A function can be thought as a set of operations that are performed on each values that are inputed. Interestingly, the word function (which was first introduced by Gottfried Leibniz (German mathematician, 1646 - 1716) ) was used for maps that returned more than one output for the same input. It was only in the later half of the 20th century that a function was restricted to “exactly one output for each input”.
The word domain comes from the Latin domus which means “house, home”. The domain is the place where all the inputs of \(f\) live in. Another way to look at it is, the word domus gave the word dominus which means “lord, master”, the person that ruled the house (i.e., a domain is the property owned by a Lord). The domain of a function is the set of all the \(x\) that \(f\) has “control over”.Define \(f:\mathbb{Z}\times\mathbb{Z}\to\mathbb{Z}\) by \(f((m,n))=n^2\), for all \(m,n\in\mathbb{Z}\). We have \(\mathbb{Z}\times \mathbb{Z}\) is the domain of \(f\), while \(\mathbb{Z}\) is the codomain. The image of \(f\) is \(\{n^2: n\in\mathbb{Z}\}\) (i.e., the square numbers).
Now, let \(A=\{(m,n):m,n\in\mathbb{Z}, n=2m \}\). Note that \(A=\{(m,2m): m\in\mathbb{Z} \}.\) The image of \(A\) under \(f\) is \[\begin{align*} f[A]&=\{f((m,n)): (m,n)\in A \}\\ &=\{f((m,2m)): m\in\mathbb{Z} \}\\ &=\{(2m)^2: m\in\mathbb{Z} \}\\ &=\{4m^2: m\in\mathbb{Z} \}. \end{align*}\]Consider \(f:X\to Y\) and \(g:X\to Y\). Then \(f=g\) if and only if \(f(x)=g(x)\) for all \(x\in X\).
We prove both implication separately.
\(\Rightarrow\)). First, suppose that \(f=g\). Take (arbitrary) \(x\in X\) and choose (the unique) \(y\in Y\) such that \((x,y)\in f\). Then \((x,y)\in g\) (since \(f=g\)) and by definition \(f(x)=y=g(x)\). This is true for all \(x\in X\), so it follows that \(f(x)=g(x)\) for every \(x\in X\).
\(\Leftarrow\)). Second, suppose that \(f(x)=g(x)\) for all \(x\in X\). Then \[f=\{(x,f(x)): x\in X \}=\{(x,g(x)): x\in X \}=g.\]
It follows that \(f=g\) if and only if \(f(x)=g(x),\) for all \(x\in X\).□
Notice that in this proof (and all others) that the correct punctuation follows each equations, whether they are in-line or own their own (displayed). Maths should be read as part of a grammatically correct sentence. For example “Consider \(f:X\to Y\) and \(g:X\to Y\)” reads “Consider \(f\) a function from \(X\) to \(Y\) and \(g\) a function from \(X\) to \(Y\)”, or “then \(f=\{(x,f(x)): x\in X \}=\{(x,g(x)): x\in X \}=g.\)” reads as “then \(f\) is equal to the set of pairs \((x,f(x))\) where \(x\) is in \(X\) which is equal to….”.
It is for this reason that we should not start a sentence with maths symbol.□