The temperature of water is defined relative to sea level, and the area of a circle is defined relative to the radius. These are examples of quantities that vary depending on other quantities, or, these quantities are functions of other quantities.
A function f from a set D to a set Y is a rule associating an element of D with a unique element of Y.
The set D of all possible input values is the domain, and the possible values of f(x) as y varies is the range of the function: the range may not contain every value in the set Y, which is the codomain of the function, or the set of all possible output values of the function.
When a function is defined, and the domain is not explicitly stated, the domain is assumed to be the largest set of real values for x, for which y has real values, referred to as the natural domain.
The domain of y=x2 is the entire set of real numbers, but we can restrict the domain to positive values by saying y=x2,x>0.
A change in the domain of a function typically results in a change of the range of the function.
When the range is the real numbers, the function is real-valued, and the domains and ranges of real valued functions are described by intervals.