## 3.2 – Graphs of Functions

### Learning Objectives

• (3.2.1) – Graphing functions using a table of values
• Linear functions
• (3.2.2) – Finding function values from a graph
• (3.2.3) – Vertical line test

# (3.2.1) – Graphing functions using a table of values

When both the input (independent variable) and the output (dependent variable) are real numbers, a function can be represented by a coordinate graph. The input is plotted on the horizontal x-axis and the output is plotted on the vertical y-axis.

A helpful first step in graphing a function is to make a table of values. This is particularly useful when you don’t know the general shape the function will have. You probably already know that a linear function will be a straight line, but let’s make a table first to see how it can be helpful.

When making a table, it’s a good idea to include negative values, positive values, and zero to ensure that you do have a linear function.

### Graphing linear functions

Make a table of values for $f(x)=3x+2$.

Make a two-column table. Label the columns x and f(x).

x f(x)

Choose several values for x and put them as separate rows in the x column. These are YOUR CHOICE – there is no “right” or “wrong” values to pick, just go for it.

Tip: It’s always good to include 0, positive values, and negative values, if you can.

x f(x)
$−2$
$−1$
$0$
$1$
$3$

Evaluate the function for each value of x, and write the result in the f(x) column next to the x value you used.

When $x=0$, $f(0)=3(0)+2=2$,

$f(1)=3(1)+2=5$,

$f(−1)=3(−1)+2=−3+2=−1$, and so on.

 x f(x) $−2$ $−4$ $−1$ $−1$ $0$ $2$ $1$ $5$ $3$ $11$

(Note that your table of values may be different from someone else’s. You may each choose different numbers for x.)

Now that you have a table of values, you can use them to help you draw both the shape and location of the function. Important: The graph of the function will show all possible values of x and the corresponding values of y. This is why the graph is a line and not just the dots that make up the points in our table.

Graph $f(x)=3x+2$.
Using the table of values we created above you can think of f(x) as y, each row forms an ordered pair that you can plot on a coordinate grid.

 x f(x) $−2$ $−4$ $−1$ $−1$ $0$ $2$ $1$ $5$ $3$ $11$

Plot the points.

Since the points lie on a line, use a straight edge to draw the line. Try to go through each point without moving the straight edge.

Let’s try another one. Before you look at the answer, try to make the table yourself and draw the graph on a piece of paper.

### Example

Graph $f(x)=−x+1$.

In the following video we show another example of how to graph a linear function on a set of coordinate axes.

These graphs are representations of a linear function. Remember that a function is a correspondence between two variables, such as x and y. These will be discussed in further detail in the next module.

### A General Note: Linear Function

A linear function is a function whose graph is a line. Linear functions can be written in the slope-intercept form of a line

$f\left(x\right)=mx+b$

where $b$ is the initial or starting value of the function (when input, $x=0$), and $m$ is the constant rate of change, or slope of the function. The y-intercept is at $\left(0,b\right)$.

Quadratic functions can also be graphed. It’s helpful to have an idea what the shape should be, so you can be sure that you’ve chosen enough points to plot as a guide. Let’s start with the most basic quadratic function, $f(x)=x^{2}$.
Graph $f(x)=x^{2}$.
Start with a table of values. Then think of the table as ordered pairs.

x f(x)
$−2$ $4$
$−1$ $1$
$0$ $0$
$1$ $1$
$2$ $4$

Plot the points $(-2,4), (-1,1), (0,0), (1,1), (2,4)$

Since the points are not on a line, you can’t use a straight edge. Connect the points as best you can, using a smooth curve (not a series of straight lines). You may want to find and plot additional points (such as the ones in blue here). Placing arrows on the tips of the lines implies that they continue in that direction forever.

Notice that the shape is like the letter U. This is called a parabola. One-half of the parabola is a mirror image of the other half. The line that goes down the middle is called the line of reflection, in this case that line is they y-axis. The lowest point on this graph is called the vertex.

In the following video we show an example of plotting a quadratic function using a table of values.

The equations for quadratic functions have the form $f(x)=ax^{2}+bx+c$ where $a\ne 0$. In the basic graph above, $a=1$, $b=0$, and $c=0$.

Changing a changes the width of the parabola and whether it opens up ($a>0$) or down ($a<0$). If a is positive, the vertex is the lowest point, if a is negative, the vertex is the highest point. In the following example, we show how changing the value of a will affect the graph of the function.

### Example

Match the following functions with their graph.

a) $\displaystyle f(x)=3{{x}^{2}}$

b) $\displaystyle f(x)=-3{{x}^{2}}$

c)$\displaystyle f(x)=\frac{1}{2}{{x}^{2}}$

a)

b)

c)

If there is no b term, changing c moves the parabola up or down so that the y intercept is (0, c). In the next example we show how changes to affect the graph of the function.

### Example

Match the following functions with their graph.

a) $\displaystyle f(x)={{x}^{2}}+3$

b) $\displaystyle f(x)={{x}^{2}}-3$

a)

b)

# (3.2.2) – Finding Function Values from a Graph

Evaluating a function using a graph also requires finding the corresponding output value for a given input value, only in this case, we find the output value by looking at the graph. Solving a function equation using a graph requires finding all instances of the given output value on the graph and observing the corresponding input value(s).

### Example: Reading Function Values from a Graph

Given the graph below,

1. Evaluate $f\left(2\right)$.
2. Solve $f\left(x\right)=4$.

### Try It

Using the graph, solve $f\left(x\right)=1$.

# (3.2.3) – Vertical line test

When both the independent quantity (input) and the dependent quantity (output) are real numbers, a function can be represented by a graph in the coordinate plane. The independent value is plotted on the x-axis and the dependent value is plotted on the y-axis. The fact that each input value has exactly one output value means graphs of functions have certain characteristics. For each input on the graph, there will be exactly one output. For a function defined as $y = f(x)$, or $y$ is a function of $x$, we would write ordered pairs $(x, f(x))$ using function notation instead of $(x,y)$ as you may have seen previously.

We can identify whether the graph of a relation represents a function because for each x-coordinate there will be exactly one y-coordinate.

When a vertical line is placed across the plot of this relation, it does not intersect the graph more than once for any values of $x$.

If, on the other hand, a graph shows two or more intersections with a vertical line, then an input (x-coordinate) can have more than one output (y-coordinate), and $y$ is not a function of $x$. Examining the graph of a relation to determine if a vertical line would intersect with more than one point is a quick way to determine if the relation shown by the graph is a function. This method is often called the “vertical line test.”

You try it.

### Example

Use the vertical line test to determine whether the relation plotted on this graph is a function.

The vertical line method can also be applied to a set of ordered pairs plotted on a coordinate plane to determine if the relation is a function.

### Example

Consider the ordered pairs

$\{(−1,3),(−2,5),(−3,3),(−5,−3)\}$, plotted on the graph below. Use the vertical line test to determine whether the set of ordered pairs represents a function.

In another set of ordered pairs, $\{(3,−1),(5,−2),(3,−3),(−3,5)\}$, one of the inputs, 3, can produce two different outputs, $−1$ and $−3$. You know what that means—this set of ordered pairs is not a function. A plot confirms this.

Notice that a vertical line passes through two plotted points. One x-coordinate has multiple y-coordinates. This relation is not a function.

In the following video we show another example of determining whether a graph represents a function using the vertical line test.