reading: MCS 4.3-4.4
discuss connection between 'jectivity and inverses
Definitions: let f:A→B. Then f is
Definition: if f:A→B and g:B→C then the composition of g with f (written g∘f) is the function (g∘f):A→C is given by (g∘f)(x)=g(f(x)).
Note that g∘f is different from f∘g.
Definition: The identity function on X is the function id:X→X given by id(x)=x.
Definition: If f:A→B then g is a left inverse of f if g∘f=id. In other words, if for all x∈A, g(f(x))=x (Note: g is a left inverse because you write it on the left).
Similarly, g is a right inverse if f∘g=id.
Claim: f has a right inverse if and only if it is surjective.
Proof: We must prove that if f has a right inverse, then it is surjective, and also that if f is surjective, then it has a right inverse.
(RI ⇒ surj) Suppose that f has a right inverse g. We will show that f is surjective by contradiction. Suppose that f is not surjective. Then there exists some y such that for all x, f(x)≠y (). Now, since g is a right inverse of x, f(g(y))=y. But this contradicts (), so our original assumption (that f is not surjective) must be false.
(surj ⇒ RI) Suppose f is surjective. We will show that f has a right inverse by constructing it. Let g:B→A be defined as follows. Given any y∈B we know that there exists some x∈A such that f(x)=y (since f is surjective). Choose one of them, and define g(y) to be x.
I claim g is a right inverse of f. Indeed, for any y∈B, we have f(g(y))=y by the definition of g.
This concludes the proof.
Note: it turns out that f is injective if and only if it has a left inverse, and f is bijective if and only if it has a two-sided inverse. This will be on the next homework.