You may have been thinking of another definition of the term range. You found the difference between the greatest and least values for the input and the output. The domain of the function is the set of all input values, which are the x-coordinates, and the range of the function is the set of all output values, which are the y-coordinates.