If a function passes the horizontal line test (such as f(x)=mx+b, f(x)=ax2+bx+c (quadratic function) and f(x)=x3+a or f(x)=(x -a)3 ) then such function is a one-to-one function. If a function is one-to-one then such function will have an inverse.