English:Writing Equations from Tables and Graphs

Writing Equations from Tables and Graphs
Introduction
In this aiMOOC, you learn how to write an equation for a linear relationship when you are given a table or a graph. The main form you will use is the slope-intercept form y = mx + b. In this form, m is the slope, or rate of change, and b is the y-intercept, the y-value where the line crosses the y-axis.
This topic connects arithmetic, proportional relationships, coordinate graphs, and early algebra. You will learn to move between a situation, a table, a graph, and an equation, and to explain what the numbers in an equation mean.

Learning Goals
By the end of this aiMOOC, you should be able to:
- Recognize a linear relationship: Decide whether a table or graph has a constant rate of change.
- Find the slope: Calculate slope from two points in a table or from rise and run on a graph.
- Find the y-intercept: Read it from a graph, find it in a table when x = 0, or calculate it from a point.
- Write an equation: Use y = mx + b to represent a linear relationship.
- Check your equation: Substitute values and compare your equation with the original table or graph.
Understanding Linear Relationships
A linear relationship has a constant rate of change. On a graph, its points lie on one straight line. In a table, the ratio of the change in y to the change in x stays the same between pairs of points.
The slope is calculated by:
m = change in y / change in x
For two points, this is often written as m = (y₂ − y₁) / (x₂ − x₁). Whatever subtraction order you choose for the y-values, use the same point order for the x-values.


What Slope Tells You
A positive slope means y increases as x increases. A negative slope means y decreases as x increases. A horizontal line has slope 0 because y does not change. A vertical line has undefined slope and cannot be written in the form y = mx + b.
Slope can also describe a real-world rate. If x is time in hours and y is distance in kilometers, the slope can represent kilometers per hour. Always attach meaning and units when the variables represent quantities.
What the Y-Intercept Tells You
The y-intercept is the point where a graph crosses the y-axis, so its x-coordinate is 0. In y = mx + b, the number b is the y-intercept value.
In a real-world situation, b often represents a starting amount. For example, if a taxi ride has a fixed starting fee of 4 dollars and then costs 2 dollars per kilometer, the equation can be y = 2x + 4. The slope 2 is the cost per kilometer, and the y-intercept 4 is the starting fee.

Writing an Equation from a Table
Suppose a table contains these ordered pairs:
| x | y |
|---|---|
| 0 | 3 |
| 2 | 7 |
| 4 | 11 |
| 6 | 15 |
First, choose two rows and find the slope. From x = 0 to x = 2, the change in x is 2 and the change in y is 4, so m = 4 / 2 = 2.
Next, find b. Because the table contains the point with x = 0, you can read the y-intercept directly: b = 3.
Therefore, the equation is y = 2x + 3.
Check another row: when x = 4, the equation gives y = 2 · 4 + 3 = 11, which matches the table.
When the Table Does Not Include x = 0
You can still find b. Suppose a linear table contains the points (2, 9) and (5, 18).
The slope is m = (18 − 9) / (5 − 2) = 9 / 3 = 3.
Now use one point in y = mx + b. Substitute x = 2, y = 9, and m = 3:
9 = 3 · 2 + b
So 9 = 6 + b, which means b = 3. The equation is y = 3x + 3.
A useful shortcut is b = y − mx. This is not a new rule; it is just y = mx + b rearranged to solve for b.
Unequal x-Steps in a Table
Do not assume that constant first differences in y are enough unless the x-values change by equal amounts. For example, if x changes by 1, then by 2, compare change in y / change in x for each interval. A relationship is linear when this rate stays constant.
For a table with points (1, 5), (3, 9), and (7, 17), the slopes are:
(9 − 5) / (3 − 1) = 4 / 2 = 2
and
(17 − 9) / (7 − 3) = 8 / 4 = 2.
The rate is constant, so the points are consistent with one linear equation.
Writing an Equation from a Graph
To write a linear equation from a graph, first identify two clear points on the line. Then calculate the slope using rise over run. Finally, find the y-intercept. Put the values into y = mx + b.

Step-by-Step Graph Method
- Choose two points: Prefer points where the line passes exactly through grid intersections.
- Find rise and run: Count the vertical change and horizontal change, keeping the signs.
- Find b: Read where the line crosses the y-axis.
- Write y = mx + b: Substitute your values of m and b.
- Verify: Test another visible point in your equation.
If the graph does not show the y-intercept clearly, calculate b using b = y − mx with any known point on the line.
Positive, Negative, and Zero Slope
If a line rises from left to right, its slope is positive. If it falls from left to right, its slope is negative. If it is horizontal, its slope is zero. These visual checks can help you catch sign mistakes.

The three lines in this image have the same slope but different y-intercepts. This shows why slope alone does not determine a unique line: you usually need both m and b.
Connecting Tables, Graphs, and Equations
A table, graph, and equation can all represent the same relationship. The table gives selected input-output pairs, the graph shows all points visually, and the equation gives a rule that can generate any point in the relationship.

Proportional and Nonproportional Linear Relationships
A proportional relationship has equation y = mx, so b = 0 and its graph passes through the origin. A nonproportional linear relationship can still have a constant slope, but its y-intercept is not 0.
For example, y = 4x is proportional. The equation y = 4x + 7 is linear but not proportional because it has a starting value of 7.
Is the Relationship Really Linear?
Do not force every table or graph into y = mx + b. If the rate of change is not constant, the relationship is not exactly linear. Curved graphs and changing slopes are clues that a different type of model may be needed.

This comparison helps you notice that a straight-line pattern and a curved growth pattern behave differently. At Grades 7–8, your main goal is to recognize when a constant rate of change supports a linear equation.
Common Mistakes and How to Fix Them
A common mistake is reversing one subtraction in the slope formula but not the other. Keep the subtraction order consistent. Another mistake is using the y-intercept as the slope; remember that m describes change, while b is the value when x = 0.
You should also avoid guessing b from the first row of a table unless that row has x = 0. If x is not 0, calculate b using b = y − mx. Finally, always check your equation with a point that you did not use to create it.
Worked Example with a Real-World Context
A bicycle rental charges a fixed fee plus an hourly cost. The table shows the total cost.
| Hours | Cost in dollars |
|---|---|
| 1 | 11 |
| 3 | 19 |
| 5 | 27 |
The change in cost from 1 to 3 hours is 8 dollars, and the change in time is 2 hours. The slope is m = 8 / 2 = 4 dollars per hour.
Use the point (1, 11) to find b:
11 = 4 · 1 + b
so b = 7.
The equation is y = 4x + 7. Here, 4 represents the hourly charge and 7 represents the fixed starting fee. The meaning of the equation matches the context.
Interactive Tasks
Quiz: Test Your Knowledge
A table has x-values 0, 1, 2 and y-values 5, 8, 11. What equation represents the relationship? (y equals 3x plus 5) (!y equals 5x plus 3) (!y equals 3x minus 5) (!y equals 8x plus 5)
A line crosses the y-axis at 4 and rises 2 units for every 1 unit to the right. What is its equation? (y equals 2x plus 4) (!y equals 4x plus 2) (!y equals 2x minus 4) (!y equals 4x minus 2)
What does the slope of a linear relationship describe? (the constant rate of change) (!the point where x is always zero) (!the largest y-value) (!the number of points in the table)
Which feature gives b in y = mx + b? (the y-intercept) (!the x-intercept) (!the origin only) (!the horizontal axis)
A table contains the points 2, 7 and 5, 16. What is the slope? (3) (!2) (!5) (!9)
A line falls from left to right. What can you conclude about its slope? (the slope is negative) (!the slope is always zero) (!the slope is positive) (!the slope is undefined)
If a linear table includes x equals 0 and y equals 6, what is the y-intercept value? (6) (!0) (!minus 6) (!it cannot be found)
Which equation represents a proportional linear relationship? (y equals 4x) (!y equals 4x plus 1) (!y equals x plus 4) (!y equals 4 minus x)
Why should you test a third point after writing an equation from two points? (to check that the rule fits more of the data) (!to change the slope) (!to move the y-axis) (!to make x equal y)
What should you do if a graph does not show the y-intercept clearly? (use a point and the slope to calculate b) (!assume b is zero) (!use the x-intercept as b) (!ignore the intercept completely)
Memory Game
| Slope | Constant rate of change between x and y |
| Y-intercept | Value of y when x is zero |
| Linear | Describes a relationship with a constant rate of change |
| Origin | Point where both coordinate values are zero |
| Table | Organized set of input-output values |
| Equation | Algebraic rule connecting two variables |
Drag and Drop
| Match the correct terms. | Topic |
|---|---|
| Slope | Change in y divided by change in x |
| Y-intercept | Output value when the input is zero |
| Positive slope | A line that rises from left to right |
| Negative slope | A line that falls from left to right |
| Verification | Testing a point in the finished equation |
Crossword Puzzle
| Slope | What measures the rate of change of a line? |
| Intercept | What value describes where a line crosses an axis? |
| Linear | What word describes a constant-rate straight-line relationship? |
| Origin | What is the point where the coordinate axes meet? |
| Constant | What kind of rate of change does a linear relationship have? |
| Coordinate | What word describes one value in an ordered pair? |
LearningApps
Cloze Text
Open-Ended Tasks
Easy
- Table Detective: Create a four-row table for a linear relationship, find its slope and y-intercept, and write the equation.
- Graph Sketch: Draw a coordinate plane, graph a line with a positive slope, label two points and the y-intercept, and write its equation.
- Explain the Symbols: Write a short paragraph explaining what m and b mean in y = mx + b and give one example.
- Classroom Data Hunt: Find a simple quantity in your classroom that changes at a constant rate, record at least four values, and explain whether a linear model is reasonable.
Standard
- Interview a User of Rates: Interview a family member or school worker about a situation involving a fixed starting amount and a rate, then turn the information into an equation and explain each parameter.
- Two-Representation Poster: Create a poster that shows one linear relationship as a table and graph and explains how both lead to the same equation.
- Walking-Time Experiment: Measure distance and walking time over several short, safe intervals, organize the data in a table, graph it, and discuss whether a linear model is appropriate.
- Equation Tutorial Video: Produce a two-minute instructional video showing how to write an equation from either a table or a graph and include a check using a new point.
Advanced
- Error Analysis Challenge: Invent a believable incorrect solution for finding a linear equation, then annotate the exact mistake and produce a corrected solution.
- School Data Walk: Visit a suitable school location such as a cafeteria, library, or hallway display, identify a measurable relationship, collect or estimate data with permission, and test whether it is linear.
- Digital Model Comparison: Use a spreadsheet or graphing tool to create two data sets, one linear and one nonlinear, and explain how slope behavior distinguishes them.
- Design a Pricing Model: Create two realistic pricing plans with different starting fees and rates, write both equations, graph them, and explain when each plan is less expensive.
Learning Assessment
- Representation Transfer: Given a new linear table, write the equation, graph it, and explain how one feature of the table appears in the graph.
- Reasoning About Slope: Compare two lines with the same y-intercept but different slopes and explain how their equations predict the visual difference.
- Diagnose an Error: Analyze a solution in which the subtraction order for slope is inconsistent, explain why the result is wrong, and repair the calculation.
- Context Model: Build an equation from a situation with a starting amount and constant rate, then interpret both parameters with units.
- Independent Check: Write an equation from two points and use a third point to determine whether all three belong to the same linear relationship.
- Linear or Not: Compare a straight-line graph with a curved graph and justify which one can be represented exactly by y = mx + b.
Evidence of Learning
Important evidence of learning includes:
- Knowledge: You can explain slope, y-intercept, constant rate of change, and slope-intercept form in your own words.
- Skills: You can calculate slope from tables and graphs, determine b, write y = mx + b, and verify the result.
- Products: You can create accurate tables, graphs, equations, posters, explanations, or short videos that represent a linear relationship.
- Reasoning: You can explain why a relationship is or is not linear and identify errors in calculations or interpretations.
- Transfer: You can model a new real-world situation with a linear equation and interpret slope and y-intercept using appropriate units.
OERs on the Topic
For an additional open reference, explore the English Wikipedia article on linear equations:
Linked Learning Areas
aiMOOC Projects
NachrichtenLernweltNOAH fragen