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:
Quadratic Function
Next article icon

Quadratic Function

Last Updated : 06 Feb, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

A quadratic function is a type of polynomial function of degree 2, which can be written in the general form:

f(x) = ax2 + bx + c

where:
• x is the variable,
• a, b, and c are constants with a ≠ 0 (if a = 0, the function would be linear, not quadratic),
• The highest exponent of x is 2 (hence the term "quadratic").

Quadratic-Function
Quadratic Function

Quadratic functions are important in various mathematical fields and real-life applications, particularly because their graphs are parabolas. They are commonly used in contexts where parabolic shapes and properties are needed.

Some examples of Quadratic Functions:

  • f(x) = 3x2 + 7x + 2
  • g(x) = x2 – 2
  • h(x) = 9x2 + 5x

Table of Content

  • Quadratic Function Formula
  • Key terms in Quadratic Function
    • Vertex
    • Axis of Symmetry
    • Domain and Range
    • Maximum or Minimum Value
  • Forms of Quadratic Functions
  • Types of Quadratic Functions
    • Univariate Quadratic Functions
    • Bivariate Quadratic Function
    • Multivariate Quadratic Function
  • Graphing Quadratic Function
    • Shifting of Graph
  • How to Solve Quadratic Equations
    • Real and Complex Solutions
  • Solved Examples of Quadratic Function

Quadratic Function Formula

General Form of a quadratic function: f(x) = ax2 + bx + c where a ≠ 0. To find the roots of the given quadratic function we apply the quadratic function formula.

x = [-b ± √ (b2 - 4ac)] / 2a

Where,
(b2 - 4ac) is called the Discriminant of the quadratic function, and
a, b, and c are coefficients in the quadratic function.

Learn More: Quadratic Formula

Key terms in Quadratic Function

Some of the key features of Quadratic Functions are Vertex, Axis of Symmetry, Domain, and Range, Maximum or Minimum Value.

Quadratic-Function

Let's learn about these features in detail as follows:

Vertex

The vertex is the point where the axis of symmetry intersects the parabola. It represents the highest or lowest point on the graph, depending on whether the parabola opens upwards or downwards.

  • Coordinates of the vertex = \big( \,\frac{-b}{2a}, f \big( \frac{-b}{2a} \big) \big )
  • Direction of the parable:
  • If a > 0, the parabola opens upwards.
  • If a < 0, the parabola opens downwards.

Read More: Vertex Form of Quadratic Equation

Axis of Symmetry

The axis of symmetry is the vertical line that passes through the vertex, dividing the parabola into two symmetric halves.

  • Equation of the axis of symmetry: x = \frac{-b}{2a}

Learn More: Axis of Symmetry of a Parabola

Domain and Range

  • Domain: The set of all real values for x, so the domain of a quadratic function is (−∞, ∞).
  • Range: The set of possible values for f(x), or the y-values, which depend on the vertex and the direction of the parabola:
    • If a > 0, the range is\left[f\left(\frac{-b}{2a}\right), \infty\right).
    • If a < 0, the range is(-\infty, f\left(\frac{-b}{2a}\right)].

Maximum or Minimum Value

The maximum or minimum value of a quadratic function occurs at the vertex. The sign of the leading coefficient aaa determines whether the value is a maximum or minimum:

  • Minimum value: If a > 0, the function has a minimum value at x = \frac{-b}{2a}​, with the minimum value beingf\left(\frac{-b}{2a}\right) = \frac{-D}{a}, where D is the discriminant.
  • Maximum value: If a < 0, the function has a maximum value at x = \frac{-b}{2a} with the maximum value being f\left(\frac{-b}{2a}\right) = \frac{-D}{a}.

Forms of Quadratic Functions

  • Standard Form

The standard or general form of a quadratic function is given as follows:

f(x) = ax2 + bx + c
Where,
a, b, and c are real numbers and a ≠ 0.

Learn more: Standard form of Quadratic Equation

  • Vertex Form

In the vertex form of quadratic function, the quadratic function is of the form:

f(x) = a(x - h)2 + k
Where a ≠ 0 and (h, k) is the vertex of the parabola that represents quadratic function.

  • Intercept Form

In the intercept form of quadratic function, the quadratic function is of the form:

f(x) = a (x - p) (x - q)
where, a ≠ 0 and (p, 0) and (q, 0) are the x-intercepts of the parabola representing the quadratic function.

Note: For the standard form of quadratic function i.e., f(x) = ax2 + bx + c

Vertex of quadratic function = (h, k) = ((- b / 2a), f (- b / 2a))

Types of Quadratic Functions

There are three types of quadratic functions:

  • Univariate quadratic functions
  • Bivariate quadratic functions
  • Multivariate quadratic functions

Univariate Quadratic Functions

The quadratic function that involves only one variable is called the univariate quadratic function and all the discussion throughout this article involves only this type of quadratic function. Thus, the general form of univariate quadratic function is given as:

f(x) = px2 + qx + r

Where,
x is the variables, and p, q, and r are the coefficients of variables.

Bivariate Quadratic Function

The quadratic function that involves two variables is called the bivariate quadratic function and the general form of  bivariate quadratic function is given as:

f(x) = ax2 + by2 + cx + dy + exy + f

Where,
x, and y are variables, and a, b, c, d, e, and f are the coefficients of variables.

Multivariate Quadratic Function

The quadratic function that involves three or more variables is called the multivariate quadratic function. The general form of a multivariate quadratic function with three variables is given as:

f(x) = ax2 + by2 + cz2 + dx + ey + fxy + gyz + hxz + i

Where,
x, y, and z are variables, and a, b, c, d, e, f, g, h, and i are the coefficients of variables.

Graphing Quadratic Function

The graph of the quadratic function is a U-shaped parabola whose direction is either upwards or downwards.

Steps to plot a graph of a quadratic function:

  1. Find the vertex of the quadratic function.
  2. Construct the table for different values of x and substitute it to find the value of quadratic function f(x) i.e., y.
  3. Plot the points in the graph and join them to get a graph for the given quadratic function.

Example: Plot the graph for the quadratic function f(x) = x2 - x - 6.

Solution:

For function, f(x) = x2 - x - 6

Here, a = 1, b = -1, c = -6

Step 1: The vertex of above quadratic function = (-b / a, f(-b/a))

f(-b/a) = f [-(-1)/1] = f(1) = -6

The vertex of above quadratic function = (1, -6)

Step 2: Following is the quadratic function table

x

-2

-1

0

1

2

y

0

- 4

-6

-6

-4

Step 3: Plot the graph from above table.

Graphing Quadratic Function

Shifting of Graph

By changing the vertex we can shift the graph in the cartesian plane anywhere, we can make two kinds of shifts by changing the vertex parameters i.e., 

Horizontal Shift

The quadratic function graph of f(x) = (x - h)2 shifts the graph of f(x) = x2 by h units horizontally.

  • If h>0, then shift the parabola h units towards the left.
  • If h<0, then shift the parabola h units towards the right.

Shifting of Graph

Vertical Shift

The quadratic function graph of f(x) = x2 + k shifts the graph of f(x) = x2 by k units vertically.

  • If k > 0, then shift the parabola k units upwards.
  • If k < 0, then shift the parabola |k| units downwards.

How to Solve Quadratic Equations

For a quadratic function, f(x) we can form it into any quadratic equation by equating it to any quadratic, linear of constant function i.e., f(x) = g(x) is a quadratic equation if g(x) is a function with at most degree 2. To solve such an equation, we have various methods such as:

  • Factorization Method,
  • Completing Square Method,
  • Quadratic Formula Method.

Learn the details of the solution by reading Quadratic equations

Real and Complex Solutions

In quadratic equation ax2 + bx + c where, a ≠ 0, the discriminant of the equation is given by:

Discriminant (D) = b2 - 4ac

The nature of the roots depends on the discriminant of the quadratic equation.

  • If D > 0 then, the roots are real and distinct.
  • If D = 0 then, the roots are real and equal.
  • If D < 0 then, there are no real roots of the given equation or only complex or imaginary roots exist.

Solved Examples of Quadratic Function

Problem 1: Find the vertex of the quadratic function f(x) = 5(x - 3)2 + 6

Solution:

f(x) = 5(x - 3)2 + 6

The above quadratic function represents the vertex form of the quadratic equation which can be written as:

f(x) = a(x - h)2 + k

where, (h, k) is the vertex of quadratic function.

Here, h = 3 and k = 6

The vertex of the quadratic equation f(x) = 5(x - 3)2 + 6 is (3, 6).

Problem 2: Find the roots of the quadratic function f(x) = x2 + 5x + 6 using the quadratic function formula.

Solution:

f(x) = x2 + 5x + 6

The quadratic equation formula: x = [-b ± √ (b2 - 4ac)] / 2a

Here, a =1, b =5 and c= 6

x = [-5 ± √ (52 - 4 × 1 × 6)] / 2 × 1
x = [-5 ± √ (25 - 24)] / 2
x = [-5 ± √1)] / 2
x = [-5 ± 1)] / 2
x = [-5 + 1)] / 2 or x = [-5 - 1)] / 2
x = -4 / 2 or x = -6 / 2
x = -2 or x = -3

Problem 3: Convert the quadratic function f(x) = (x - 4) (x + 5) in standard form.

Solution:

f(x) = (x - 4) (x + 5)

Multiplying both brackets

f(x) = x(x + 5) - 4(x + 5)
f(x) = x2 + 5x - 4x - 20
f(x) = x2 + x - 20

The quadratic function f(x) = (x - 4) (x + 5) in standard form is f(x) = x2 + x - 20

Problem 4: Solve: f(x) = x2 + 4x - 45 using quadratic formula.

Solution:

f(x) = x2 + 4x - 45

The quadratic equation formula: x = [-b ± √ (b2 - 4ac)] / 2a

Here, a =1, b = 4 and c = -45

x = [-4 ± √ (42 - 4 × 1 × -45)] / 2 × 1
x = [-4 ± √ (16 + 180)] / 2
x = [-4 ± √196)] / 2
x = [-4 ± 14)] / 2
x = [-4 + 14)] / 2 or x = [-4 - 14)] / 2
x = -10 / 2 or x = -18 / 2

x = -5 or x = -9


Next Article
Quadratic Function

A

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

Similar Reads

    Graph of Quadratic Function
    Graphing quadratic functions or equations results in a U-shaped curve known as a parabola. This graph shape provides insights into the behavior of the quadratic equation. Analyzing the parabola is essential when studying the motion of objects under the influence of gravity, where the trajectory form
    10 min read
    Square Function
    A square function is also a quadratic function. A square function is represented as f(x) = x2. The graph of the square function is in the shape of a parabola or U- shaped. Based on the coefficient of x2 (highest degree in a square function), the graph may be U- shaped or Inverted U- shaped.In this a
    8 min read
    Rational Function
    A Rational Function is a type of function that is expressed as a fraction, where both the numerator and denominator are polynomial, and the denominator cannot be equal to zero. In simple words, a rational function can be defined as the ratio of two polynomials.Rational Function is a mathematical exp
    12 min read
    Graphing Function
    Graphing Function is the process of illustrating the graph (the curve) for the function that corresponds to it. Plotting simple functions like linear, quadratic, cubic, et al. examples doesn’t pose a challenge; depicting functions of a more complex nature like rational, logarithmic, and others requi
    13 min read
    Relation and Function
    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
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