Inverse of increasing continuous function is increasing continuous when?

Suppose that $f : \mathbb{R} → \mathbb{R}$ is a continuous function that is strictly increasing (i.e. $f(x) < f(y)$ whenever $x < y$). Find a necessary and sufficient condition for $f$ to have a strictly increasing continuous inverse function $g : \mathbb{R} → \mathbb{R}$.

This is a question which appeared in my practice test, and I am not sure why we need a condition as $f$ seems sufficiently strong as stated. Is there a stronger condition needed?

• You need a condition that ensures that $f$ is a surjection (its image is all of $\mathbb R$). – Bungo Apr 18 '18 at 15:51
• Why is that? $f(x) = e^x : \mathbb{R} \rightarrow \mathbb{R}^+$ has an inverse of $g(x) = log(x)$ which is continuously strictly increasing from $mathbb{R}^+ \rightarrow \mathbb{R}$. Am I understanding the question wrong? – blanchey Apr 18 '18 at 16:04
• The question asks for an inverse function $g : \mathbb R \to \mathbb R$. Your example doesn't satisfy that. – Bungo Apr 18 '18 at 16:08