Proofs With Functions: 1 Recap
Proofs With Functions: 1 Recap
Margaret M. Fleck
23 Feb 2009
1 Recap
Recall that a function f : A → B is one-to-one (injective) if
∀y ∈ B, ∃x ∈ A, f (x) = y
1
We know that f (x) = f (y). So, substituting in our formula for f ,
3x + 7 = 3y + 7. So 3x = 3y and therefore x = y, by high school
algebra. This is what we needed to show.
When we pick x and y at the start of the proof, notice that we haven’t
specified whether they are the same number or not. Mathematical convention
leaves this vague, unlike normal English where the same statement would
strongly suggest that they were different.
You may have encountered the abbreviation QED at the end of a proof.
This stands for “quod erat demonstrandum” which is simply the Latin for
“this is what we needed to show.” Some people put a little box or a little
triangle of 3 dots at the end of the proof. It’s good style to have something
at the end of your proof which tells the reader that the proof is complete.
2
4 Composing two functions
Suppose that f : A → B and g : B → C are functions. Then g ◦ f is the
function from A to C defined by (g ◦ f )(x) = g(f (x)). Depending on the
author, this is either called the composition of f and g or the composition of
g and f . The idea is that you take input values from A, run them through
f , and then run the result of that through g to get the final output value.
Take-home message: when using function composition, look at the au-
thor’s shorthand notation rather than their mathematical English, to be
clear on which function gets applied first.
In this definition, notice that g came first in (g ◦ f )(x) and g also comes
first in g(f (x)). I.e. unlike f (g(x)) where f comes first. The trick for
remembering this definition is to remember that f and g are in the same
order on the two sides of the defining equation.
For example, if we use our functions f and g defined above, the domains
and co-domains of both functions are the integers. So we can compose the
two functions in both orders.
Claim 3 For any sets A, B, and C and for any functions f : A → B and
g : B → C, if f and g are injective, then g ◦ f is also injective.
3
We can prove this with a direct proof, by being systematic about using our
definitions and standard proof outlines. First, let’s pick some representative
objects of the right types and assume everything in our hypothesis.
Now, we need to apply the definition of function composition and the fact
that f and g are each injective: