The domain of a function is all of the x values of the function without any repetition. A vertical line has only one x value as its domain, while a horizontal line has a domain of all x values.
In a linear function, the range is all values of x. However, certain functions are undefined for some values of X. In those functions, the range is all values of x except those that make the function undefined. For example, where y equals a radical function of x, the range is all values of x that make the equation under the radical positive. Another example is where y equals a fraction where x is in the denominator. In that case, the range is all values of x that yield a nonzero denominator.