3.5: Proof by Contradiction
The first proofs we worked started with the condition, applied definitions, and previous theorems, one by one until we arrived at the conclusion. These are called direct proof. Now we will look at the first alternate. In these proofs we begin by supposing our conclusion is wrong and then applying definitions and previous theorems one by one until we run into a problem.
First proof using contradiction
For two mappings \(g:A \to B\) and \(f:B \to C\), the composition of those mappings, denoted \(f \circ g\), is the mapping \(h:A \to C\) defined by \(h(x)=f(g(x))\)
If the mappings \(g:X \to Y\) and \(f:Y \to Z\) are functions, then the composition \(h(x)=f(g(x))\) is a function.
- Proof
-
First we show that for each element of the domain there exists an element in the codomain to which it is mapped. Let \(x \in X\). Because gg is a function there exists a \(y \in Y\) such that \(g(x)=y\) Because ff is a function, there exists a \(z \in Z\) such that \(f(y)=z\). This means for all \(x \in X\) there exists a \(z \in Z\) such that \(h(x)=z\).
Second we show that each element of the domain is mapped to a unique element of the codomain. Suppose for sake of contadiction that there exists \(x \in X\) such that \(h(x)=z_1\) and \(h(x)=z_2\). This means that \(f(g(x))=z_1\) and \(f(g(x))=z_2\). Because gg is a function there exists a unique \(y \in Y\) such that \(g(x)=y\). Thus \(f(y)=z_1\) and \(f(y)=z_2\). But this contradicts that ff is a function which maps an element of the domain to a unique element of the codomain.
Thus the composition of two functions is a function.