Lesson 4 · Solution of Quadratic Equation and Linear Equation using Graphs

Sketching the Graph of the Quadratic Function y = a(x - h)² + k

Optional MathematicsSubject
8 minEstimated read

Quadratic Equations and Al-Khwarizmi

An equation in which the highest power of the variable is 2 is called a quadratic equation. The name comes from the Latin word quadratus, meaning a square, because the variable appears squared. For example, \( x^2 - 5x + 6 = 0 \) and \( 2x^2 = 18 \) are quadratic equations. The equation \( 3x + 4 = 0 \) is not, because the highest power of \( x \) in it is only 1, which makes it linear.

Definition

Quadratic equation: an equation in which the highest power (the degree) of the variable is 2.

The ninth century Persian astronomer, mathematician and researcher Al-Khwarizmi (780 to 850 AD) is regarded as the founder of algebra, and for this reason he is known as the father of algebra. He developed methods for solving quadratic equations, and he is counted as the first mathematician to arrange linear and quadratic equations systematically and to present them as graphs. In his book Kitab al-Jabr he presented the Hindu Arabic numerals, and the word algorithm first came into use through this work. Because that book set out linear and quadratic equations in such an orderly way, its title later gave the subject its name: algebra.

Al-Khwarizmi (780 to 850 AD), remembered as the father of algebra.
Al-Khwarizmi (780 to 850 AD), remembered as the father of algebra.

The Parabola, its Turning Point and its Vertex

Every quadratic equation in one variable can be written in the form \( ax^2 + bx + c = 0 \), where \( a \), \( b \) and \( c \) are real numbers and \( a \neq 0 \). The condition \( a \neq 0 \) matters: if \( a \) were 0, the \( x^2 \) term would disappear and the equation would become linear.

Definition

General quadratic equation: the equation \( ax^2 + bx + c = 0 \) in one variable \( x \), where \( a \), \( b \), \( c \) are real numbers and \( a \neq 0 \).

When we draw the graph of \( y = ax^2 + bx + c \), we never get a straight line. We get a smooth curve shaped like a cup, ∪, or like an upside-down cup, ∩. Think of a ball thrown up into the air: it rises, stops rising for an instant at the top, and then falls. Its path is a ∩ shaped curve of exactly this kind. Which way the curve opens, and where it sits on the graph, depends on the values of the real numbers \( a \), \( b \) and \( c \).

Definition

Parabola: the ∪ shaped or ∩ shaped curve obtained as the graph of the quadratic function \( y = ax^2 + bx + c \).

Definition

Turning point: the point where the parabola changes its direction, from going down to going up, or from going up to going down.

Definition

Vertex: the turning point of a parabola. It is the lowest point of a ∪ shaped parabola and the highest point of a ∩ shaped one.

Changing the General Form into Vertex Form

The form \( y = ax^2 + bx + c \) is called the general form of a quadratic function. It is easy to write down, but it hides the vertex. To sketch the graph we rewrite it as \( y = a(x - h)^2 + k \), in which the vertex \( (h, k) \) can be read off directly. The method used to do this is called completing the square.

Definition

Completing the square: adding and subtracting the same number so that part of an expression becomes a perfect square such as \( (x + p)^2 \).

Step 1: Starting from the general form:

\[ y = ax^2 + bx + c \]

Step 2: Taking \( a \) out as a common factor, which is allowed because \( a \neq 0 \):

\[ y = a\left\{x^2 + \frac{bx}{a} + \frac{c}{a}\right\} \]

Step 3: Writing \( \frac{bx}{a} \) as \( 2 \cdot x \cdot \frac{b}{2a} \), then adding and subtracting \( \left(\frac{b}{2a}\right)^2 \). Adding and subtracting the same number changes nothing:

\[ \begin{aligned} y &= a\Big\{x^2 + 2 \cdot x \cdot \frac{b}{2a} + \Big(\frac{b}{2a}\Big)^2 \\ & - \Big(\frac{b}{2a}\Big)^2 + \frac{c}{a}\Big\} \end{aligned} \]

Step 4: Using \( p^2 + 2pq + q^2 = (p + q)^2 \), the first three terms form a perfect square:

\[ y = a\left\{\left(x + \frac{b}{2a}\right)^2 - \frac{b^2}{4a^2} + \frac{c}{a}\right\} \]

Step 5: Combining the last two terms over the common denominator \( 4a^2 \):

\[ y = a\left\{\left(x + \frac{b}{2a}\right)^2 - \frac{b^2 - 4ac}{4a^2}\right\} \]

Step 6: Multiplying \( a \) into both terms inside the bracket:

\[ y = a\left(x + \frac{b}{2a}\right)^2 - \frac{b^2 - 4ac}{4a} \]

Step 7: Rewriting the plus sign inside the bracket as minus a negative, and the last term with its sign turned round. Call this equation (i):

\[ y = a\left\{x - \left(-\frac{b}{2a}\right)\right\}^2 + \frac{4ac - b^2}{4a} \]

Step 8: Comparing equation (i) with the vertex form, which we call equation (ii):

\[ y = a(x - h)^2 + k \]

The two equations match term by term, so:

\[ h = -\frac{b}{2a} \]

\[ k = \frac{4ac - b^2}{4a} \]

Key idea

The vertex of the parabola \( y = ax^2 + bx + c \) is \( (h, k) = \left(-\frac{b}{2a}, \frac{4ac - b^2}{4a}\right) \), and its axis is the line \( x = h \), that is \( x = -\frac{b}{2a} \).

Using the Formula for the Vertex

The formula gives the vertex straight from \( a \), \( b \) and \( c \), without completing the square each time. Take \( y = 2x^2 - 8x + 3 \). Here \( a = 2 \), \( b = -8 \) and \( c = 3 \).

Step 1: Finding \( h \) by putting \( a = 2 \) and \( b = -8 \) into \( h = -\frac{b}{2a} \):

\[ h = -\frac{-8}{2 \times 2} = \frac{8}{4} = 2 \]

Step 2: Finding \( k \) by putting \( a = 2 \), \( b = -8 \), \( c = 3 \) into \( k = \frac{4ac - b^2}{4a} \):

\[ k = \frac{4 \times 2 \times 3 - 64}{4 \times 2} \]

\[ k = \frac{24 - 64}{8} = \frac{-40}{8} = -5 \]

Step 3: Checking by putting \( x = 2 \) into the original function. The value of \( y \) at the vertex must be \( k \):

\[ y = 2(2)^2 - 8(2) + 3 = 8 - 16 + 3 = -5 \]

The check agrees, so the vertex is \( (2, -5) \) and the function in vertex form is \( y = 2(x - 2)^2 - 5 \).

Common mistake

Watch the sign of \( h \). In \( y = (x + 1)^2 - 4 \) the bracket is \( x - (-1) \), so \( h = -1 \), not 1. The vertex is \( (-1, -4) \). The sign of \( k \) is read exactly as it is printed.

The Shape of the Parabola

To sketch \( y = a(x - h)^2 + k \) we use four features of the parabola: its shape, its vertex, its intercepts and its axis. The first is the shape, and it is decided by the sign of \( a \) alone.

If \( a > 0 \), the parabola opens upward. It has a minimum point, which is the vertex, but no maximum point, because the two arms rise forever. If \( a < 0 \), the parabola opens downward. It has a maximum point, which is the vertex, but no minimum point.

Sign of aThe parabola opensThe vertex is
a > 0 (positive)upward, ∪the minimum point
a < 0 (negative)downward, ∩the maximum point

Compare two graphs. The function \( y = x^2 + 2x \) can be written \( y = (x + 1)^2 - 1 \). Here \( a = 1 \) is positive, so it opens upward with its minimum point at \( (-1, -1) \). The function \( y = -x^2 + 2x + 1 \) can be written \( y = -(x - 1)^2 + 2 \). Here \( a = -1 \) is negative, so it opens downward with its maximum point at \( (1, 2) \).

\( y = x^2 + 2x \) has a positive \( a \): it opens upward and its minimum point is \( (-1, -1) \).
\( y = x^2 + 2x \) has a positive \( a \): it opens upward and its minimum point is \( (-1, -1) \).
\( y = -x^2 + 2x + 1 \) has a negative \( a \): it opens downward and its maximum point is \( (1, 2) \).
\( y = -x^2 + 2x + 1 \) has a negative \( a \): it opens downward and its maximum point is \( (1, 2) \).

The Vertex, the Intercepts and the Axis

The second feature is the vertex. Once the function is written as \( y = a(x - h)^2 + k \), the vertex is simply \( (h, k) \). The third feature is where the parabola cuts the two axes.

Definition

y-intercept: the point where the graph cuts the Y-axis. It is found by putting \( x = 0 \).

Definition

x-intercept: a point where the graph cuts the X-axis. It is found by putting \( y = 0 \).

  • (a) The y-intercept: put \( x = 0 \) in \( y = a(x - h)^2 + k \). The value you get is always the constant term \( c \) of the general form, so the parabola cuts the Y-axis at \( (0, c) \).
  • (b) The x-intercepts: put \( y = 0 \). This gives the quadratic equation \( a(x - h)^2 + k = 0 \). If its roots are \( x_1 \) and \( x_2 \), the parabola cuts the X-axis at \( (x_1, 0) \) and \( (x_2, 0) \). If the equation has no real roots, the parabola does not meet the X-axis at all.

The fourth feature is the axis. The vertical line through the vertex divides the parabola into two halves that are mirror images of each other.

Definition

Axis of the parabola: the vertical line \( x = h \) through the vertex. The parabola \( y = a(x - h)^2 + k \) is symmetric about this line.

Symmetry gives us a free extra point. Any point \( (p, q) \) on the parabola has a partner at the same height, the same distance away on the other side of the axis. Its partner is called the corresponding point, and it is:

\[ (p, q) \;\to\; (2h - p,\ q) \]

For example, if the axis is \( x = 2 \) and \( (0, 3) \) is on the curve, then \( (2 \times 2 - 0, 3) = (4, 3) \) is on the curve too.

The Method in Order

Every sketch in this topic follows the same order. Work through it one line at a time.

  • 1. Write the function in the form y = a(x - h)² + k by completing the square.
  • 2. Shape: look at the sign of a to decide whether the parabola opens upward or downward.
  • 3. Vertex: write down (h, k) and say whether it is the minimum or the maximum point.
  • 4. y-intercept: put x = 0 and find where the curve cuts the Y-axis.
  • 5. x-intercepts: put y = 0, solve the equation and find where the curve cuts the X-axis.
  • 6. Axis: write the line x = h and use it to find the corresponding point of the y-intercept.
  • 7. Sketch: plot all these points and join them with one smooth curve.
Drawing the curve

A parabola is smooth and round at the vertex. Do not join the points with a ruler or draw a sharp V at the bottom or the top.

Worked Example 1

Convert the quadratic function \( y = x^2 - 3 \) into the form \( y = a(x - h)^2 + k \) and sketch its graph.

Step 1: There is no \( x \) term, so no square needs completing. The bracket is \( x - 0 \), and the vertex form is:

\[ y = (x - 0)^2 - 3 \]

Step 2: Shape. Here \( a = 1 \), which is positive, so the parabola opens upward.

Step 3: Vertex. Comparing with \( y = a(x - h)^2 + k \) gives \( h = 0 \) and \( k = -3 \). The vertex is \( (0, -3) \), and it is the minimum point of the parabola.

Step 4: y-intercept. Putting \( x = 0 \):

\[ y = (0 - 0)^2 - 3 = -3 \]

So the parabola cuts the Y-axis at \( (0, -3) \). In this function the y-intercept and the vertex are the same point.

Step 5: x-intercepts. Putting \( y = 0 \) in \( y = x^2 - 3 \):

\[ x^2 - 3 = 0 \]

Moving 3 to the right side:

\[ x^2 = 3 = (\pm\sqrt{3})^2 \]

Taking the square root of both sides:

\[ x = \pm\sqrt{3} = \pm 1.732 \]

The roots are 1.732 and \( -1.732 \), so the parabola cuts the X-axis at \( (1.732, 0) \) and \( (-1.732, 0) \).

Step 6: Axis. The axis is \( x = 0 \), which is the Y-axis itself, so the parabola \( y = x^2 - 3 \) is symmetric about the Y-axis. You can see this in the intercepts: 1.732 and \( -1.732 \) are the same distance from 0.

Step 7: Sketch. Plotting the vertex and the two x-intercepts and joining them with a smooth upward curve gives the graph.

The parabola \( y = x^2 - 3 \), with its vertex at \( (0, -3) \) and x-intercepts at \( (-1.732, 0) \) and \( (1.732, 0) \).
The parabola \( y = x^2 - 3 \), with its vertex at \( (0, -3) \) and x-intercepts at \( (-1.732, 0) \) and \( (1.732, 0) \).

Worked Example 2

Convert the quadratic function \( y = x^2 - 4x + 3 \) into the form \( y = a(x - h)^2 + k \) and sketch its graph.

Step 1: Writing \( 4x \) as \( 2 \cdot x \cdot 2 \), then adding and subtracting \( 2^2 \):

\[ y = x^2 - 2 \cdot x \cdot 2 + 2^2 - 2^2 + 3 \]

Step 2: Using \( p^2 - 2pq + q^2 = (p - q)^2 \) on the first three terms:

\[ y = (x - 2)^2 - 4 + 3 \]

Step 3: Simplifying the numbers:

\[ y = (x - 2)^2 - 1 \]

Step 4: Shape. Here \( a = 1 \), which is positive, so the parabola opens upward.

Step 5: Vertex. Here \( h = 2 \) and \( k = -1 \), so the vertex is \( (2, -1) \). It is the minimum point of the parabola.

Step 6: y-intercept. Putting \( x = 0 \) in \( y = (x - 2)^2 - 1 \):

\[ y = (0 - 2)^2 - 1 = 4 - 1 = 3 \]

So the parabola cuts the Y-axis at \( (0, 3) \). Notice that 3 is the constant term of \( x^2 - 4x + 3 \).

Step 7: x-intercepts. Putting \( y = 0 \) and splitting the middle term, since \( 3 + 1 = 4 \) and \( 3 \times 1 = 3 \):

\[ x^2 - (3 + 1)x + 3 = 0 \]

Opening the bracket:

\[ x^2 - 3x - x + 3 = 0 \]

Taking common factors from each pair:

\[ x(x - 3) - 1(x - 3) = 0 \]

Taking \( (x - 3) \) as the common factor:

\[ (x - 3)(x - 1) = 0 \]

So \( x = 1 \) or \( x = 3 \), and the parabola cuts the X-axis at \( (1, 0) \) and \( (3, 0) \).

Step 8: Axis. The axis is \( x = 2 \), and the parabola is symmetric about it. The y-intercept \( (0, 3) \) is 2 units left of the axis, so its corresponding point is 2 units right of it:

\[ (2 \times 2 - 0,\ 3) = (4, 3) \]

Step 9: Sketch. Plotting \( (2, -1) \), \( (1, 0) \), \( (3, 0) \), \( (0, 3) \) and \( (4, 3) \), and joining them with a smooth upward curve, gives the graph.

The parabola \( y = x^2 - 4x + 3 \): vertex \( (2, -1) \), axis \( x = 2 \), and the two points \( (0, 3) \) and \( (4, 3) \) mirrored across the axis.
The parabola \( y = x^2 - 4x + 3 \): vertex \( (2, -1) \), axis \( x = 2 \), and the two points \( (0, 3) \) and \( (4, 3) \) mirrored across the axis.

Worked Example 3

Convert the quadratic function \( y = -x^2 - 2x + 3 \) into the form \( y = a(x - h)^2 + k \) and sketch its graph.

Step 1: Taking \( -1 \) out as a common factor, so that \( x^2 \) inside the bracket has coefficient 1:

\[ y = -(x^2 + 2x - 3) \]

Step 2: Writing \( 2x \) as \( 2 \cdot x \cdot 1 \), then adding and subtracting \( 1^2 \):

\[ y = -(x^2 + 2 \cdot x \cdot 1 + 1^2 - 1^2 - 3) \]

Step 3: The first three terms form \( (x + 1)^2 \), and \( -1 - 3 = -4 \):

\[ y = -[(x + 1)^2 - 4] \]

Step 4: Multiplying the minus sign into the bracket:

\[ y = -(x + 1)^2 + 4 \]

Step 5: Shape. The coefficient of \( x^2 \) is \( a = -1 \), which is negative, so the parabola opens downward.

Step 6: Vertex. The bracket \( x + 1 \) is \( x - (-1) \), so \( h = -1 \) and \( k = 4 \). The vertex is \( (-1, 4) \), and it is the maximum point of the parabola.

Step 7: y-intercept. Putting \( x = 0 \) in \( y = -(x + 1)^2 + 4 \):

\[ y = -(0 + 1)^2 + 4 = -1 + 4 = 3 \]

So the parabola cuts the Y-axis at \( (0, 3) \).

Step 8: x-intercepts. Putting \( y = 0 \) and splitting the middle term, since \( -3 + 1 = -2 \):

\[ -x^2 - (3 - 1)x + 3 = 0 \]

Opening the bracket:

\[ -x^2 - 3x + x + 3 = 0 \]

Taking common factors from each pair:

\[ -x(x + 3) + 1(x + 3) = 0 \]

Taking \( (x + 3) \) as the common factor:

\[ (-x + 1)(x + 3) = 0 \]

So \( x = 1 \) or \( x = -3 \), and the parabola cuts the X-axis at \( (1, 0) \) and \( (-3, 0) \).

Step 9: Axis. The axis is \( x = -1 \), and the parabola is symmetric about it. The corresponding point of the y-intercept \( (0, 3) \) is:

\[ (2 \times (-1) - 0,\ 3) = (-2, 3) \]

Step 10: Sketch. Plotting \( (-1, 4) \), \( (-3, 0) \), \( (1, 0) \), \( (0, 3) \) and \( (-2, 3) \), and joining them with a smooth downward curve, gives the graph.

The parabola \( y = -x^2 - 2x + 3 \) opens downward from its maximum point \( (-1, 4) \), and is symmetric about the axis \( x = -1 \).
The parabola \( y = -x^2 - 2x + 3 \) opens downward from its maximum point \( (-1, 4) \), and is symmetric about the axis \( x = -1 \).

The Three Examples Side by Side

Putting the three results together shows how each feature comes straight out of the vertex form.

Vertex formOpensVertexx-interceptsAxis
y = (x - 0)² - 3upward(0, -3), minimum(±1.732, 0)x = 0
y = (x - 2)² - 1upward(2, -1), minimum(1, 0), (3, 0)x = 2
y = -(x + 1)² + 4downward(-1, 4), maximum(1, 0), (-3, 0)x = -1

In every row the x-intercepts sit at equal distances on either side of the axis. In the second row, 1 and 3 are each 1 unit from 2. In the third row, 1 and \( -3 \) are each 2 units from \( -1 \). This is a quick way to check your roots before you draw.

🔐

The full lesson is waiting for you

The notes are free to read in full. A free account opens the rest of the practice, and tracks your progress and confidence score for every subject. Presentations and videos need approval from Learn Yeti.