Domain and Range
Functions in mathematics can be compared to the operations of a vending (soda) machine. When you put in a certain amount of money, you can select different types of sodas. Similarly, for functions, we input different numbers and we get new numbers as the result. Domain and range are the main aspects of functions. You can use quarters and onedollar bills to buy a soda. The machine will not give you any flavor of the soda if pennies are input. Hence, the domain represents the inputs we can have here, that is, quarters and onedollar bills. No matter what amount you pay, you won't get a cheeseburger from a soda machine. Thus, the range is the possible outputs we can have here, that is, the flavors of soda in the machine. Let us learn to find the domain and range of a given function, and also graph them.
What is Domain and Range?
The domain and range are defined for a relation and they are the sets of all the xcoordinates and all the ycoordinates of ordered pairs respectively. For example, if the relation is, R = {(1, 2), (2, 2), (3, 3), (4, 3)}, then:
 Domain = the set of all xcoordinates = {1, 2, 3, 4}
 Range = the set of all ycoordinates = {2, 3}
We can visualize this here:
Domain and Range of a Function
The domain and range of a function are the components of a function. The domain is the set of all the input values of a function and range is the possible output given by the function. Domain→ Function →Range. If there exists a function f: A →B such that every element of A is mapped to elements in B, then A is the domain and B is the codomain. The image of an element 'a' under a relation R is given by 'b', where (a,b) ∈ R. The range of the function is the set of images. The domain and range of a function is denoted in general as follows: Domain(f) = {x ∈ R} and range(f)={f(x) : x ∈ domain(f)}
The domain and range of this function f(x) = 2x is given as domain D ={x ∈ N } , range R = {(y): y = 2x}
Domain of a Function
A domain of a function refers to "all the values" that go into a function. The domain of a function is the set of all possible inputs for the function. Consider this box as a function f(x) = 2x^{ }. Inputting the values x = {1,2,3,4,...}, the domain is simply the set of natural numbers and the output values are called the range. But in general, f(x) = 2x is defined for all real values of x and hence its domain is the set of all real numbers which is denoted by (∞, ∞). Here are the general formulas used to find the domain of different types of functions. Here, R is the set of all real numbers.
 Domain of any polynomial (linear, quadratic, cubic, etc) function is R.
 Domain of a square root function √x is x≥0.
 Domain of an exponential function is R.
 Domain of logarithmic function is x>0.
 To find the domain of a rational function y = f(x), set the denominator ≠ 0.
Range of a Function
The range of a function is the set of all its outputs. Example: Let us consider the function f: A→ B, where f(x) = 2x and each of A and B = {set of natural numbers}. Here we say A is the domain and B is the codomain. Then the output of this function becomes the range. The range = {set of even natural numbers}. The elements of the domain are called preimages and the elements of the codomain which are mapped are called the images. Here, the range of the function f is the set of all images of the elements of the domain (or) the set of all the outputs of the function. In the upcoming sections, we can see how to find the range of different types of functions. Here are the general formulas used to find the range of different types of functions. Note that R is the set of all real numbers here.
 Range of a linear function is R.
 Range of a quadratic function y = a(xh)^{2} + k is:
y≥k, if a>0 and
y≤k, if a<0  Range of a square root function is y≥0.
 Range of an exponential function is y>0.
 Range of logarithmic function is R.
 To find the range of a rational function y = f(x), solve it for x and set the denominator ≠ 0.
How To Calculate Domain And Range?
Suppose X = {1, 2, 3, 4, 5}, f: X → Y, where R = {(x,y) : y = x+1}.
Domain = the input values. Thus Domain = X = {1, 2, 3, 4, 5}
Range = the output values of the function = {2, 3, 4, 5, 6}
and the codomain = Y = {2, 3, 4, 5, 6}
Let's understand the domain and range of some special functions taking different types of functions into consideration.
Domain and Range of Exponential Functions
The function y = a^{x}, a ≥ 0 is defined for all real numbers. Hence, the domain of the exponential function is the entire real line. The exponential function always results in a positive value. Thus, the range of the exponential function is of the form y= ax+b is y ∈ R , {y > 0}. Domain = R, Range = (0, ∞)
Example: Look at the graph of this function f: 2^{x}
Observe that the value of the function is closer to 0 as x tends to ∞ but it will never attain the value 0. The domain and range of an exponential functions are given as follows:
 Domain: The domain of the function is the set R.
 Range: The exponential function always results in positive real values.
Domain and Range of Trigonometric Functions
Look at the graph of the sine function and cosine function. Notice that the value of the functions oscillates between 1 and 1 and it is defined for all real numbers.
Thus, for each of the sine and cosine functions:
 Domain: The domain of the functions is the set R.
 Range: The range of the functions is [1, 1]
The domain and range of all trigonometric functions are shown below:
Trigonometric Functions  Domain  Range 

Sinθ  (∞, + ∞)  [1, +1] 
Cosθ  (∞ +∞)  [1, +1] 
Tanθ  R  (2n + 1)π/2  (∞, +∞) 
Cotθ  R  nπ  (∞, +∞) 
Secθ  R  (2n + 1)π/2  (∞, 1] U [+1, +∞) 
Cosecθ  R  nπ  (∞, 1] U [+1, +∞) 
Domain and Range of an Absolute Value Function
The function y=ax+b is defined for all real numbers. So, the domain of the absolute value function is the set of all real numbers. The absolute value of a number always results in a nonnegative value. Thus, the range of an absolute value function of the form y= ax+b is y ∈ R  y ≥ 0. The domain and range of an absolute value function are given as follows
 Domain = R
 Range = [0, ∞)
Example: 6x
 Domain: The domain of the function is the set R.
 Range: We already know that the absolute value function results in a nonnegative value always. i.e., 6x ≥ 0, for all x.
Domain and Range of a Square Root Function
The function y= √(ax+b) is defined only for x ≥ b/a
So, the domain of the square root function is the set of all real numbers greater than or equal to b/a. We know that the square root of something always results in a nonnegative value. Thus, the range of a square root function is the set of all nonnegative real numbers. The domain and range of a square root function are given as: Domain = [b/a,∞), Range = [0,∞)
Example: y= 2 √(3x+2)
Domain: A square root function is defined only when the value inside it is a nonnegative number. So for a domain,
3x+2 ≥ 0
3x ≥ 2
x ≤ 2/3
Range: We already know that the square root function results in a nonnegative value always.
√(3x+2)≥ 0
Multiply 1 on both sides
√(3x+2) ≤ 0
Adding 2 on both sides
2√(3x+2)≤ 2
y≤ 2
Graphs of Domain and Range
Another way to identify the domain and range of functions is by using graphs. The domain refers to the set of possible input values. The domain of a graph consists of all the input values shown on the xaxis. The range is the set of possible output values shown on the yaxis. The easiest method to find the range of function is by graphing it and looking for the yvalues covered by the graph. To find the range of a quadratic function, it is sufficient to see if it has a maximum or minimum value. The maximum/minimum value of a quadratic function is the ycoordinate of its vertex. To find the domain of the rational function, set the denominator as 0 and solve for the variable. The domain is denoted by all the values from left to right along the xaxis and the range is given by the span of the graph from the top to the bottom.
Domain and Range From Graph
It is very easy to find the domain and range of a function if its graph is given/known. The set of values of x covered by the graph gives the domain and the set of values of y covered by the graph gives the range. But keep a note of the following things while writing the domain and range from a graph.
 See whether the graph passes the vertical line test. Otherwise, it is not a function and we do not usually define domain and range for such curves.
 If there is any hole on the graph, then its coordinates shouldn't be in the domain and range.
 If there is a vertical asymptote, then the corresponding value of x shouldn't be there in the domain.
 If there is a horizontal asymptote, then the corresponding value of x shouldn't be there in the range.
 If the graph is broken into pieces, then we get multiple sets/intervals in the domain and range and we club all such sets/intervals by "union" symbol (∪).
 If there is an arrow at the end of a curve, then it means that the curve is supposed to be extended infinitely in that particular direction.
Here is an example of a graph and we will find the domain and range from the graph.
In the above graph:
 All the xvalues from ∞ to ∞ are covered by the graph (because of arrows, the two curves extend infinitely in the given directions). Hence, the domain = (∞, ∞).
 All the yvalues greater than or equal than or equal to 0 are covered by the graph (see there is no part of the curve that is below the yaxis). Hence, the range = [0, ∞).
Important Notes on Domain and Range:
 The domain and range of function is the set of all possible inputs and outputs of a function respectively.
 The domain and range of a function y = f(x) is given as domain= {x ,x∈R }, range= {f(x), x∈Domain}.
 The domain and range of any function can be found algebraically or graphically.
☛ Also Check:
Examples on Domain and Range

Example 1. Find the domain and range of the real function f defined by f(x) = √(x1)
Solution: Given the function is real. Thus the domain and range of the function are also real.
x √(x1) Real Number(Yes/No) 2 √(21) = 1 Yes 1 √(11) =0 Yes 0 √(01) =√1 No 1 √(11) = √2 No 2 √(21) = √3 No Thus f(x) is always nonnegative, and the minimum value it could take is 1 and the maximum value is ∞. Thus domain = [1, ∞).
The minimum value of the range is 0 and it can range up to infinity. Thus range = [0, ∞)
Answer: The domain and the range of the function f defined by f(x) = √(x1) is domain = [1, ∞) and range = [0, ∞)

Example 2: We define a function f: R0 → R as f(x)=1/x. Complete the table shown below. Find the domain and range of the function.
x 2 1.5 1 0.5 0.25 0.5 1 1.5 2 Solution:
Let's complete the given table by finding the values of the function at the given values x. Plugging in the values of x in the given function, we find the range of f(x) = 1/x.
x y=1/x 2 0.5 1.5 0.67 1 1 0.5 2 0.25 4 0.5 2 1 1 1.5 0.67 2 0.5 Let's draw the graph of the function to determine the domain and range of the function.
Answer: From the graph, we can observe that the domain and range of the function are all real numbers except 0. So, the domain and range of f(x)=1/x is R{0}

Example 3: Find the domain and range of the function (x+1)/(3x).
Solution:
At first, we will set the denominator equal to 0, and then we will solve for x.
3  x= 0
 x =  3 ⇒ x = 3
Hence, we will exclude 3 from the domain.
So, the domain is the set of real numbers x, where ( x< 3) and (x > 3 )
Let's find the range of y=(x+1)/(3x)
Let us solve the given equation for x
(3  x)y = x + 1
3y  xy = x + 1
3y1 = x + xy
x(1 + y) = 3y  1
x = (3y  1)/(1 + y)
The final equation is a fraction and a fraction is NOT defined when its denominator is zero.
So 1+y ≠ 0 ⇒ y≠ 1
Therefore, the range of the given function is the set of all real numbers excluding 1
Domain = (∞,3) \(\cup\) (3, ∞), Range = (∞,1) \(\cup\) (1, ∞)
Answer: The domain and range of the function(x+1)/(3x) = Domain = (∞,3) \(\cup\) (3, ∞), Range = (∞,1) \(\cup\) (1, ∞)
FAQs on Domain and Range
What is the Domain and Range of a Function?
The domain and range of a function are the set of all the inputs and outputs a function can give respectively. The domain and range are important aspects of a function. The domain takes all the possible input values from the set of real numbers and the range takes all the output values of the function.
How Do You Write the Domain and Range?
We write the domain and range of a function as the set of all the inputs a function can take and the outputs of the functions respectively. The domain and range are written from the smaller values to the larger values. The domain is written from left to right and the range is written from the top of the graph to the bottom.
What is The Natural Domain and Range of a Function?
The natural domain and range of a function are all the possible input values and the output values of the function respectively. Domain(f) = {x∈R} and range(f)={f(x):x ∈ domain(f)}.
What is The Domain and Range of a Constant Function?
Let the constant function be f(x)=k. The domain of a constant function is given by R, that is, the set of real numbers. The range of a constant function is given by the singleton set, {k}. The domain and range of a constant function is given as domain = x∈R and range = {k}, which is a singleton set.
How to Find the Domain of a Function which is Rational?
To find the domain of a rational function, we just set the denominator not equal to zero. For example, to find the domain of f(x) = 2/(x3), we set x3 ≠ 0, by solving this, we get x≠3. So the domain is the set of all rational numbers except 3. This can be written in the interval notation as (∞, 3) U (3, ∞).
How to Find the Range of a Rational Function?
To find the range of a rational function, we just solve the equation for x and apply set the denominator not equal to zero. For example, to find the range of y=2/(x3), solve it for x first. Then we get, x3 = 2/y and from this, x = (2/y) + 3. Then its range is y≠0 (or) in interval notation, (∞, 0) U (0, ∞).
What are the Rules to Find the Domain of a Function?
Here are some general rules used to find domain of different types of functions:
 f(x) = polynomial, the domain is the set of all real numbers.
 f(x) = 1/x, domain if the set of all real numbers but x≠0.
 f(x) = √x, domain if the set of all real numbers such that x ≥ 0.
 f(x) = ln x, domain is the set of all real numbers such that x > 0.
How to Find The Domain and Range of Function Algebraically?
Let the function be y=f(x). Let us find the domain and range of this function algebraically.
To calculate the domain of the function, we simply solve the equation to determine the values of the independent variable x. To calculate the range of the function, we simply express x as x = g(y) and then find the domain of g(y).
How to Find The Domain and Range of an Equation?
To find the domain and range, we simply solve the equation y = f(x) to determine the values of the independent variable x and obtain the domain. To calculate the range of the function, we simply express x as x=g(y) and then find the domain of g(y).
How to Calculate the Domain and Range From the Graph of a Function?
The set of all xcoordinates of all points of the curve would give the domain and the set of all ycoordinates of all points of the curve would give the range. Each of the domain and range can be either written as a set or an interval.
What is The Difference Between Domain and Range of a Function?
Domain and Range of a function are the components of a function. The domain of a function is the set of all possible inputs for the function, whereas the range of function is the set of all the outputs a function can give.
What is The Domain and Range of a Relation?
the domain and range of a relation is found as follows. Let R be the relation from a nonempty set A to a nonempty set B. The domain and range of the relation are the set of first elements and the second elements respectively in the ordered pairs in relation R is called the domain.
What is the Domain and Range of Composite Functions?
Let the composite function be \(h=f \circ g\). The domain and range of h are determined as follows. The domain of h is either same as f or lies within the domain of f. The range h must lie within the range of g. Let f(x) = x^{2 }and g(x) = x+ 3. We know that f: X →Y and g: Y →Z. Then fog: X →Z. f(g(x)) = (x+3)^{2}. Thus the domain and range are: domain= {All the elements in set X}, range= {all the elements in set Z}
What is the Domain and Range of a Quadratic Function?
The domain and range of a quadratic function y=a(xh)^{2}+k determine the nature of the parabola: whether it is upwards or downwards or facing to the left or to the right.
 y ≥ k, if the function has a minimum value, that is, when a>0(parabola opens up)
 y ≤ k, if the function has a maximum value, that is, when a<0(parabola opens down)
visual curriculum