Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Number System and Arithmetic
  • Algebra
  • Set Theory
  • Probability
  • Statistics
  • Geometry
  • Calculus
  • Logarithms
  • Mensuration
  • Matrices
  • Trigonometry
  • Mathematics
Open In App
Next Article:
Measuring Angles
Next article icon

Range of a Function

Last Updated : 12 Mar, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Functions in math can be thought of as vending machines. Given the money in the form of input, they give some cans or cookies in return. Similarly, functions take some input numbers and give us some output. It can be said that, in real life, Everything can be formulated and solved with the help of functions. From building design and Architecture to Mega Skyscrapers, the mathematical model of almost everything in real life requires Functions, Therefore, it can't be avoided that functions have gigantic significance in our lives. Domain and Range are one aspect through which a function can be described. 

For example: Suppose it's written on top of the machine that only Rs.20 and Rs.50 notes can be used to buy something. What if, someone uses Rs.10 notes? The machine will not give any output. So, the domain represents what kind of inputs we can have in a function. In this case, Rs.20 and Rs.50 notes are the domain of the "Vending Machine". Similarly, it doesn't matter how much money one puts in the machine, he/she will never get Sandwiches from it. So, the concept of the range comes into play here, range is the possible outputs machine can give. 

Range and Domain of a Function

Domain of a Function:

A domain is all the values that can go into a function for which it gives a valid output. It is the set of all the possible inputs to a function. 

For example: In the figure below, f(x) = x2. The set of all the inputs is called Domain and the set of all the outputs is considered as the range. 

How to find the domain of a function?

The domain of the function should contain all real numbers except the points where the denominator becomes zero and terms under square roots become negative. To find the domain, try to find the points or input values over which the function is not defined. 

Question 1: Find the domain of \frac{1}{1-x}

Answer: 

This function can give undefined output when x = 1. So, then domain is R - {1}. 

Question 2: Find the Domain of the following function:

                                \frac{x^2}{(x-3)(x-5)}

Answer: 

It is Important to not make the function either Infinity or Undefined, therefore, we need to see what Domain values can make the Function Undefined or Infinity.

Taking a look at the denominator, It is clear that the values 3 and 5 are making the denominator 0, hence, making the function Infinite which is not desirable. 

Therefore, the values x=3 and x=5 can't be placed here.

The Domain will be R - {3,5}.

Question 3: Find the Domain values for which the Functions Y = (2x2-1) and Z= (1-3x) are equal.

Answer: 

Equating the two Functions:

2 x2- 1 = 1 - 3 x

2x2 + 3x - 2 = 0

2x2 + 4x - x - 2 = 0

2x (x + 2) - 1 (x+2)= 0

(2x - 1) (x + 2) = 0

x = 1/2, -2.

Therefore, the Domain values are {1/2, -2}.

Range of a Function

The range of a function is a set of all its possible outputs. 

Example: Let's consider a function ƒ: A⇢A, where A = {1,2,3,4}. 

The elements of the set Domain, are called pre-images, and elements of the set Co-Domain which are mapped to pre-images are called images. The range of a function is a set of all the images of elements in the domain. In this example, the range of the function is {2,3}. 

How to find the range of a function?

The range is the spread of the values of the output of a function. If we are able to calculate the maximum and the minimum values of the function, we can get an idea of the range of the function. 

Question 1: Find the range. f(x) = \sqrt{x - 1}

Answer: 

Now, since the function is a square root, it can never give negative values as output. So, the minimum value can only be 0 at x = 1. Maximum value can go up to infinity as we keep on increasing x. 

So, the range of the function is [0,∞). 

Question 2: The domain of the function ƒ defined by f(x) =\frac{1}{\sqrt{x - |x|}} is? 

Answer: 

Given, f(x) = \frac{1}{\sqrt{x - |x|}}                              . 

One has to ensure two things while selecting the set of domain, 

  • Denominator never goes to zero.
  • Term is inside the square root doesn't become negative.

Let's expand what's written inside term within square root. 

  \sqrt{x - |x|}= \begin{cases}    x - x = 0,& \text{if } x\geq 0\\    2x,              & \text{otherwise} \end{cases}                               

In this case, we cannot put either of the values, x ≥ 0 or x < 0. 

Hence, f is not defined for any x ∈ R. So, the domain is an empty set. 

Domain and Range of Quadratic Functions

Quadratic functions are the functions of the form f(x) = ax2 + bx + c, where a, b and c are constants and a ≠ 0.  The graph of a quadratic function is in the form of a parabola. It is basically a curved shape opening up or down. 

Let's look at how to graph quadratic functions, 

So, in our quadratic function

  • if a > 0, the parabola opens upwards.
  • if a < 0, the parabola opens downwards.

Now, the vertex is the highest or lowest point of our curve depending on the graph of the quadratic function. To find the vertex of the graph of a general quadratic expression. 

In the standard quadratic form, the vertex is given by (\frac{-b}{2a}, f(\frac{-b}{2a}))  One has to find the x-value of the vertex first and then just has to plug it in into the function to get the y-value. 

Note: Each curve is symmetrical around its vertical axis. 

Let's look at some examples, 

Question: Plot the graph of f(x) = 2x2 + 4x + 2. 

Answer:

Comparing this equation with the general quadratic function equation. a = 2, b = -4 and c = 2. 

Since a > 0, this parabola will open upwards. 

  • Vertex x-value = \frac{-b}{2a} = \frac{-4}{4} = -1
  • Vertex y-value = 2(-1)2 + 4(-1) + 2 = 0

So, the vertex is at (-1,0). Since the parabola opens upwards, this must be the minimum value of the function. 

The point where graph cuts y-axis is (0,2). 

Range and Domain of quadratic functions can be found out easily by plotting the graph. It's not always necessary to plot the full graph, for range only the direction of the parabola(upward or downward) and value of the parabola at vertex should be known. Value at the vertex is always either minimum/maximum depending upon the direction of the parabola. The domain of such functions is always whole real numbers because there are defined everywhere i.e; there is no value of input which might cause them to give undefined as output. 

Let's look at another example regarding the domain and range of the parabola. 

Question: Plot the graph and find domain and range of the given function, f(x) = -x2 + 4.

Answer: 

Since, a = -1. Parabola will open downwards i.e; there will be no minimum value, it will extend to infinity. But there will be a maximum value which will occur at vertex. 

To find the position of the vertex, previous formula can be used. The vertex is at position (0,4). 

The value at vertex (0,4) = (0)2 + 4 = 4. 

So, the maximum value is 4 and minimum value is negative of infinity. 

Range of the function - (-∞, 4] and the domain is R.


Next Article
Measuring Angles

A

anjalishukla1859
Improve
Article Tags :
  • Mathematics
  • School Learning
  • Class 11
  • Maths-Class-11

Similar Reads

    CBSE Class 11 Maths Notes
    CBSE Class 11 Maths Revision Notes have been designed in the most basic and detailed format possible, covering nearly all domains such as differential calculus, arithmetic, trigonometry, and coordinate geometry. We know how hard it gets when you shift to an altogether new grade where subjects are no
    15+ min read

    Chapter 1: Sets

    Representation of a Set
    Sets are defined as collections of well-defined data. In Math, a Set is a tool that helps to classify and collect data belonging to the same category. Even though the elements used in sets are all different from each other, they are all similar as they belong to one group. For instance, a set of dif
    8 min read
    Types Of Sets
    In mathematics, a set is defined as a well-defined collection of distinct elements that share a common property. These elements— like numbers, letters, or even other sets are listed in curly brackets "{ }" and represented by capital letters. For example, a set can include days of the week. The diffe
    13 min read
    Universal Sets
    Universal Set is a set that has all the elements associated with a given set, without any repetition. Suppose we have two sets P = {1, 3, 5} and Q = {2, 4, 6} then the universal set of P and Q is U = {1, 2, 3, 4, 5, 6}. We generally use U to denote universal sets. Universal Set is a type of set that
    6 min read
    Venn Diagram
    Venn diagrams are visual tools used to show relationships between different sets. They use overlapping circles to represent how sets intersect, share elements, or stay separate. These diagrams help categorize items, making it easier to understand similarities and differences. In mathematics, Venn di
    14 min read
    Operations on Sets
    Sets are fundamental in mathematics and are collections of distinct objects, considered as a whole. In this article, we will explore the basic operations you can perform on sets, such as union, intersection, difference, and complement. These operations help us understand how sets interact with each
    15+ min read
    Union of Sets
    Union of two sets means finding a set containing all the values in both sets. It is denoted using the symbol '∪' and is read as the union. Example 1:If A = {1, 3. 5. 7} and B = {1, 2, 3} then A∪B is read as A union B and its value is,A∪B = {1, 2, 3, 5, 7}Example 2:If A = {1, 3. 5.7} and B = {2, 4} t
    12 min read

    Chapter 2: Relations & Functions

    Cartesian Product of Sets
    The term 'product' mathematically refers to the result obtained when two or more values are multiplied together. For example, 45 is the product of 9 and 5.To understand the Cartesian product of sets, one must first be familiar with basic set operations such as union and intersection, which are appli
    7 min read
    Relations and Functions
    In mathematics, we often deal with sets of numbers or objects and the ways they are connected. Two important concepts that help us describe these connections are relations and functions.A relation is simply a connection between two sets of objects. Think of it as a rule that pairs elements from one
    3 min read
    Domain and Range of Relations
    The domain is the set of all possible input values (the "x" values), and the range is the set of all possible output values (the "y" values) in a relation.For any two non-empty sets A and B, we define the relation R as the subset of the Cartesian product of A × B where each member of set A is relate
    8 min read
    Piecewise Function
    Piecewise Function is a function that behaves differently for different types of input. As we know a function is a mathematical object which associates each input with exactly one output. For example: If a function takes on any input and gives the output as 3. It can be represented mathematically as
    11 min read
    Range of a Function
    Functions in math can be thought of as vending machines. Given the money in the form of input, they give some cans or cookies in return. Similarly, functions take some input numbers and give us some output. It can be said that, in real life, Everything can be formulated and solved with the help of f
    7 min read

    Chapter 3: Trigonometric Functions

    Measuring Angles
    Measurement of angles is very important in geometry for solving various geometrical problems and comparing angles in various geometrical figures. We use various geometric tools such as a protractor, and a compass for measuring angles. There are various types of angles measured by us and before learn
    7 min read
    Trigonometric Functions
    Trigonometric Functions, often simply called trig functions, are mathematical functions that relate the angles of a right triangle to the ratios of the lengths of its sides.Trigonometric functions are the basic functions used in trigonometry and they are used for solving various types of problems in
    6 min read
    Trigonometric Functions of Sum and Difference of Two Angles
    Trigonometry is a branch of mathematics, which deals with the angles, lengths, and heights of triangles and their relationships. It had played an important role in calculating complex functions or large distances which were not possible to calculate without trigonometry. While solving problems with
    15+ min read

    Chapter 4: Principle of Mathematical Induction

    Principle of Mathematical Induction
    Mathematical induction is a concept in mathematics that is used to prove various mathematical statements and theorems. The principle of mathematical induction is sometimes referred to as PMI. It is a technique that is used to prove the basic theorems in mathematics which involve the solution up to n
    11 min read

    Chapter 5: Complex Numbers and Quadratic Equations

    Complex Numbers
    Complex numbers are an essential concept in mathematics, extending the idea of numbers to include solutions for equations that don't have real solutions. Complex numbers have applications in many scientific research areas, signal processing, electromagnetism, fluid dynamics, quantum mechanics, and v
    12 min read
    Algebra of Real Functions
    The algebra of real functions refers to the study and application of algebraic operations on functions that map real numbers to real numbers. A function can be thought of as a rule or set of rules which map an input to an output knows as its image. It is represented as x ⇢ Function ⇢ y. A real funct
    5 min read
    Algebraic Operations on Complex Numbers
    A complex number is a number that includes both a real and an imaginary part. It is written in the form:z = a + biWhere:a is the real part,b is the imaginary part,i is the imaginary unit, satisfying i2 = −1.Algebraic operations on complex numbers follow specific rules based on their real and imagina
    7 min read
    Polar Representation of Complex Numbers
    Complex numbers, which take the form z = x + yi, can also be represented in a way that highlights their geometric properties. This alternative representation is known as the polar form. The polar representation of a complex number expresses it in terms of its magnitude (modulus) and direction (argum
    9 min read
    Absolute Value of a Complex Number
    The absolute value (also called the modulus) of a complex number z = a + bi is its distance from the origin in the complex plane. The absolute value tells you how far a number is from zero, regardless of its direction (positive or negative).It is denoted as ∣z∣ and is given by the formula:|z| = \sqr
    7 min read
    Conjugate of Complex Numbers
    In the world of mathematics, complex numbers are one of the most important discoveries by mathematicians as they help us solve many real-life problems in various fields such as the study of electromagnetic waves, engineering, and physics.The Conjugate of a Complex Number is also a complex number obt
    6 min read
    Imaginary Numbers
    Imaginary numbers are numbers as the name suggests are the number that is not real numbers. All the numbers real and imaginary come under the categories of complex numbers. Imaginary numbers are very useful in solving quadratic equations and other equations whose solutions can not easily be found us
    9 min read

    Chapter 6: Linear Inequalities

    Compound Inequalities
    Compound Inequalities are the combination of two or more inequalities. These inequalities are combined using two conditions that are AND, and OR. These conditions have specific meanings and they are solved differently. The inequities in compound inequalities are individually solved using normal rule
    10 min read
    Algebraic Solutions of Linear Inequalities in One Variable
    A linear inequality is a mathematical expression involving an inequality symbol (<, >, ≤, or ≥) and a linear expression. Unlike linear equations, which give a specific solution, linear inequalities define a range of possible solutions.Example: 2x+3>5 In this case, the inequality indicates t
    8 min read
    Graphical Solution of Linear Inequalities in Two Variables
    We know how to formulate equations of different degree, and it is used a lot in real life, but the question arises, is it always possible to convert a situation into an equation? Sometimes we get statements like, the number of Covid cases per day in Delhi has reached more than 10,000. This phrase “L
    8 min read
    Solving Linear Inequalities Word Problems
    We are well versed with equations in multiple variables. Linear Equations represent a point in a single dimension, a line in a two-dimensional, and a plane in a three-dimensional world. Solutions to linear inequalities represent a region of the Cartesian plane. It becomes essential for us to know ho
    10 min read

    Chapter 7: Permutations and Combinations

    Fundamental Principle of Counting
    The fundamental principle of counting is a basic concept used to determine the total number of possible outcomes in a situation where there are multiple independent events. It allows us to count a large number of possibilities without needing to list each one individually.For example, consider guess
    11 min read
    Permutation
    In Mathematics, Permutation is defined as a mathematical concept that determines the number of possible arrangements for a specific set of elements. therefore, it plays a big role in computer science, cryptography, and operations research. For example, take a set {1, 2, 3}:All Permutations taking al
    15+ min read
    Combinations
    Combination is a way of choosing items from a set, (unlike permutations) when the order of selection doesn't matter. In smaller cases, it's possible to count the number of combinations. Combination refers to the mixture of n things taken k at a time without repetition.Example: For set S = {a, b, c},
    8 min read

    Chapter 8: Binomial Theorem

    Binomial Theorem
    Binomial theorem is a fundamental principle in algebra that describes the algebraic expansion of powers of a binomial. According to this theorem, the expression (a + b)n where a and b are any numbers and n is a non-negative integer. It can be expanded into the sum of terms involving powers of a and
    15+ min read
    Pascal's Triangle
    Pascal's Triangle is a triangular arrangement of numbers where each number is the sum of the two numbers directly above it in the previous row. It is named after the French mathematician Blaise Pascal, although it was studied by mathematicians in various cultures long before him.Various patterns can
    9 min read

    Chapter 9: Sequences and Series

    Sequences and Series
    A sequence is an ordered list of numbers following a specific rule. Each number in a sequence is called a "term." The order in which terms are arranged is crucial, as each term has a specific position, often denoted as an​, where n indicates the position in the sequence.For example:2, 5, 8, 11, 14,
    10 min read
    General and Middle Terms - Binomial Theorem - Class 11 Maths
    Binomial theorem or expansion describes the algebraic expansion of powers of a binomial. According to this theorem, it is possible to expand the polynomial "(a + b)n" into a sum involving terms of the form "axzyc", the exponents z and c are non-negative integers where z + c = n, and the coefficient
    7 min read
    Arithmetic Series
    An arithmetic series is the sum of the terms of an arithmetic sequence, where an arithmetic sequence is a sequence of numbers in which the difference between consecutive terms is constant. Or we can say that an arithmetic progression can be defined as a sequence of numbers in which for every pair of
    5 min read
    Arithmetic Sequence
    An arithmetic sequence or progression is defined as a sequence of numbers in which the difference between one term and the next term remains constant.For example: the given below sequence has a common difference of 1.1 2 3 4 5 . . . n ⇑ ⇑ ⇑ ⇑ ⇑ . . . 1st 2nd 3rd 4th 5th . . . nth TermsThe Arithmetic
    8 min read
    Geometric Progression or GP
    Geometric Progression (GP) is a sequence of numbers where each term after the first is found by multiplying the previous term by a constant called the common ratio.For Example, the sequence given below forms a GP with a common ratio of 2 1 2 4 8 16 . . . n⇑ ⇑ ⇑ ⇑ ⇑ . . . 1st 2nd 3rd 4th 5th . . . nt
    12 min read
    Geometric Series
    In a Geometric Series, every next term is the multiplication of its Previous term by a certain constant, and depending upon the value of the constant, the Series may increase or decrease.Geometric Sequence is given as: a, ar, ar2, ar3, ar4,..... {Infinite Sequence}a, ar, ar2, ar3, ar4, ....... arn {
    3 min read
    Arithmetic Progression and Geometric Progression
    Arithmetic Progression and Geometric Progression: The word "sequence" in English means a collection of some numbers or objects in such a way that it has a first member, a second member, and so on. Sequences can be of anything, for example. - January, February, .... is the sequence of months in a yea
    10 min read
    Special Series in Maths - Sequences and Series | Class 11 Maths
    Special Series: A series can be defined as the sum of all the numbers of the given sequence. The sequences are finite as well as infinite. In the same way, the series can also be finite or infinite. For example, consider a sequence as 1, 3, 5, 7, … Then the series of these terms will be 1 + 3 + 5 +
    10 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences