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 Formula
Next article icon

Quadratic Formula

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

Quadratic Formula is used to find the roots (solutions) of any quadratic equation. Using the Quadratic formula real and imaginary all the types of roots of the quadratic equations are found.

The quadratic formula was formulated by a famous Indian mathematician Shreedhara Acharya, hence it is also called Shreedhara Acharya's Formula. It is used to find the solution of the quadratic equation of the form

ax2 + bx + c = 0

where a ≠ 0, and a, b, and c are real constants.

For a Quadratic equation, f(x) = ax2+ bx + c where a is not equal to 0 and a, b, and c are real numbers; the solution of f(x) = 0 is given by Quadratic Formula i.e.,

QuadraticFormula
Quadratic Formula

The term under the square root i.e., b2 - 4ac, is called the discriminant, which determines the nature of the roots:

  • discriminant > 0, the equation has two real and distinct roots.
  • discriminant = 0, the equation has exactly one real root (a repeated root).
  • discriminant < 0, the equation has two complex (or imaginary) roots.

Table of Content

  • Derivation of Quadratic Formula
    • By Completing the Square Technique
    • Shortcut Method of Derivation
  • Roots of Quadratic Equation by Quadratic Formula
  • Discriminant of a Quadratic Equation
    • Nature of Root of Quadratic Equation
    • Maximum and Minimum Value of Quadratic Expression
  • What is Quadratic Formula used for?
    • Solving Quadratic Equation Using Quadratic Formula
  • Solved Example on Quadratic Formula

Example: Find the roots of the equation x2 + 5x + 6 = 0.

Solution

For x2 + 5x + 6 = 0, use the quadratic formula:

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

Substitute into the formula:

x = \frac{-5\pm\sqrt{5^2-4(1)(6)}}{2(1)}

x = \frac{-5\pm\sqrt{25-24}}{2}

x = \frac{-5\pm 1}{2}

The two solutions are: x = −2 and x = −3

Derivation of Quadratic Formula

We can easily derive the quadratic formula, using two methods 

  • By Completing the Square Technique
  • Shortcut Method of Derivation

Now let's learn about them in detail.

By Completing the Square Technique

Derivation of the quadratic formula is achieved by using the Completing Square method

Let us take the standard form of a quadratic equation i.e. ax2 + bx + c = 0

Dividing the equation by the coefficient of x2, i.e., x2 + (b/a)x + (c/a) = 0

Subtracting c/a from both sides: x2 + (b/a)x = -c/a

Now, by completing the square method,

We have to add a specific constant to both sides of the equation to make the LHS a complete square.

Here, we add (b/2a)2 to both sides of the equation

x2 + (b/a)x + (b/2a)2 = (-c/a) + (b/2a)2

Using a2 + 2ab + b2 = (a + b)2,

⇒ [x + (b/2a)]2 = (-c/a) + (b2/4a2)
⇒ [x + (b/2a)]2 = (b2 – 4ac)/4a2

Taking square root on both sides, [x + (b/2a)] = √[(b2 – 4ac)] / 2a

Now, subtracting b/2a from both sides we get

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

This is the required quadratic formula.

Shortcut Method of Derivation

The quadratic formula is derived by the shortcut method as,

The given standard form of a quadratic equation is,

ax2 + bx + c = 0

Multiply both sides by 4a

4a(ax2 + bx + c) = 4a × (0)

⇒ 4a2x2 + 4abx + 4ac = 0

⇒ 4a2x2 +4abx = -4ac

By completing the square method, add b2 on both sides.

4a2x2 + 4abx + b2 = b2 – 4ac

⇒ (2ax)2 + 2(2ax)(b) + b2 = b2 – 4ac    {We know that, a2 + 2ab + b2 = (a + b)2)}

⇒ (2ax + b)2 = b2 – 4ac

Taking square root

2ax + b = ±√(b2 – 4ac)

⇒ 2ax = -b ±√(b2 – 4ac)

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

This proves the quadratic formula.

Roots of Quadratic Equation by Quadratic Formula

A quadratic equation is a two-degree quadratic equation and it has two a maximum of two roots. They can either be real, or imaginary. 

The roots of the quadratic equation is the value that satisfies the quadratic equation thus, we can say that if the given quadratic equation is, ax2 + bx + c = 0, and if α is a root of the quadratic equation, then α satisfies the quadratic equation, i.e., aα2 + bα + c = 0. We also define roots of the quadratic equations ax2 + bx + c =  as the zeros of the polynomial ax2 + bx + c.

We can easily find the roots of the quadratic equation by using the following quadratic formula,

\bold{x = \frac{-b \pm \sqrt{b^2 – 4ac}}{2a}}

This gives the two roots of the quadratic equation, 

Taking +ve Sign

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

Taking -ve Sign

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

Thus using the quadratic formula we easily get the roots of the quadratic equation.

Discriminant of a Quadratic Equation

The discriminant of a quadratic equation ax2 + bx + c = 0 is denoted by D and given by,

D = b2 - 4ac

Discriminant of a Quadratic Equation is very helpful in determining the nature of the root of quadratic equations.

Nature of Root of Quadratic Equation

To find the nature of the roots of the quadratic equation we find the discriminant of the given quadratic equation. The term is called discriminant because it determines the nature of the roots of the quadratic equation based on its sign.

There are 3 types in the nature of roots, 

Discriminant

Nature of Roots

D > 0 (b2 - 4ac > 0)

Real and distinct roots

D = 0 (b2 - 4ac = 0)

Real and equal roots

D < 0 (b2 - 4ac = 0)

Imaginary Roots.

Maximum and Minimum Value of Quadratic Expression

The maximum and minimum values for the quadratic equation of the form ax2 + bx + c = 0 can be observed with the help of graphs.

  • If the value of a is positive i.e. (a > 0), the quadratic equation has a minimum value at x = -b/2a i.e., -D/4a.
  • If the value of a is negative i.e. (a < 0), the quadratic equation has a maximum value at x = -b/2a i.e., -D/4a.

Where D is the discriminant of the Quadratic Expression.

What is Quadratic Formula used for?

The quadratic formula is the most used formula in algebra and it is used for solving quadratic equations and finding their roots instantly without performing various steps. It gives the solution of the quadratic equations where the normal solution is not possible. We use this formula for solving various types of problems in algebra, factoring equations, graphing various curves, and others.

Solving Quadratic Equation Using Quadratic Formula

Follow the steps given below to solve Using Quadratic Formula

Step 1: Write the given equation in standard form as, ax2+ bx + c = 0

Step 2: Carefully note the coefficient from the above equation as, a, b and c.

Step 3: Use the Quadratic Formula, x = [-b ± √(b2 – 4ac)] / 2a

Step 4: Put all the values of a, b and c and simplify for x.

We can understand this with the help of the following example.

Example: Simplify x2 + x - 6

Solution:

Step 1: Comparing x2 + x - 6 with ax2+ bx + c = 0

Step 2: a = 1, b = 1, and c = -6

Step 3: Using the quadratic formula,

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

Step 4: Simplifying

x = [-b ± √(b2 – 4ac)] / 2a
⇒ x = [-1 ± √(12 – 4(1)(-6))] / 2(1)
⇒ x = [-1 ± √(4 + 4(1)(6))] / 2(1)
⇒ x = (-1 ± 5)/2
⇒ x = (-1-5)/2 = -3
⇒ x = (-1+5)/2 = 2

Thus, the values of x are x = -3 and x = 2

Read More,

  • Quadratic Function
  • Quadratic Inequalities
  • Solving Cubic Equations

Solved Example on Quadratic Formula

Example 1: Write the quadratic function f(x) = (x - 9)(x + 3)in the general form ofax2 + bx + c.

Solution: 

Given, the function as (x - 9)(x + 3)

= x2 + 3x - 9x - 27
= x2 - 6x - 27

This is the required form.

Example 2: Find the constants a, b, and c in the general form of equation 4x2 + 5x + 9 = 0.

Solution: 

Given, equation is 4x2 + 5x + 9 = 0....(1)

General form of quadratic equation is ax2 + bx + c = 0.

Comparing the given equation with general equation we get,

a = 4, b = 5, c = 9.

Example 3: Write the quadratic function f(x) = (x + 8)(x - 3) in the general form of ax2 + bx + c.

Solution:

Given, the function as (x + 8)(x - 3) 

= x2 - 3x + 8x - 24
= x2 + 5x - 24 [Which is the general form]

Example 4: Find the roots of equation 2x2 - 4x + 2 = 0.

Solution: 

Here a = 2, b = -4, c = 2, to find the roots of the equation, first we need to find the discriminant value which helps us to know the nature of roots.

⇒ Discriminant = b2 - 4ac = (-4)2 - 4(2)(2) 
⇒ Discriminant = 16 - 16 = 0 [which is equal to zero] 

So, it has real and equal roots.

Roots = (−b ± √(b2 − 4ac)) / 2a

⇒ Roots = {-(-4) ± √(0) } / 2(2)
⇒ Roots = 4 / 4 = 1

Thus, 1 is the root of the equation.

Example 5: Find the roots of equation 4x2 - 3x + 3.

Solution: 

Here a = 4, b = -3, c = 3, to find the roots of the equation, first we need to find the discriminant value which helps us to know the nature of roots.

Discriminant = b2 - 4ac 
⇒ Discriminant = (-3)2 - 4(4)(3) 
⇒ Discriminant = 9 - 48 = -39  [which is negative]

So, it has complex roots.

Roots = {−b ± √(b2 − 4ac)] / 2a
⇒ Roots = (-(-3) ± √-39 / 2(4) )
⇒ Roots = (3 ± 39i)/8 

Thus, (3 + 39i)/8 and (3 - 39i)/8 are the roots of the quadratic equation.

Example 6: Find the roots of the quadratic equation 6x2 - 8x + 2 = 0.

Solution:

Here a = 6, b = -8, c = 2, to find the roots of the equation, first we need to find the discriminant value which helps us to know the nature of roots.

Discriminant = b2 - 4ac 

⇒ Discriminant = (-8)(-8) - 4(6)(2) 
⇒ Discriminant = 64 - 48 = 16 [which is positive] 

So, it has real and distinct roots.

x = (-b ± √ (b² - 4ac) )/2a
⇒ x = (-(-8) ± √(16) / 2(6)
⇒ x = (8 ± √16) / 12
⇒ x =  (8 ± 4)12

Taking +ve sign, we get x = 1, and 

Taking -ve sign, we get x = 1/3.

Thus, 1/3 and 1 are the roots of the equation.


Next Article
Quadratic Formula

B

bayyamohith32
Improve
Article Tags :
  • Mathematics
  • School Learning
  • Maths MAQ
  • Maths-Formulas

Similar Reads

    Simplification and Approximation

    Profit and Loss

    Mixtures & Allegations

    Mixture and Alligation - Solved Questions and Answers
    Question 1: From a vessel of 20 liters of pure milk, 1 liter is taken out and replaced with water, so as to keep the volume constant at 20 liters. This process is repeated 5 times. Find the percentage of pure milk left in the vessel after 5 replacements. Solution: Here, we need to apply the formula
    3 min read
    Mixture and Alligation | Set 2
    Question 1: 30 litres of a mixture of milk and water contains 10% of water, the water to be added, to make the water content 25% in the new mixture. Find how many litres water will be added? Solution : Water in the 30 litre of mixture = 30 x 10/100 = 3 litres Milk in the mixture = 30 - 3 = 27 litres
    3 min read

    Simple Interest & Compound Interest

    Simple Interest
    Simple Interest (SI) is a method of calculating the interest charged or earned on a principal amount over a fixed period. It is calculated based solely on the principal amount, which remains unchanged throughout the calculation.Simple Interest is widely used across industries such as banking, financ
    9 min read
    Compound Interest
    Compound Interest is the interest that is calculated against a loan or deposit amount in which interest is calculated for the principal as well as the previous interest earned. Compound interest is used in the banking and finance sectors and is also useful in other sectors. A few of its uses are:Gro
    9 min read
    Time and Work - Aptitude Questions and Answers
    Time and Work is one of the most basic concepts in Quantitative Aptitude, which is tested extensively in government exams. Undoubtedly, having a strong background in this topic can give candidates an upper hand and help them to score well in competitive exams. A candidate needs to be aware of the ba
    13 min read

    Time,Speed,and Distance

    Mensuration and Geometry

    Mensuration in Maths
    Mensuration is a branch of mathematics that deals with measuring geometric figures, including their length, area, volume, and surface area. It provides formulas and techniques for calculating these attributes for 2D (plane) shapes and 3D (solid) objects.Types of Mensuration 2D Mensuration- Deals wit
    4 min read
    Geometry
    Geometry is a branch of mathematics that studies the properties, measurements, and relationships of points, lines, angles, surfaces, and solids. From basic lines and angles to complex structures, it helps us understand the world around us.Geometry for Students and BeginnersThis section covers key br
    2 min read
    Introduction to Geometry
    Geometry is the branch of mathematics that deals with the shapes, angles, dimensions, and sizes of various things that we see in everyday life. It is mainly divided into plane and solid geometry. In plane geometry, 2d shapes such as triangles, squares, rectangles, and circles are studied. Whereas, i
    9 min read
    Coordinate Geometry
    Coordinate geometry is a branch of mathematics that combines algebra and geometry using a coordinate plane. It helps us represent points, lines, and shapes with numbers and equations, making it easier to analyze their positions, distances, and relationships. From plotting points to finding the short
    3 min read

    Ratio & Proportion,Percentage

    Ratios and Percentages
    Ratios and Percentages: Comparing quantities is easy, each of the quantities is defined to a specific standard and then the comparison between them takes place after that. Comparing quantities can be effectively done by bringing them to a certain standard and then comparing them related to that spec
    6 min read
    Ratio and Proportion
    Ratio and Proportion are used for comparison in mathematics. Ratio is a comparison of two quantities while Proportion is a comparison of two ratios. When a fraction a/b is written a:b then it is termed as a ratio b. When two ratios let's say a:b and c:d are equal a:b and c:d are said to be proportio
    8 min read

    Number System

    What is a Number System?
    A number system is a way of writing numbers using specific symbols or digits. It helps us represent numbers mathematically. There are different types of number systems, such as the decimal system, binary system, octal system, and hexadecimal system.Here, we will discuss the types of number systems i
    4 min read
    Number System in Maths
    Number System is a method of representing numbers on the number line with the help of a set of Symbols and rules. These symbols range from 0-9 and are termed as digits. Let's learn about the number system in detail, including its types, and conversion.Number System in MathsNumber system in Maths is
    13 min read

    Sequence & 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
    Sequences and Series Formulas
    Sequences and Series Formulas: In mathematics, sequence and series are the fundamental concepts of arithmetic. A sequence is also referred to as a progression, which is defined as a successive arrangement of numbers in an order according to some specific rules. A series is formed by adding the eleme
    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