BRAGA

02 Writing02-02 Notes02-02-103

Discriminant

Published 16 Apr 20266 min read
Contents
  1. 01Deep Breakdown
  2. 02Flowchart
  3. 03Real-world use
  4. 04The formula, piece by piece
  5. 05The formula in words
  6. 06Critical Concepts
  7. 07Step-by-step calculation (tiny example)
  8. 08Code examples
Δ=b2−4ac\Delta = b^2 - 4ac
(1)

Deep Breakdown

What it tells me (Situation Awareness): The discriminant Δ=b2−4ac\Delta = b^2 - 4ac is the part under the square root in the quadratic formula. Before solving for the actual roots, the discriminant tells you how many real solutions exist and what type they are — without any additional computation. In data work, it is useful when you need to quickly classify whether a quadratic model has viable (real) solutions, such as whether a break-even point exists at all.

Flowchart

D 0D = 0D < 0Given: ax^2 + bx+ c = 0Compute: D =b^2 - 4acValue of DTwo distinct realrootsParabolacrosses x-axistwiceOne repeatedreal rootParabolatouches x-axisexactly once(vertex)No real rootsParabola doesnot cross x-axis(complex rootsonly)

Real-world use

Where it is used

Determining feasibility before solving: does a price-demand model have a break-even point? Does a trajectory model hit the ground? Does a signal model have real-valued resonance frequencies? The discriminant answers these questions without computing the full formula.

Problem it solves

Computing the full quadratic formula is wasted effort if the roots are complex (i.e., no real solution exists). The discriminant is a fast pre-check: compute it first, classify the situation, then decide whether to proceed.

How it solves the problem

The discriminant is the expression inside the square root: b2−4ac\sqrt{b^2 - 4ac}. If this is negative, the square root is imaginary, meaning no real xx satisfies the equation. If zero, the ±\pm gives the same result: one repeated root. If positive, two distinct roots exist.

Example in a business

Revenue model: R(p)=−p2+50pR(p) = -p^2 + 50p, fixed cost C=700C = 700. Break-even equation: −p2+50p−700=0-p^2 + 50p - 700 = 0 (multiply by −1-1: p2−50p+700=0p^2 - 50p + 700 = 0). Discriminant: 502−4(1)(700)=2500−2800=−300<050^2 - 4(1)(700) = 2500 - 2800 = -300 < 0. No real break-even price exists — revenue never reaches 700700. The discriminant alone flags this: no need to apply the full formula.

The formula, piece by piece

  • Δ\Delta (delta): the Greek letter for "discriminant" — it "discriminates" between solution types
  • b2b^2: the square of the linear coefficient
  • 4ac4ac: four times the product of the leading coefficient and the constant
  • b2−4acb^2 - 4ac: their difference determines the geometry of the parabola relative to the xx-axis Discriminant decision table: | Δ\Delta | Roots | Parabola behaviour | |-----------|-----------------|--------------------------------------| | >0> 0 | Two distinct real | Crosses xx-axis at two points | | =0= 0 | One repeated real | Tangent to xx-axis at vertex | | <0< 0 | No real roots | Entirely above or below xx-axis |

The formula in words

"Compute bb squared minus four times aa times cc. The sign of this number tells you how many real solutions the quadratic has." Δ>0\Delta > 0: "The parabola crosses the xx-axis — two real solutions." Δ=0\Delta = 0: "The parabola just touches the xx-axis — one solution (a double root)." Δ<0\Delta < 0: "The parabola misses the xx-axis entirely — no real solutions."

Critical Concepts

  • Discriminant is not a root. It is a diagnostic value, not the solution itself.

  • Δ=0\Delta = 0 means a perfect square trinomial: ax2+bx+c=a(x−r)2ax^2 + bx + c = a(x - r)^2 for some r=−b/(2a)r = -b/(2a).

  • Large ∣Δ∣|\Delta| means roots are far apart. Small Δ>0\Delta > 0 means roots are close together (near-tangent case, numerically sensitive).

  • Sign of aa and sign of Δ\Delta together determine the parabola's shape: - a>0a > 0, Δ<0\Delta < 0: parabola opens up, always positive — no crossing.

  • a<0a < 0, Δ<0\Delta < 0: parabola opens down, always negative — no crossing.

  • In statistics: Δ\Delta relates to conditions for positive-definiteness in certain quadratic forms.

Step-by-step calculation (tiny example)

Step 1: Read off a, b, c from the equation Equation: 3x2−7x+2=03x^2 - 7x + 2 = 0. a=3a = 3, b=−7b = -7, c=2c = 2.

Step 2: Compute b2b^2 and 4ac4ac separately b2=(−7)2=49b^2 = (-7)^2 = 49. 4ac=4×3×2=244ac = 4 \times 3 \times 2 = 24.

Step 3: Subtract and classify Δ=49−24=25>0\Delta = 49 - 24 = 25 > 0. Two distinct real roots exist. Full roots: x=7±256=7±56x = \frac{7 \pm \sqrt{25}}{6} = \frac{7 \pm 5}{6}, giving x1=2x_1 = 2, x2=13x_2 = \frac{1}{3}.

Code examples

Beginner example (Python)

python
def classify_discriminant(a: float, b: float, c: float) -> dict:
    """Compute and classify the discriminant of ax^2 + bx + c = 0.

    Args:
        a: coefficient of x^2
        b: coefficient of x
        c: constant term

    Returns:
        Dictionary with discriminant value and classification
    """
    delta = b**2 - 4 * a * c
    if delta > 0:
        classification = "Two distinct real roots"
    elif delta == 0:
        classification = "One repeated real root"
    else:
        classification = "No real roots (complex only)"
    return {"delta": delta, "classification": classification}


# Test cases
test_cases = [
    (1, -5, 6),  # 2 real roots
    (1, -2, 1),  # 1 repeated root
    (1, 0, 1),  # no real roots
    (3, -7, 2),  # 2 real roots
]
for (a, b, c) in test_cases:
    result = classify_discriminant(a, b, c)
    print(f"{a}x^2 + {b}x + {c} = 0: Δ = {result['delta']:>5} -> {result['classification']}")

Beginner example (R)

r
classify_discriminant <- function(a, b, c) {
  #' Classify the discriminant of ax^2 + bx + c = 0.
  #' @return List with delta and classification
  delta <- b^2 - 4 * a * c
  classification <- if (delta > 0) {
    "Two distinct real roots"
  } else if (delta == 0) {
    "One repeated real root"
  } else {
    "No real roots (complex only)"
  }
  list(delta = delta, classification = classification)
}
test_cases <- list(c(1, -5, 6), c(1, -2, 1), c(1, 0, 1), c(3, -7, 2))
for (tc in test_cases) {
  result <- classify_discriminant(tc[1], tc[2], tc[3])
  cat(sprintf("%dx^2 + %dx + %d: D = %5g -> %s\n", tc[1], tc[2], tc[3], result$delta, result$classification))
}

Professional example (Python)

python
import numpy as np
import pandas as pd

# Scenario: feasibility screening for quadratic pricing models
# Before computing full roots, use discriminant to flag infeasible cases
np.random.seed(42)
pricing_models = pd.DataFrame({
    "product": ["A", "B", "C", "D", "E"],
    "a": [2.0, 1.0, -1.5, 3.0, 0.5],  # coefficient of p^2
    "b": [-80.0, -40.0, 60.0, -30.0, -20.0],  # coefficient of p
    "c": [600.0, 900.0, -500.0, 400.0, 250.0],  # constant (fixed cost)
})
pricing_models["discriminant"] = (
    pricing_models["b"]**2 - 4 * pricing_models["a"] * pricing_models["c"]
)


def classify_delta(delta: float) -> str:
    if delta > 0:
        return "Feasible (2 break-even prices)"
    elif delta == 0:
        return "Marginal (1 break-even price)"
    else:
        return "Infeasible (no break-even exists)"


pricing_models["feasibility"] = pricing_models["discriminant"].apply(classify_delta)
print("Break-Even Feasibility Screen using Discriminant")
print("Model: a*p^2 + b*p + c = 0 (find break-even price p)")
print()
print(pricing_models[["product", "a", "b", "c", "discriminant", "feasibility"]].to_string(index=False))
print("\nProducts with negative discriminant cannot break even at any price — flag for review.")

Professional example (R)

r
# Break-even feasibility: discriminant b² - 4ac
set.seed(42)
pricing_models <- data.frame( product = c("A", "B", "C", "D", "E"), a = c(2, 1, -1.5, 3, 0.5), b = c(-80, -40, 60, -30, -20), c = c(600, 900, -500, 400, 250)
)
pricing_models$discriminant <- with(pricing_models, b^2 - 4*a*c)
classify_delta <- function(delta) {
  if (delta > 0) "Feasible (2 break-even prices)"
  else if (delta == 0) "Marginal (1 break-even price)"
  else "Infeasible (no break-even exists)"
}
pricing_models$feasibility <- sapply(pricing_models$discriminant, classify_delta)
cat("Break-Even Feasibility Screen using Discriminant\n")
print(pricing_models[c("product", "a", "b", "c", "discriminant", "feasibility")])

Source: 1300 p. 21

#algebra#powers-roots-and-inequalities#equations-and-inequalities

Keyboard shortcuts

Single keys, ignored while typing in a field or with Cmd, Ctrl or Alt held.

0
Home
1 2 3 4
Work, Writing, Tools, About
j / k
Next / previous section on this page
n / p
Next / previous project or essay
u
Up one level
l
Deutsch
t
Light or dark theme
?
This list
Esc
Close