Solving Quadratic Equations Graphically

April 12, 2026

Problem

Solve x² − 5x + 6 = 0 by finding where the parabola y = x² − 5x + 6 crosses the x-axis.

Explanation

When you see an equation like x25x+6=0x^{2} - 5x + 6 = 0, your algebra teacher wants a number — "what value of xx makes this true?" But there's a much more powerful way to think about it. The equation is asking a geometric question in disguise: where does a certain curve cross a certain line?

That shift from algebra to geometry is one of the most important mental moves you can learn in math. It's the whole reason Descartes invented coordinate geometry in the 1600s. Once you see it, quadratic equations stop feeling like a puzzle you have to solve by remembering tricks — they become a picture you can look at.

Let's unpack it step by step, and then solve x25x+6=0x^{2} - 5x + 6 = 0 four different ways so you can see every angle.

The big idea: two functions in disguise

When we write x25x+6=0x^{2} - 5x + 6 = 0, there are secretly two different functions on the two sides of the equals sign:

  • On the left: y=x25x+6y = x^{2} - 5x + 6. This is a full curve — a parabola. For every value of xx, this function spits out some yy-value.
  • On the right: y=0y = 0. This is also a function, but a very simple one. It just always returns zero. Geometrically, it's the x-axis — a horizontal line sitting at height zero.

When we write x25x+6=0x^{2} - 5x + 6 = 0, we're asking: where are these two functions equal? In other words, where does the parabola's height match the height of the x-axis (which is zero)?

So the solutions to the equation are exactly the x-coordinates where the parabola crosses the x-axis. Those crossing points are called "x-intercepts" or "zeros" or "roots" of the function — they're all different names for the same thing.

Go ahead and play with the aa, bb, cc sliders. Watch the parabola change shape. Anywhere it crosses the thick horizontal x-axis, that's a solution to the equation ax2+bx+c=0ax^{2} + bx + c = 0.

Why a parabola and not something else?

A quadratic equation is any equation where the highest power of xx is 22 (not 3, not 4, not 5). The general form is:

y=ax2+bx+cy = a\,x^{2} + b\,x + c

The x2x^{2} term is what makes it curve. Without it (if a=0a = 0), you'd just have y=bx+cy = bx + c, which is a straight line. With it, you get a parabola — a U-shape (or upside-down U-shape) that's symmetric around a central vertical axis.

Some useful facts about parabolas you can confirm with the sliders:

  • If a>0a > 0, the parabola opens upward (like a regular U). The vertex is the minimum point.
  • If a<0a < 0, it opens downward (like an upside-down U). The vertex is the maximum point.
  • The bigger a|a| is, the narrower the parabola. Smaller a|a| makes it wider.
  • Changing bb shifts the parabola sideways and up/down (not just sideways — it's a bit more subtle than that).
  • Changing cc shifts the parabola straight up or down. Notice that cc is also the yy-intercept: plug in x=0x = 0 and you get y=cy = c.

Try setting a=1a = 1, b=0b = 0, then sliding cc. The parabola moves vertically like an elevator. Now try changing bb alone and watch: it slides the whole curve diagonally in a curved path.

The three cases: how many solutions can a quadratic have?

Here's a fantastic visual fact: a parabola can cross the x-axis in at most two places. That's because of its simple U-shape — it can dip below zero, cross to get below, and then cross back to get above, but that's it. There are exactly three possibilities:

Case 1: Two real solutions (Δ>0\Delta > 0)

The parabola crosses the x-axis at two different points. The part of the parabola between those two points is below the x-axis; the parts outside are above it (or the opposite, if the parabola opens downward). This is the most common case — and it's where we'll spend most of our time.

Case 2: One repeated solution (Δ=0\Delta = 0)

The parabola just barely touches the x-axis at exactly one point — the vertex. It doesn't cross through; it kisses the axis and heads back up. Algebraically, the two solutions collapse into a single value. We say the root has "multiplicity 2" or is "repeated."

Try the preset by setting a=1a = 1, b=4b = -4, c=4c = 4. You'll see the parabola tangent to the x-axis at x=2x = 2. That's the only solution to x24x+4=0x^{2} - 4x + 4 = 0, because (x2)2=0(x-2)^{2} = 0 gives only x=2x = 2.

Case 3: No real solutions (Δ<0\Delta < 0)

The parabola sits entirely above the x-axis (or entirely below, if a<0a < 0). It never crosses. Algebraically, you'd try to apply the quadratic formula and end up trying to take the square root of a negative number — which in ordinary real-number arithmetic is "not allowed."

Try a=1a = 1, b=0b = 0, c=1c = 1. The parabola y=x2+1y = x^{2} + 1 sits entirely above the x-axis with vertex at (0,1)(0, 1). The equation x2+1=0x^{2} + 1 = 0 really does have no real solutions — you can see it clearly in the graph.

(In higher math, those "missing" solutions exist as complex numbers — but they don't show up anywhere on a real xyxy-plane, which is why the parabola doesn't cross the axis.)

The discriminant: predicting the case

Here's the crown jewel. There's a single number, called the discriminant, that tells you which of the three cases you're in without ever graphing:

Δ=b24ac\Delta = b^{2} - 4ac

  • Δ>0\Delta > 0 → two real solutions (parabola crosses twice)
  • Δ=0\Delta = 0 → one repeated solution (parabola kisses the axis)
  • Δ<0\Delta < 0 → no real solutions (parabola misses the axis)

Turn on Show discriminant in the controls and slide the coefficients around. Watch the discriminant box change color — green when positive, yellow when zero, red when negative. Those color changes match the three cases exactly.

Where does the discriminant come from? It's the expression inside the square root in the famous quadratic formula. We'll get to the formula in a minute, but here's a preview: if you try to solve ax2+bx+c=0ax^{2} + bx + c = 0 in general, you'll wind up needing b24ac\sqrt{b^{2} - 4ac}, and the behavior of that square root dictates everything.

Solving x25x+6=0x^{2} - 5x + 6 = 0 four different ways

Now let's actually solve our specific equation — the default problem shown on the graph. We'll use four methods, and all four will give exactly the same answer. Each one shows a different angle.

Method 1: Factoring

Factoring is the fastest method when the coefficients are nice. The idea: we try to rewrite x25x+6x^{2} - 5x + 6 as a product of two simpler pieces.

Look for two numbers that simultaneously:

  • Multiply to c=6c = 6
  • Add to b=5b = -5

The factor pairs of 66 are (1,6),(2,3),(1,6),(2,3)(1, 6), (2, 3), (-1, -6), (-2, -3). Let's check the sums:

  • 1+6=71 + 6 = 7
  • 2+3=52 + 3 = 5 ❌ (close — right magnitude, wrong sign)
  • 1+(6)=7-1 + (-6) = -7
  • 2+(3)=5-2 + (-3) = -5

So the two numbers are 2-2 and 3-3. That means:

x25x+6=(x2)(x3)x^{2} - 5x + 6 = (x - 2)(x - 3)

(If you don't believe me, expand it: (x2)(x3)=x23x2x+6=x25x+6(x - 2)(x - 3) = x^{2} - 3x - 2x + 6 = x^{2} - 5x + 6. ✓)

Now the equation is:

(x2)(x3)=0(x - 2)(x - 3) = 0

A product of two things equals zero only if at least one of them is zero. So either:

x2=0x=2x - 2 = 0 \quad \Longrightarrow \quad x = 2

or

x3=0x=3x - 3 = 0 \quad \Longrightarrow \quad x = 3

Solutions: x=2x = 2 or x=3x = 3.

Method 2: The quadratic formula

The quadratic formula handles any quadratic, even ugly ones that don't factor nicely with integers:

x=b±b24ac2ax = \dfrac{-b \pm \sqrt{b^{2} - 4ac}}{2a}

Identify the coefficients from x25x+6=0x^{2} - 5x + 6 = 0: a=1a = 1, b=5b = -5, c=6c = 6.

Step 1: Compute the discriminant.

Δ=b24ac=(5)24(1)(6)=2524=1\Delta = b^{2} - 4ac = (-5)^{2} - 4(1)(6) = 25 - 24 = 1

Positive, so we expect two real solutions.

Step 2: Take its square root.

Δ=1=1\sqrt{\Delta} = \sqrt{1} = 1

Step 3: Plug everything into the formula.

x=(5)±12(1)=5±12x = \dfrac{-(-5) \pm 1}{2(1)} = \dfrac{5 \pm 1}{2}

Step 4: Split into the two cases.

x=5+12=62=3x = \dfrac{5 + 1}{2} = \dfrac{6}{2} = 3

x=512=42=2x = \dfrac{5 - 1}{2} = \dfrac{4}{2} = 2

Solutions: x=2x = 2 or x=3x = 3. Exact same answer as before.

Turn on Show quadratic formula in the controls and you'll see this computation performed live on whatever coefficients are currently set.

Method 3: Completing the square

This method rewrites the quadratic into vertex form a(xh)2+ka(x - h)^{2} + k, which reveals the geometry directly.

Step 1: Move the constant to the right side.

x25x=6x^{2} - 5x = -6

Step 2: Take half of the bb-coefficient, square it, and add it to both sides.

Half of 5-5 is 5/2-5/2. Squared: 25/425/4.

x25x+254=6+254x^{2} - 5x + \dfrac{25}{4} = -6 + \dfrac{25}{4}

Step 3: The left side is now a perfect square. Factor it.

(x52)2=244+254=14\left(x - \dfrac{5}{2}\right)^{2} = -\dfrac{24}{4} + \dfrac{25}{4} = \dfrac{1}{4}

Step 4: Take square roots of both sides (don't forget the ±\pm!).

x52=±12x - \dfrac{5}{2} = \pm\dfrac{1}{2}

Step 5: Solve for xx.

x=52±12x = \dfrac{5}{2} \pm \dfrac{1}{2}

x=3orx=2x = 3 \quad \text{or} \quad x = 2

Same answer. Bonus: this method also tells us the vertex of the parabola is at x=5/2=2.5x = 5/2 = 2.5 (the value we had to add to "complete" the square), with the minimum yy-value equal to 1/4=0.25-1/4 = -0.25.

Toggle Show vertex to confirm the yellow dot appears at (2.5,0.25)(2.5, -0.25).

Method 4: Graphing (what the visualization shows)

Set a=1a = 1, b=5b = -5, c=6c = 6. Turn on Show roots. Two green circles appear on the x-axis — one at x=2x = 2, one at x=3x = 3. The parabola crosses through both of them. Those circles are the solutions.

Notice what the shape tells you:

  • Between the two roots, the parabola is below the x-axis. Toggle Show shaded region and you'll see a pink-shaded area marking where y<0y < 0 — those are the xx-values for which x25x+6x^{2} - 5x + 6 is negative.
  • Outside the roots (for x<2x < 2 and x>3x > 3), the parabola is above the axis. In that region, x25x+6x^{2} - 5x + 6 is positive.
  • Exactly at x=2x = 2 and x=3x = 3, it equals zero. Those are the solutions to the equation.

The vertex: where the parabola turns around

Every parabola has a single point where it reverses direction — either a lowest point (if a>0a > 0) or a highest point (if a<0a < 0). That point is called the vertex, and its xx-coordinate is given by a clean formula:

xvertex=b2ax_{\text{vertex}} = -\dfrac{b}{2a}

For our problem: xvertex=(5)/(21)=5/2=2.5x_{\text{vertex}} = -(-5)/(2 \cdot 1) = 5/2 = 2.5.

Plug that back into the function to get the yy-coordinate:

yvertex=f(2.5)=(2.5)25(2.5)+6=6.2512.5+6=0.25y_{\text{vertex}} = f(2.5) = (2.5)^{2} - 5(2.5) + 6 = 6.25 - 12.5 + 6 = -0.25

So the vertex is at (2.5,0.25)(2.5, -0.25). Toggle Show vertex to see it marked.

Here's a beautiful thing you can check: the vertex's xx-coordinate, 2.52.5, is exactly halfway between the two roots (which are at 22 and 33). That's because parabolas are symmetric around a vertical line through their vertex — called the axis of symmetry. Toggle Show axis of symmetry to draw that dashed line at x=2.5x = 2.5. Every point on the parabola has a mirror image across that line.

This symmetry gives you a handy shortcut for finding vertices: if you already know both roots r1r_{1} and r2r_{2}, the vertex's xx-coordinate is just their average, (r1+r2)/2(r_{1} + r_{2})/2. No formulas needed.

Vertex form: the same parabola, a different address

If you run completing-the-square all the way through, you can rewrite any quadratic in vertex form:

y=a(xh)2+ky = a(x - h)^{2} + k

where (h,k)(h, k) is the vertex. For our problem, we already found h=5/2h = 5/2 and k=1/4k = -1/4, so:

y=(x52)214y = \left(x - \dfrac{5}{2}\right)^{2} - \dfrac{1}{4}

Toggle Show vertex form to see this alternative equation displayed alongside the standard form. They describe the exact same curve — just two different ways of writing it. Standard form makes the yy-intercept easy to read (it's cc); vertex form makes the vertex easy to read (it's (h,k)(h, k)).

Both forms are useful in different situations:

  • When you want to solve the equation (find roots), factoring or the quadratic formula on the standard form are easiest.
  • When you want to describe the shape (find the vertex, determine max/min, understand transformations), vertex form is easiest.

Real-world connections

Quadratics and their solutions aren't just abstract algebra — they model real situations:

Projectile motion. If you throw a ball upward with velocity v0v_{0} from height h0h_{0}, its height at time tt is h(t)=12gt2+v0t+h0h(t) = -\tfrac{1}{2}g t^{2} + v_{0} t + h_{0} — a quadratic in tt. "When does it hit the ground?" means solving h(t)=0h(t) = 0, which is a quadratic equation. The solutions (if there are two) correspond to the ball leaving the ground and returning to it.

Economics and profit maximization. A company's profit as a function of price is often modeled as a downward parabola (too cheap = low revenue per unit, too expensive = few customers). The vertex is the optimal price; the roots are the "break-even" prices where profit is zero.

Engineering — parabolic reflectors. Satellite dishes, car headlights, and flashlight reflectors are all shaped like parabolas because of a special property: all incoming parallel rays converge at the focus of the parabola. Designing them requires solving quadratics.

Physics — energy and binding. Many potential energy functions near equilibrium can be approximated as quadratics. The equilibrium point is the vertex; the "zero-energy" points are the roots.

Common mistakes to watch for

  • Sign errors when factoring. (x2)(x3)(x - 2)(x - 3) gives +6+6, but (x+2)(x+3)(x + 2)(x + 3) also gives +6+6 for the constant term. The middle term's sign tells you which. If you're unsure, expand your answer as a check — multiply it out and see if you recover the original.
  • Forgetting the ±\pm in the quadratic formula. This is the #1 most common mistake. The formula always gives two answers (except when the discriminant is zero). If you only write down one, you've dropped a solution.
  • Confusing yy-intercepts with xx-intercepts. The yy-intercept is at x=0x = 0, which evaluates to y=cy = c. For our problem, that's (0,6)(0, 6). The xx-intercepts are the solutions at x=2x = 2 and x=3x = 3. They're totally different points on the graph. Turn on both Show roots and Show y-intercept simultaneously and you'll see the difference visually.
  • Treating =0= 0 differently from =k= k. If you're asked to solve x25x+6=4x^{2} - 5x + 6 = 4, you cannot just factor the left side. You have to first move the 4 to the left to get x25x+2=0x^{2} - 5x + 2 = 0, and then solve. Only when the equation equals zero can you use the zero-product property.
  • Assuming every quadratic factors nicely. Many don't. Some have irrational roots, some have complex roots. When factoring fails after a few tries, switch to the quadratic formula — it always works.
  • Dropping a solution by dividing by xx. If you see x25x=0x^{2} - 5x = 0, it's tempting to divide both sides by xx to get x5=0x - 5 = 0, so x=5x = 5. But you've lost the solution x=0x = 0! The right move is to factor out the xx: x(x5)=0x(x - 5) = 0, giving both x=0x = 0 and x=5x = 5. Don't divide by something that might be zero.

Try it

  • Sweep the bb slider from 10-10 to 1010. Watch how the parabola slides left and right, and how both roots move together in a synchronized dance around the vertex. The vertex itself follows a curved path (not a straight line), which is a fun thing to notice.
  • Sweep cc up and down. This moves the parabola purely vertically, like an elevator. Starting from two real roots, watch them collide into a single repeated root as cc increases, then disappear entirely (no real roots) as cc keeps going up.
  • Flip aa to negative. The parabola flips upside down. The roots (if any) stay where they were — because they depend only on where y=0y = 0, not on which direction the parabola opens.
  • Turn on the discriminant display and slide bb or cc just until the discriminant crosses zero. Watch the two roots collide, touch, then separate into nothing visible (imaginary). It's a great way to feel what the discriminant is telling you.
  • Drag the probe slider. It's a draggable x-position; the visualization evaluates f(x)f(x) at that location and shows you the value. Hover over a root — the probe's yy-value should be exactly zero.
  • Turn on every toggle at once. The HUD and graph get busy, but you'll see all the key pieces of a quadratic — equation, vertex, vertex form, roots, y-intercept, axis of symmetry, discriminant, quadratic formula — simultaneously. It's a complete picture of what the equation ax2+bx+c=0ax^{2} + bx + c = 0 really means.

Interactive Visualization

Parameters

1.00
-5.00
6.00
2.00
Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day
Solving Quadratic Equations Graphically | MathSpin