# Modeling with tables, equations, andย graphs

See how relationships between two variables like number of toppings and cost of pizza can be represented using a table, equation, or a graph.

Math is all about relationships. For example, how can we describe the relationship between a person's height and weight? Or how can we describe the relationship between how much money you make and how many hours you work?

**The three main ways to represent a relationship in math are using a table, a graph, or an equation.**In this article, we'll represent the same relationship with a table, graph, and equation to see how this works.

**Example relationship:**A pizza company sells a small pizza for $\$6$ . Each topping costs $\$2$.

## Representing with a table

We know that the cost of a pizza with $0$ toppings is $\$6$, the cost of a pizza with $1$ topping is $\$2$ more which is $\$8$, and so on. Here's a table showing this:

Toppings on the pizza $(x)$ | Total cost $(y)$ |
---|---|

$0$ | $\$6$ |

$1$ | $\$8$ |

$2$ | $\$10$ |

$3$ | $\$12$ |

$4$ | $\$14$ |

Of course, this table just shows the total cost for a few of the possible number of toppings. For example, there's no reason we couldn't have $7$ toppings on the pizza. (Other than that it'd be gross!)

Let's see how this table makes sense for a small pizza with $4$ toppings.

Here's the cost of just the pizza:

Here's the cost of the $\blueD4$ toppings:

$\blueD4$ toppings $\cdot$ $\$2$ per topping $=$ $\$\goldD8$

This leads to the total cost of

$\$\greenD6 + \$\goldD8 = \$14$.

## Representing with an equation

Let's write an equation for the total cost $y$ of a pizza with $x$ toppings.

Here's the cost of just the pizza:

Here's the cost of $x$ toppings:

$x$ toppings $\cdot$ $\$2$ per topping $=$ $x \cdot 2 = \goldD{2x}$

So here's the equation for the total cost $y$ of a small pizza:

Let's see how this makes sense for a small pizza with $3$ toppings:

$x = \blueD3$ because there are $\blueD3$ toppings

The total cost is $6 + 2(\blueD3) = 6 + 6 = \$12$

## Representing with a graph

We can create ordered pairs from the $x$ and $y$ values:

Toppings on the pizza $(x)$ | Total cost $(y)$ | Ordered pair $(x , y)$ |
---|---|---|

$0$ | $\$6$ | $(0, 6)$ |

$1$ | $\$8$ | $(1, 8)$ |

$2$ | $\$10$ | $(2, 10)$ |

$3$ | $\$12$ | $(3, 12)$ |

$4$ | $\$14$ | $(4, 14)$ |

We can use these ordered pairs to create a graph:

$$

Cool! Notice how the graph helps us easily see that the total cost of the small pizza increases as we add more toppings.

## We did it!

We represented the situation where a pizza company sells a small pizza for $\$6$, and each topping costs $\$2$ using a table, an equation, and a graph.

What's really cool is we used these three methods to represent the same relationship. The table allowed us to see exactly how much a pizza with different number of toppings costs, the equation gave us a way to find the cost of a pizza with any number of toppings, and the graph helped us visually see the relationship.

Now let's give you a chance to create a table, an equation, and a graph to represent a relationship.

## Give it a try!

An ice cream shop sells $2$ scoops of ice cream for $\$3$. Each additional scoop costs $\$1$.

## Comparing the three different ways

We learned that the three main ways to represent a relationship is with a table, an equation, or a graph.

**What do you think are the advantages and disadvantages of each representation?**

**For example, why might someone use a graph instead of a table? Why might someone use an equation instead of a graph?**

*Feel free to discuss in the comments below!*