# Example of strictly increasing discontinuous function with intermediate property on non compact set

I know that strictly increasing function with intermediate value property on compact set is continuous .I wanted to find counterexample if I remove compactness condition.Any help will be appreciated

There is no such counterexample: the assumption that the domain is compact is unnecessary. Indeed, suppose $A\subseteq \mathbb{R}$ and $f:A\to\mathbb{R}$ is strictly increasing and has the intermediate value property. Let $a\in\mathbb{R}$. If $a$ is not in the image of $f$, then by the intermediate value property the entire image of $f$ is greater than $a$ or the entire image of $f$ is less than $a$. Thus $f^{-1}(-\infty,a)$ is either empty or is all of $A$. If $a$ is in the image of $f$, let $b\in A$ be such that $f(b)=a$. We then have $f^{-1}(-\infty,a)=(-\infty,b)\cap A$ since $f$ is strictly increasing.
Thus in all cases, $f^{-1}(-\infty,a)$ is open in $A$. Similarly, $f^{-1}(a,\infty)$ is open in $A$ for any $a\in\mathbb{R}$. Since intervals of this form generate the topology on $\mathbb{R}$, it follows that $f$ is continuous.