# Injective or surjective functions

Let $h \in {A^A}.$ Prove:

(1) $(\forall f \in {A^A} )(\forall g \in {A^A} ) (f \circ h = g \circ h \Rightarrow f = g) \Leftrightarrow h$ is injective function

(2) $(\forall f \in {A^A} )(\forall g \in {A^A} ) (h \circ f = h \circ g \Rightarrow f = g) \Leftrightarrow h$ is surjective function

-
I think your (1) has a typo, should it be $f \circ h = g \circ h$? Also, what did you attempt? – dls Jan 27 '12 at 20:25
Yo, John Doe. Help us help you: don't write in commanding imperative mode and tell us what you've tried and where you're stuck. – anon Jan 27 '12 at 20:26
welcome to MathSE. I see that you are relatively new here. So I wanted to let you know a few things about MathSE. We like to know what you've tried on a problem; this prevents people from wasting their time telling you thinks you already know. Also, posting questions in the imperative (i.e. Compute all such, Prove that...), as you have done with all four of your question so far, is considered rude by some of the members, so it would be nice of you to change that wording and show us what you've tried so far, or why you are confused or stuck. Thank you. – Arturo Magidin Jan 27 '12 at 20:40

$$(\forall f \in {A^A} )(\forall g \in {A^A} ) (f \circ h = g \circ h \Rightarrow f = g) \Leftrightarrow h\text{ is injective}\;.$$
(1) If $h$ is not injective, there are $a,b\in A$ such that $a\ne b$, but $h(a)=h(b)$. What happens if $f$ sends every element of $A$ to $a$, while $g$ sends every element of $A$ to $b$? For the other direction of the $\Leftrightarrow$, try assuming that $h$ is injective and showing that if $f\ne g$, then it’s impossible for $f\circ h$ to equal $g\circ h$. Note that $f\ne g$ means that there is some $a\in A$ such that $f(a)\ne f(g)$.
(2) If $h$ is not surjective, there is some $a_0\in A$ such that for all $a\in A$, $h(a)\ne a_0$. What happens if $f(a_0)\ne g(a_0)$? I’ll leave the other direction completely up to you for now; the suggestion for (1) should at least suggest a direction in which to proceed.