# Difference Between Domain and Range

If you are curious about the difference between domain and range, this post will be an eye opener.
Omkar Phatak May 13, 2019
As you switch over to advanced mathematics courses, one thing that you will primarily study is the concept of a mathematical function. Applied mathematics consists of the use of functions. Their two prime properties are domain and range. They are crucial properties which decide the range of applicability of a mathematical function.

### How are Domain and Range Different?

A function is a unique relation between two sets of variables, wherein one set completely determines what the other set will be and every element in the first set has an associated unique element in the other set. I assume that you know what dependent and independent variables are.
The variables of the first set are known as independent variables while second set variables are dependent ones. For example, consider the function 'y = x + 5'. Here 'x' is the independent variable while y is dependent. For every integral value of x, y has a unique fixed value.
Domain is the set of all values that an independent variable of a function can take. The range is the corresponding set of values, determined by entering domain values in the function.
In the function, (y = f (x) = x + 5), the independent variable x can take all the real number values and hence, its domain is the set of all real numbers. For each value of x, the corresponding dependent variable values are also real numbers, which means that range of this function, is the set of all real numbers.
Consider one more example. Let the function be 'y = 1/(1 - x)' and you need to find the domain for this function. As you can see, for x = 1, the function is undefined. However, for all other values, it is defined and can be calculated. Hence, the domain of this function is the set of all real numbers, except the value of x which is 1.
Also the set of values of 'y', for every x are again real numbers. Therefore, range of this function will also be a set of real numbers. To accurately know it, you need to draw a graph. You could also use mathematical software programs that can plot functions for you.
Math in everyday life is all about applying the concepts you learn in school. To understand any concept in mathematics, it is best if you apply it to a real life situation.
Consider this example. John needs to buy two pairs of jeans and three t-shirts for each of his three cousins. He visits a store where all jeans of their age group cost USD 50, while t-shirts cost USD 60. He needs to know how much will his shopping spree cost him.
If the cost is denoted by 'Y' and number of cousins is 'X', the function for determining total cost will be:

Y = 2 x 50X + 3 x 60X = 100X + 180X = 280X
As you can see, in the end equation Y = 280X, which means that Y, or the total cost is a function of the number of cousins, which is 'X'. Here, the domain is the number of his cousins, while the range is the value of total shopping cost, as a function of number of cousins that he buys clothes for.
Every mathematical function has its uses and they are largely decided by its domain and range. Understanding functions and their domains is an important part of mathematical study, in engineering and physical sciences.
Hence, it is an integral part of a physicist's and engineer's training. A recommended book for studying these concepts in greater detail is Mary's Boas's book - 'Mathematical Methods in the Physical Sciences'.