If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

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 dollar sign, 6 . Each topping costs dollar sign, 2.

Representing with a table

We know that the cost of a pizza with 0 toppings is dollar sign, 6, the cost of a pizza with 1 topping is dollar sign, 2 more which is dollar sign, 8, and so on. Here's a table showing this:
Toppings on the pizza left parenthesis, x, right parenthesisTotal cost left parenthesis, y, right parenthesis
0dollar sign, 6
1dollar sign, 8
2dollar sign, 10
3dollar sign, 12
4dollar sign, 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:
dollar sign, start color #1fab54, 6, end color #1fab54
Here's the cost of the start color #11accd, 4, end color #11accd toppings:
start color #11accd, 4, end color #11accd toppings dot dollar sign, 2 per topping equals dollar sign, start color #e07d10, 8, end color #e07d10
This leads to the total cost of
dollar sign, start color #1fab54, 6, end color #1fab54, plus, dollar sign, start color #e07d10, 8, end color #e07d10, equals, dollar sign, 14.
How much would a small pizza with 5 toppings cost?
dollar sign
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, start text, p, i, end text or 2, slash, 3, space, start text, p, i, end text

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:
dollar sign, start color #1fab54, 6, end color #1fab54
Here's the cost of x toppings:
x toppings dot dollar sign, 2 per topping equals x, dot, 2, equals, start color #e07d10, 2, x, end color #e07d10
So here's the equation for the total cost y of a small pizza:
y, equals, start color #1fab54, 6, end color #1fab54, plus, start color #e07d10, 2, x, end color #e07d10
Let's see how this makes sense for a small pizza with 3 toppings:
x, equals, start color #11accd, 3, end color #11accd because there are start color #11accd, 3, end color #11accd toppings
The total cost is 6, plus, 2, left parenthesis, start color #11accd, 3, end color #11accd, right parenthesis, equals, 6, plus, 6, equals, dollar sign, 12
Use the equation to find the cost of a small pizza with 100 toppings.
dollar sign
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, start text, p, i, end text or 2, slash, 3, space, start text, p, i, end text

Representing with a graph

We can create ordered pairs from the x and y values:
Toppings on the pizza left parenthesis, x, right parenthesisTotal cost left parenthesis, y, right parenthesisOrdered pair left parenthesis, x, comma, y, right parenthesis
0dollar sign, 6left parenthesis, 0, comma, 6, right parenthesis
1dollar sign, 8left parenthesis, 1, comma, 8, right parenthesis
2dollar sign, 10left parenthesis, 2, comma, 10, right parenthesis
3dollar sign, 12left parenthesis, 3, comma, 12, right parenthesis
4dollar sign, 14left parenthesis, 4, comma, 14, right parenthesis
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 dollar sign, 6, and each topping costs dollar sign, 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 dollar sign, 3. Each additional scoop costs dollar sign, 1.
Complete the table to represent the relationship.
Scoops of ice cream left parenthesis, x, right parenthesisTotal cost left parenthesis, y, right parenthesis
2dollar sign, 3
3$
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, start text, p, i, end text or 2, slash, 3, space, start text, p, i, end text
4$
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, start text, p, i, end text or 2, slash, 3, space, start text, p, i, end text
5$
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, start text, p, i, end text or 2, slash, 3, space, start text, p, i, end text
6$
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, start text, p, i, end text or 2, slash, 3, space, start text, p, i, end text

Write an equation to represent the relationship.
Remember to use x for scoops of ice cream and y for total cost.

Plot the points from the table on the graph to represent the relationship.
Be sure to plot the exact points in the table above!

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!

Want to join the conversation?

  • blobby green style avatar for user Yanal Atallah
    Hello! I hope you are having a great day. I think that the advantages are that they can show a lot of information that is easily understood. Even the Table in functions can be easy to use and practical and you will find a lot of solutions for just one equation. Equations are also easier to find with small numbers and they also show the relationship between the x-axis and the y-axis. The disadvantages of Equations are that with big numbers, the answer will be weird. A Disadvantage of using the Table is that when you use decimals, the Table won't work. The Disadvantage of using a graph is that you can probably have two unpredictable variables. For me, I prefer using the table more than the graph and the equation. I think it is easier for me because I can double-check my answer with each number in the table. Thanks!
    (23 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user bdouglas
    I think the Graph is easier, these questions were so easy it was hard to figure it out, I thought it was gonna be hard.
    (11 votes)
    Default Khan Academy avatar avatar for user
  • duskpin sapling style avatar for user Elizabeth
    Is there an easier way to learn how to read and write the xy equations?
    (9 votes)
    Default Khan Academy avatar avatar for user
  • leafers ultimate style avatar for user Emilynn
    I would argue that a 7-topping pizza is, indeed, not "gross". For example, the Costco Food Court combination pizza (which was discontinued in 2020) had six toppings on top of cheese. It was considered 'good pizza', based on all the positive reviews it received, as well as the despair people shared when Costco stopped selling it.
    Another example is the supreme pizza at Papa Johns. This pizza also contains 6 toppings, and yet people still buy and enjoy it. Not to mention other chains, such as Pizza Hut, allow you to put up to 7 toppings on your pizza.
    It really comes down to personal preference, but needless to say, I personally think that just because your pizza has 7+ toppings, doesn't mean that it's "gross".
    (8 votes)
    Default Khan Academy avatar avatar for user
  • piceratops seedling style avatar for user maximus.greeneerwin
    How do I ask out a girl?
    (7 votes)
    Default Khan Academy avatar avatar for user
  • duskpin seed style avatar for user Sanchez, Susana
    i think that the advantage is that if u know how to do works from a graph than it will be really easy to put it in the plotting graph and the disadvantage is like when you have to find a missing number, but if you get it wrong then thats when the bigger problem begins.
    (5 votes)
    Default Khan Academy avatar avatar for user
  • starky tree style avatar for user Breceda, Adrian
    How do I do the write an equation one?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • aqualine sapling style avatar for user Vasquez, Amy
    the making graph involves more data as compared to data needed to represent function as an equation.
    (3 votes)
    Default Khan Academy avatar avatar for user
  • piceratops sapling style avatar for user Laura Espinoza
    advantage,summarize a large dataset in visual form easily compare two or three data sets, disanvanges, equire additional written or verbal explanation
    (3 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user JAILEN702
    I think that someone might use a graph instead of a table because graphs reveal more than a collection of individual values. Because of their visual nature, they show the overall shape of your data. Also, instead of everything being written out on a table, the data is shown with patterns, colors, and/or shapes.
    (2 votes)
    Default Khan Academy avatar avatar for user