Question about Image and Set notation. In class we had to show that if $g∘f$ is surjective, then so is $g$ (Where $f: M \to N$ and $g: N \to P$).
We used a proof by contradiction, but I wanted to solve it with a direct proof because it seemed more intuitive to me.
So here is my thought process:
We have given, that $g(f(M)) = P$ and since $ f(M)\subseteq N $ this means that $g("\text{a subset of N}") = P$ (how do you write this?).
So if a subset of the domain maps onto the entire codomain, then obviously the entire domain will also map onto the entire codomain.
So $g(N) = P$  thus $g$ is surjective.
So here are my questions:

*

*Does this proof even make sense?

*How would you formally write this?

*Is the notation $Im(f) $ the same as $f(M)$ (if $ M $ is the domain)? If so, how would you write this proof using $Im ()$ notation?

 A: 1. Does this proof even make sense?
You wrote: ...So if a subset of the domain maps onto the entire codomain, then obviously the entire domain will also map onto the entire codomain... I would not call that a proof. The idea is there, but if you want to be convincing, you need to add an argument.
2. How would you formally write this?
I would say, let $p \in P$. We have to prove that there exists $n \in N$ such that $g(n)=p$. By hypothesis, $g \circ f$ is surjective. So there exists $m \in M$ such that $g(f(m)) = p$. We get the desired conclusion by taking $n = f(m)$.
3. About $\operatorname{Im}f$
$\operatorname{Im}f$ is usually reserved for linear maps.
A: Correct, $Im(f)=f(m)$, and your proof works as well. If you wish to use $Im$-notation (though it doesn't really change the proof at all), you could write e.g.
$$
P = Im(g\circ f) = g(Im(f)) \subseteq g(N) = Im(g) \subseteq P.
$$
Since $P\subseteq Im(g) \subseteq P$, we conclude $Im(g)=P$. In the above, we used:

*

*$Im(f) \subseteq cod(f)$ (the codomain of $f$).

*$A\subseteq B \implies f(A)\subseteq f(B)$.

*$A\subseteq B\subseteq A\implies A=B$.

I suppose you also need to convince yourself that $Im(g\circ f) = g(Im(f))$.
