A relation is a set of ordered pairs of the form \((x,y)\text{.}\) A function is a relation where each \(x\) value has exactly one output value \(y\text{.}\)
Given a function \(f\) defined on a domain \(D\text{,}\) a function \(g\) on a domain \(E\) is an inverse of \(f\) if \(f(g(x))=x\) whenever \(x\) is in the domain of \(g\text{,}\) and \(g(f(x))=x\) whenever \(x\) is in the domain of \(f\text{.}\) Often, the inverse function \(g\) is written \(f^{-1}\text{.}\)
Since \(g\) is not a function, it cannot be the inverse of \(f\text{.}\) In order for a function to have an inverse, it must be one-to-one, that is every output has exactly one input. Sketch a function that is one-to-one and a function that is not one-to-one.
Figure2.6.8.Sketches of one-to-one function and a function that is not one-to-one.
Sometimes we can restrict the domain of a function to make it one-to-one, so that the restricted function will have an inverse. On what domain would \(f(x)=x^2\) have an inverse? What is the range of \(f\) on this domain?