If $f:M\to N$, $g:N\to P$ continuous and $g\circ f: M\to P$ are homeomorphism, and $g$ is injective, then $g, f$ both are homeomorphisms

If $f:M\to N$, $g:N\to P$ continuous and $g\circ f: M\to P$ is a homeomorphism. And $g$ is injective (or $f$ is surjective) then $g, f$ both are homeomorphisms.

I don't know how to prove it. I tried to use the left inverse of $g$ (or right inverse of $f$), but I can't follow it up.

-
@JonasMeyer Sorry, I have a mistake when writing question. $g\circ f$ may be an homeomorphism. – Gastón Burrull May 17 '12 at 21:37
Do you mean that $f$ and $g$ are functions as above such that $g\circ f$ is a homeomorphism? As it stands it reads that $f$ and $g$ are homeomorphisms. – M.B. May 17 '12 at 21:39
@M.B. Yes, I do. A priori $f,g$ only are continuous. But I was edited mistake. – Gastón Burrull May 17 '12 at 21:40
OK. Do you see why $g$ is bijective? And how this implies that $f$ is bijective? – M.B. May 17 '12 at 21:42
@Marcos: but the composition is assumed to be a homeomorphism. – M.B. May 17 '12 at 21:49

Suppose that $g$ is injective. It’s also continuous, so it’s a homeomorphism iff it is open. To show that $g$ is open, let $U$ be any open subset of $N$. The map $f$ is continuous, so $f^{-1}[U]$ is open in $M$. The map $g\circ f$ is a homeomorphism, so $g[U]=(g\circ f)[f^{-1}[U]]$ is open in $P$, and therefore $g$ is open.

Note that since $g\circ f$ is injective, $f$ must be injective as well. Thus, to show that $f$ is a homeomorphism, you need only show that it is open. For this you can use the same sort of reasoning as I used above.

-
It was completely clear to me why everything was bijective but I could not come up with continuity before Brian did :P Algebra came faster to me than the topology :) – rschwieb May 17 '12 at 21:55
@Brian: Nice answer! Thanks again!. – Gastón Burrull May 17 '12 at 21:58
@rschwieb Yes, 25% of this exercise is algebra. When I tried I only see that $g$ is bijective but not $f$. – Gastón Burrull May 17 '12 at 22:02
@Brian You are very clear, when you answer my questions almost always I understand quickly. – Gastón Burrull May 17 '12 at 22:07
@Gastón: Thank you; I try hard to be clear. – Brian M. Scott May 17 '12 at 22:12

Suppose $g$ is injective.

• Since $g\circ f$ is onto, $g$ is onto. Since $g$ is a bijection, it has an inverse $g^{-1}$

• From $Id_P=g\circ f\circ(g\circ f)^{-1}$ it follows that $g^{-1}=g^{-1}\circ g\circ f\circ(g\circ f)^{-1}=f\circ(g\circ f)^{-1}$. Since the right hand side is a composition of continuous functions, $g^{-1}$ is also continuous.

• Hence, $g$ is a continuous bijection with a continuous inverse, aka a homeomorphism.
• $f$ is surjective since $f=g^{-1}\circ(g\circ f)$ is a composition of surjections, and injective since $g\circ f$ is injective.
• As before, $f^{-1}=(g\circ f)^{-1}\circ g$ follows from $Id_M=(g\circ f)^{-1}\circ g\circ f$. Thus, $f^{-1}$ is also continuous.

A similar proof will work if $f$ is assumed to be surjective.

-
Why $g^{-1}=(f\circ g)^{-1}f$? A priori we don't know if $(fog)^{-1}$ there exist and the next equality holds $(f\circ g)^{-1}=g^{-1}f^{-1}$. – Gastón Burrull May 17 '12 at 21:46
Ah! Darn you and your non-alphabetic composition... let me double check to see if it is salvagable. – rschwieb May 17 '12 at 21:49
Ok, thanks for effort ;). – Gastón Burrull May 17 '12 at 21:50
@GastónBurrull it turns out the answer is easily salvageable, so I'm putting it back. – rschwieb May 17 '12 at 23:29
@GastónBurrull It's not necessary to use $f^{-1}$. It follows from $Id_P=g\circ f\circ(g\circ f)^{-1}$ that $g^{-1}=g^{-1}\circ g\circ f\circ(g\circ f)^{-1}=f\circ(g\circ f)^{-1}$. I'll put this in. – rschwieb May 18 '12 at 1:23