Intersection of a quadratic function and a line

A point where the parabola y=x2y = x^2 meets a line is a point that sits on the parabola and on the line at the same time. At such a point the yy you get from the parabola and the yy you get from the line are exactly equal. So to find an intersection we set those two yy values equal and combine them into a single equation.

Take the line y=2x+3y = 2x + 3. Setting the yy values equal gives x2=2x+3x^2 = 2x + 3, and moving everything to one side gives x22x3=0x^2 - 2x - 3 = 0. This factors as (x3)(x+1)=0(x - 3)(x + 1) = 0, so x=3x = 3 or x=1x = -1. Putting these back into the parabola gives y=9y = 9 and y=1y = 1, so the two intersection points are (3,9)(3, 9) and (1,1)(-1, 1).

The key idea is that the number of solutions of the equation is the number of intersection points. Two solutions mean two crossings, one solution means one, and no solution means the graphs never meet. So "how many times do they cross?" becomes "how many solutions does the equation have?"

You can find that count without fully solving, using the discriminant D=b24acD = b^2 - 4ac of the quadratic ax2+bx+c=0ax^2 + bx + c = 0. It is the part under the square root in the quadratic formula, and its sign decides the number of solutions.

  • D>0D > 0: two solutions → the line cuts the parabola at 2 points
  • D=0D = 0: one solution → the two crossings merge and the line is tangent
  • D<0D < 0: no solution → the line and the parabola do not meet

If you slide a line of the same slope up and down, these three cases appear in turn: while the line runs deep through the parabola there are two crossings, as it drops the two crossings move closer, at one moment they merge into a single point where the line is tangent, and lower still the line leaves the parabola with no crossing at all.

Three lines of slope 22 are drawn on the graph, each giving x22xk=0x^2 - 2x - k = 0 with discriminant D=4+4kD = 4 + 4k. For y=2x+3y = 2x + 3, D=16>0D = 16 > 0, so it crosses twice as we saw. For y=2x1y = 2x - 1, the equation is x22x+1=0x^2 - 2x + 1 = 0, that is (x1)2=0(x - 1)^2 = 0, whose only solution is x=1x = 1; the two intersection points have merged into one, and the line is tangent at (1,1)(1, 1). For y=2x3y = 2x - 3, x22x+3=0x^2 - 2x + 3 = 0 has D=8<0D = -8 < 0, so there is no solution and the line never meets the parabola. The large dots on the graph mark the intersection and tangency points.