In one of the remarks for this highly upvoted unanswered question: Does there exist a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not? , the author points out in the post that
a bijection that preserves connectedness on $\mathbf{R}$ must be monotone.
Why is this true?
I understand every single word in this statement, but I do not know how to prove it. To set up the notation,
Let $f:\mathbf{R}\to\mathbf{R}$ be a bijection such that for any connected subset $A$ in $\mathbf{R}$, the set $f(A)$ is also connected. How does one show that $f$ must be monotone?
To get a feeling for what could go wrong if $f$ is not monotone, I consider the simple case when $f(x)=x^2$. Obviously, $f(A)$ is connected for any connected set $A$ since $f$ is continuous; but it is not bijective. Other than this dumb example, I don't have any intuitions.