Let function $f:(0,\infty)\to(0,\infty)$ be defined as $f(x)=|1-\frac{1}{x}|$. Then is it onto function?
My doubt is that here the codomain doesn't include $0$ but here in the function $0$ is there on $x=1$. So, will it be an onto function? (confusion is created due to this point $(1,0) $ ).
Thanks for clearing my doubt.
You are right, $f$ is not a well defined function and the reason has been stated by you. $f(1)$ is not in the codomain.