xaktly | Algebra | Functions

{ intro. & graphing }

Our first look at curved functions

Quadratic functions are usually the first we encounter that have curved or nonlinear graphs. The graph of a quadratic function is a specific kind of curve called a parabola, a sort of U-shaped figure.*

All quadratic functions include a term that contains the square of the independent variable, like $x^2.$ There can be no higher power of $x$ in a quadratic function. Some examples are

\begin{align} f(x) &= 2x^2 - 3x + 1 \\[5pt] f(x) &= (x - 4)^2 \\[5pt] f(x) &= -x^2 - 71 \end{align}

Quadratic functions have the general form

$$f(x) = Ax^2 + Bx + C$$

where A, B and C are fixed numbers (constants) that don't change, and the highest power of the independent variable (x) is 2.

Notice that in $Ax^2 + Bx + C,$ the x in the second term has an exponent of 1; we just aren't in the habit of writing those "invisible" 1's.

The parent function of all quadratic functions is the simplest, with $A = 1, \; B = C = 0,$ $f(x) = x^2.$

* Pro tip:

Not all U-shaped graphs are parabolas. The parabola is the unique graph of a quadratic function. Even something like a hanging cable or rope isn't really a parabola (it's a catenary), though it's pretty close.

Quadratic functions are very important. There's a lot to cover, so the material is broken up into sections.

The basic or general form of a quadratic function is shown below, where A, B and C are fixed, numerical constants, and where B or C can be zero. If A = 0, of course, there is no x2 term and it's not a quadratic. Terms with x to the first and zero powers are shown, but in practice we write x1 = x and x0 = 1 (which is not written at all - the ghost 1).

The form is usually written like this,

$$f(x) = Ax^2 + Bx + C$$

and we can find other clever ways to disguise it.

Anatomy of a Parabola (vocabulary)

Here are graphs of two parabolas. Use them to learn the terminology we'll use when referring to graphs of curved and parabolic functions.

A parabola is characterized by its vertex (the lowest or highest point of the graph–the bottom or the top), by the direction in which it "opens" – up or down, and by the steepness of the rise of its ends. The ends can rise or fall very steeply or the graph can be very shallow — or anything in between.

The vertex of any parabola is either a global maximum (highest point) or a global minimum (lowest point). It's the point where the slope of the curve (which we define as the slope of the line tangent to the curve at the point of interest) switches from + to -   or   - to +. The vertex of a parabola can be anywhere in the x-y plane.

All parabolas have an axis of symmetry that passes vertically through the vertex. Either side of the parabola is the mirror image of the other across that line. That kind of symmetry is called reflection symmetry.

The roots of a quadratic function (or any function) are the points where it crosses the x-axis, where $f(x) = 0.$ Strictly-speaking, a quadratic function always has two roots, but they might not be real numbers. A parabola can touch the x-axis just once, as on the right above (a "double root"), twice as on the left (two real roots), or not at all, in which case the roots are "imaginary" and can't be plotted on an x-y graph. More on those later.

The function $f(x) = x^2$ is called an even function because $f(-x) = f(x);$ for example, $f(-2) = f(2) = 4.$

Domain and range

The domain of a quadratic function is always $(-\infty, \, \infty;).$

The range of a quadratic function is from the vertex to ±∞, depending on the direction of opening: $(-\infty, \, y] \; \text{or} \; [y, \, \infty).$

Transformations

Morphing $f(x) = x^2$ into any parabola at all by scaling and translating it

Translations & the vertex form

By applying the horizontal and vertical translation transformations we learned in the functions section, we can derive what we call the vertex form of the quadratic function:

$$f(x) = A(x - h)^2 + k ,$$

where   A   is the vertical scaling parameter and (h, k) is the vertex (It's called the vertex form because the coordinates of the vertex embedded in it are obvious). If we expand this (expand means to carry out the squaring of the binomial and distribute the A), we get

Notice the correspondence between the coefficients of the standard form of the quadratic equation: A = A, B = -2Ah and C = Ah2 + k. It is from the correspondence for B that we arrive at an easy formula for the x-coordinate of the vertex of a parabola:

x-coordinate of the vertex:

$$h = \frac{-B}{2A}$$

The y-coordinate is then easily found by plugging h in to the function to get y = f(h). Remember that that's what functions are for – you put in an x to get the y that goes with it in (x, y). You should memorize the formula for the x-coordinate of the vertex. You'll need to use it quite a lot to solve problems: h = -B/2A.

Video 2 below shows you how to convert between standard and vertext form.

The vertex of a parabola (h, k) is obvious if the function is written in vertex form

$$f(x) = A(x - h)^2 + k$$

and if it's written in standard form, $f(x) = Ax^2 + Bx + C,$ the x-coordinate of the vertex is $x = -B/2A.$

Transformations: vertical translation

When we simply add or subtract a constant to/from the end of a function (the k in the vertex form in the box above), the effect on the graph is to raise or lower the whole graph by k units.

Manipulate the slider on the graph to change k in

$$f(x) = x^2 + k$$

If k is negative, the translation is downward, and if k is positive the translation is upward.

Notice that $f(x) = x^2 + k$ is just $f(x) = x^2,$ our parent function, with $k$ added to every $y$ value it produces. The vertical translation is probably the easiest transition to understand, and it works exactly the same way in any function.

Transformations: horizontal translation

When we subtract a constant, $h,$ from the independent variable of any function $(x - h),$ the effect is to translate it left or right (See the functions page to brush up on this). If $h \lt 0,$ the translation is to the left, and if $h \gt 0$ it's to the right. Note that we subtract $h$ from $x$ before squaring (PEMDAS!).

Recall that this "feels" backward:   $(x - 2)^2$ is a $x^2$ shifted two units to the right, and $(x + 2)^2$ is a $x^2$ shifted two units to the left, because it's really $(x - (-2))^2.$ Notice that on when $x$ is negative, we're subtracting a negative number inside the parenthesis:   $(x - -h) = (x + h).$

Move the slider around on the graph to see the effect of changing $h.$ Notice what happens when $h$ gets bigger in both the positive and negative directions.

Combined translations

Putting horizontal and vertical translations together in the same function

In this example, horizontal and vertical translations of 2 units in the positive direction are combined. We can do this sort of thing in exactly the same way for any function at all. More things are the same in mathematics than different!

The function looks like

Transformations: Vertical scaling

When we multiply a function by a constant, A, the effect is to scale (expand or shrink) the graph vertically. If A > 1, the function is stretched vertically. If A < 1 it is compressed vertically, and if A is negative, it still scales the graph by |A|, but it is also flipped across the x-axis. For example, f(x) = x2 has a vertex of (0, 0) and opens upward, but g(x) = -x2 opens downward – but has the same vertex.

Move the slider back and forth to change the value of the A parameter and watch its effect on the function.

Transformations: Horizontal scaling

When we divide the independent variable of a function by a constant number, c, the effect on its graph is horizontal scaling (stretching or compressing). For example, if x is divided by a number greater than 1, the graph is stretched horizontally. If it's divided by a number less than 1 (like ¼ in the plot here) the graph is compressed horizontally.

Move the slider back and forth to see the effect of the parameter c on the function. Notice that horizontal stretching looks a lot like vertical compression, and horizontal compression looks a lot like vertical stretching.

Combining the four transformations

As with all functions, all of the various transformations can be combined for quadratic functions. Starting with the parent function, we can form any quadratic like this:

Transformations

These transformations apply to any kind of function, and they always do the same things. Learn them now so that you'll easily be able to apply and interpret them with the other functions you'll learn along the way.

$$f(x) = A \left( \frac{x}{c} - h \right)^2 + k$$

We have to be careful about the effect of horizontal scaling when we look for the vertex of a quadratic function.

Here's a quadratic that looks like it's stretched by a factor of two in the horizontal direction (accomplished by dividing the independent variable (x) by 2 where it occurs inside the function), and has a vertex of (2, 3).

$$f(x) = \left( \frac{x}{2} - 2 \right)^2 + 3$$

It looks like the vertex of this function should be (2, 3), but it's not. If we expand this function to standard   $(f(x) = Ax^2 + Bx + C$   form, we get

$$f(x) = \frac{1}{4} x^2 - 2x + 7$$

Now we can determine the x-coordinate of the vertex using x = -B/2A, and it's not 2:

$$\frac{-B}{2A} = \frac{1}{2 \cdot \frac{1}{4}} = 4$$

Plugging 4 into the function gives us the y-coordinate,

$$f(4) = \frac{16}{4} - 8 + 7 = 3$$

which is what we'd expect, y = 3. The vertex of this parabola is at (4, 3). So what's going on? That horizontal stretching transformation has moved the vertex horizontally, too. Here's why:

When we multiply the binomial that contains the transformation, that divisor of 2 also contributes to the B term of the function, and therefore affects the x-coordinate of the vertex. Those mixed terms can move the vertex. It's that 2x that's moved the vertex from what we'd expected.

$$= \frac{x^2}{4} - \bf{2x} + 4$$

Example 1

You'll need to become very good at quickly sketching quadratic functions. There are many clues about what the graph of a quadratic looks like; here's a first example.

Sketch the graph of   $f(x) = 2(x - 3)^2 + 1$

Solution: This function is in vertex form. It should appear familiar to you as the parent function of all quadratics, f(x) = x2, with these transformations applied to it:

1. Translate 3 units to the right (long green arrow)
2. Translate 1 unit upward (short green arrow)
3. Scale vertically by a factor of two. (purple curve)

This moves the vertex of the parabola from (0, 0) to (3, 1). Notice that when a quadratic function is in vertex form, we can easily just "read" the vertex from the function definition. The vertical scaling of 2 has the effect of stretching the parabola upward (by a factor of 2) from the vertex.

Now it's easy to sketch the graph →

It's often very useful to sketch the parent function onto a graph first, then follow the transformations to sketch the new function.

Example 2

Sketch the graph of   $f(x) = x^2 + 2x + 1$

Solution: In this example, the function is written in standard form:   $f(x) = Ax^2 + Bx + C.$ The vertex isn't as obvious as in the first example, but we can find it using our vertex formula.

The x-coordinate of the vertex is:

$$h = \frac{-B}{2A} = \frac{-2}{2(1)} = -1$$

The we obtain the y-coordinate simply by plugging x = -1 into the function:

$$f(-1) = (-1)^2 + 2(-1) _ 1 = 0$$

Now because   $A \gt 0,$ the parabola opens upward. It's also easy to find the y-intercept, the point where $x = 0: \; f(0) = 1.$

We'll do more graphing of quadratics below, and that will entail some solving for the roots (f(x) = 0, places where the graph crosses the x-axis, if it does). I've saved that topic for another page, which you might want to skip to now and come back.

Practice problems

1. Sketch graphs of these quadratic functions. Notice that they are all written to make the transformations from f(x) = x2 obvious.

 a. $f(x) = (x - 1)^2 + 2$ Solution b. $f(x) = x^2 - 2$ Solution c. $f(x) = \frac{1}{2}(x + 3)^2 - 4$ Solution d. $f(x) = (x - 1)^2 + 2$ Solution

2. Identify the vertex in each of these quadratic functions. Convert each to standard form, $f(x) = Ax^2 + Bx + C,$ then find the vertex from that form (x-coordinate = $-B/2A$) and confirm that the two are the same.

 a. $f(x) = \frac{3}{4}(x - 2)^2 + 4$ Solution b. $f(x) = -2\left(x - \frac{1}{2}\right)^2 - 1$ Solution c. $f(x) = -(x - 4)^2 + 2$ Solution d. $f(x) = -3(x + 2)^2 - 4$ Solution

3. Convert each of these quadratic functions to vertex form, $f(x) = A(x - h)^2 + k.$

 a. $f(x) = 3x^2 + 2x - 4$ Solution b. $f(x) = x^2/2 + x + 1$ Solution c. $f(x) = -2x^2 + 5x - 11$ Solution d. $f(x) = 4x^2 + 2x - 3$ Solution

More sketching graphs of quadratic functions

It's easy to plot the graph of a quadratic function on a calculator or computer, but being able to do that doesn't guarantee that you'd notice if you keyed something in incorrectly. You will go far if you already have some notion (the more complete the better) of what a function should look like before you ever plot it on a machine.

Pro tip: Anybody can punch a function into a calculator or computer and get a pretty graph. Not just anyone can be sure it's the right graph. Be that person.

1. Find the vertex. First the x-coordinate using $x = -b/2a,$ then the y, using $y = f(x).$

2. Find the y-intercept, $f(0).$ At this point, you can make a decision. If the y-intercept is above a vertex that is itself above the x-axis, then there is no way your parabola can ever cross the x-axis, therefore it must have complex roots, and there's no point in finding them - they won't help you sketch the graph.

3. If the opposite is true, you need to find the roots in order to mark the x-axis crossings. That can be done by completing the square or using the quadratic formula, or - if you're lucky - by direct factoring.

Example 3

Sketch the graph of a quadratic function with complex roots. Note that complex numbers can't be plotted on a Cartesian graph. Complex roots simply mean that the function does not intersect the x-axis: $f(x) = x^2 - 4x + 5.$

Example 4

Sketch the graph of a quadratic function with real roots. Real roots are actual points at which the graph crosses the x-axis, so they're valuable aids to graphing the function. Remember that because of the symmetry of a parabola, the x-coordinate of the vertex lies right between the two roots (it's the average of the two).

Practice problems

Sketch a graph of each of these quadratic functions. In working out the solutions, I've solved each for the roots (f(x) - 0). That's covered in another section: quadratic factoring.

 1 $f(x) = x^2 - x + 2$ 2 $f(x) = 2x^2 - 5x - 3$ 3 $f(x) = 5x^2 - 21x - 20$ 4 $f(x) = 3x^2 - 14x - 5$
 5 $f(x) = x^2 - 16$ 6 $f(x) = 4x^2 - 2x - 12$ 7 $f(x) = x^2 - 3x + 7$ 8 $f(x) = 2x^2 - x + 8$

Finding the equation of a parabola from three points

Through any three points, only one unique parabola can be drawn. That may be a bit hard to come to terms with at first, but remember that a parabola isn't just any curve. It's a very specific kind of curve, the graph of a quadratic function. We'd like to be able to find the equation of that parabola.

Let's say that a parabola passes through three known points, $(x_1, y_1), (x_2, y_2),$ and $(x_3, y_3).$ Now we know that the general form of the equation we're looking for is

$$y = Ax^2 + Bx + C$$

If each of out three points satisfies this equation for a certain set of A, B and C (the things we're really looking for), we have three equations:

\begin{align} y_1 &= Ax_1^2 + Bx_1 + C \\[4pt] y_1 &= Ax_2^2 + Bx_2 + C \\[4pt] y_1 &= Ax_3^2 + Bx_3 + C \end{align}

Now that's three equations and three unknowns (A, B, C), so we should have enough information to determine what they are.

It's probably best at this point to work an example or two, so let's find the equation of the parabola above, which passes through (-4, 8), (1, -4) and (3, -2). Notice that none of these appears to be the vertex of the parabola, but that won't matter. We don't need it.

Here are our three equations:

\begin{align} 8 &= A(-4)^2 + B(-4) + C \\[4pt] -4 &= A(1)^2 + B(1) + C \\[4pt] -2 &= A(3)^2 + B(3) + C \end{align}

These three equations can be solved simultaneously by methods you already know. We first use two sets of two equations to eliminate one of the variables (C is usually easiest in these problems), then use those two equations to solve for the other two, and finally use the results to find the third variable.

Here's how it looks. If we solve all three equations for C, we get:

\begin{align} C &= 8 - 16A + 4B \\[4pt] C &= -4 - A - B \\[4pt] C &= -2 - 9A - 3B \end{align}

Now set two pairs of equations equal to one another, eliminating C: equations 1 and 2, 2 and 3:

\begin{align} 8 - 16A + 4B &= -4 - A - B \\[4pt] -2 - 9A - 3B &= -4 - A - B \end{align}

and rearrange to:

\begin{align} 15A - 5B &= 12 \\[4pt] 4A + B &= 1 \end{align}

Now we've reduced the problem to a two-equations, two-unknowns one. Let's multiply the lower equation by 5 to get

\begin{align} 15A - 5B &= 12 \\[4pt] 20A + 5B &= 5 \end{align}

If we add those (remember that the left sides are equal to the right sides, so that has to be true for the sums, too), we get

$$35A = 17 \; \text{ or } \; A = \frac{17}{35}$$

Then it's easy to plug in $A$ to get $B = -33/35$ and $C = -124/35.$ So the equation of the parabola that fits through our three points is

$$f(x) = \frac{17}{35}x^2 - \frac{33}{35}x - \frac{124}{35}$$

which matches the graph above.

Video examples

4. Completing the square: Example 1

In this example we complete the square to find the roots of a function for which we already know the roots. It's a good example to work through to see that completing the square works!

5. Completing the square: Example 2

In this example, the quadratic function f(x) = 8x2 - 20x - 3 has real roots, but it's not factorable. We complete the square to find the exact roots of the function. There is no difference between completing the square and using the quadratic formula, but I think that knowing how to complete the square will help you to understand a lot about basic algebra steps. You should learn it!

7. Derivation of the quadratic formula – a must-see.

In this example, we start with f(x) = Ax2 + Bx + C and complete the square to derive the quadratic formula.

Minutes of your life: 2:04 (and well worth it!)

8. Completing the square to obtain imaginary roots

In this example, we find the roots of f(x) = 3x2 - 4x + 7, which are imaginary (or more accurately, are complex with non-zero imaginary parts. We also use the discriminant to show how to determine before-hand that the roots of a quadratic function will be non-real.