f : X → Y and g: Y → Z
Now we have to show:
If gof is one-to-one then f must be one-to-one.
Given:
gof is one-to-one
To prove:
f is one-to-one.
Proof:
Let us assume that f(x) is not one-to-one .
This means that there exist x and y such that x≠y but f(x)=f(y)
On applying both side of the function by the function g we get:
g(f(x))=g(f(y))
i.e. gof(x)=gof(y)
This shows that gof is not one-to-one which is a contradiction to the given statement.
Hence, f(x) must be one-to-one.
Let A={1,2,3,4} B={1,2,3,4,5} C={1,2,3,4,5,6}
Let f: A → B
be defined by f(x)=x
and g: B → C be defined by:
g(1)=1,g(2)=2,g(3)=3,g(4)=g(5)=4
is not a one-to-one function.
since 4≠5 but g(4)=g(5)
Also, gof : A → C
is a one-to-one function.