Find the inverse of a linear function