# Difference between an injective f and monotonic f?

What is the difference between an injective function and a monotonic function? An injection is a function where its values only can be occurred once ($f(a)=f(b) \Rightarrow a=b$). This means that a function is either decreasing or increasing. Isn't this the same for a monotonic function?

• Think about discontinuous functions. Jan 15 '13 at 23:42
• There is a theorem which states that, for continuous real functions of a real variable, injectivity and monotonicity are the same. This is what is confusing you. Jan 15 '13 at 23:51

On the other hand, these concepts are different even for functions $\mathbb{R}\to\mathbb{R}$. For example, $f:\mathbb{R}\to \mathbb{R}$, $f(x)=\begin{cases}x^{-1}&\mbox{if$x\ne0$}\\0&\mbox{if$x=0$}\end{cases}$ is injective but not monotonic.