Key Points
- Writing linear equations in slope-intercept form comes down to finding two numbers, the slope and the y-intercept , for the equation .
- The slope of a non-vertical line is the change in divided by the change in , and similar triangles show it is the same between any two points.
- The y-intercept of a line can be found from any one point once the slope is known, by putting that point into and solving.
- A point that was not used to find the y-intercept gives a real check, since the equation must turn that point's into its .
Two numbers that hold a whole line
A straight line never ends, yet two numbers can describe every point on it. That idea goes back to 1637, when René Descartes published La Géométrie and used algebra to describe geometry. Cartesian geometry, the math of describing lines and shapes with equations, grew from that book and carries his name.
Game designers use the same two numbers to slide a character across a screen. Road engineers use them to set how steeply a highway climbs.
In 8th grade, your child learns to find those two numbers from points, graphs, tables and short stories, then write the whole line as one equation.

What does writing a linear equation mean?
Writing linear equations means turning facts about a straight line, such as two of its points, into one equation that every point on the line obeys. In 8th grade that equation is almost always .
A linear equation is an equation whose graph is a straight line. The version below is called slope-intercept form, because its two numbers are the slope and the y-intercept.
| Symbol | Meaning | Units |
|---|---|---|
| the input, along the horizontal axis | what counts, such as hours | |
| the output, along the vertical axis | what measures, such as inches | |
| the slope, the change in when goes up by 1 | units of per unit of | |
| the y-intercept, the value of when | units of |
The form works because the line passes through , and each step of 1 to the right changes by , so steps change it by .
For a line through the origin, , is 0 and the equation shrinks to . Common Core standard 8.EE.B.6 asks students to derive both forms, and 8.F.B.4 asks them to find the rate of change and initial value from a description, two points, a table or a graph.
Two names can confuse here: "rate of change" means the slope, and "initial value" means .
How do you write a linear equation from two points?
Find the slope first, then use one point to find , then check with the other point. Take the points and .
- Find the slope. Call the points and . The slope is the rise (change in ) over the run (change in ).
Put the slope and one point into . With , that gives . Subtract 2 from both sides to get .
Write the equation, .
Check with the unused point. At the equation gives , which matches.

Any pair of points on the line gives the same slope, because every slope triangle on one line has the same angles. Those similar triangles keep one ratio of rise to run. That idea is the core of slope and similar triangles.
Use the point with smaller numbers in step 2 (the arithmetic is lighter), and save the other one for the check.
The method breaks in one case. If both points share an -value, like and , the run is 0 and the slope would need division by zero. That vertical line is , with no form. A horizontal line is fine, since its slope is 0 and its equation is .
Try It Yourself
Drag the two points to any spots on the grid and watch the slope, the y-intercept and the equation update as you move them. Then stack one point straight above the other and read what the box says about the slope.
How do you read the equation from a graph, a table or a sentence?
Each one hides the same two numbers, the slope and the value of when .
On a graph, read where the line crosses the y-axis, then count rise and run between two points that sit exactly on grid corners.

This line crosses the y-axis at 3, so . From to it goes down 1 and right 2, so the equation is . A falling line has a negative slope. Kids who count squares where the line cuts between grid corners get a slope that is close but wrong.
In a table, compare how changes with how changes.
| 0 | 5 |
| 2 | 11 |
| 4 | 17 |
| 6 | 23 |
Each time goes up 2, goes up 6, so . The row where gives , so the equation is . The usual first instinct is to call the slope 6, since most tables kids have met go up by 1.
In a story, decide what and stand for first. The slope is the change per hour or per minute, and is the amount at the start. Stories like these are the heart of linear models.
| Words in the problem | Math it means |
|---|---|
| "after 2 hours the water is 18 inches deep" | the point |
| "climbs at a steady rate" | the slope is positive and fixed |
| "how deep it was at the start" | , the value of when |
| "when does the hiker reach 2,300 feet" | set and solve for |
Examples of writing linear equations
Example 1
A line passes through the origin and the point . Write its equation.
A line through the origin has , so the equation is .
The equation is , and it checks out, since .
Example 2
Write the equation of the line through and .
The tempting move is to subtract the smaller number from the bigger one in both places, giving , then and .
That fails the check, because at it gives 17, not 1. The top used the first point minus the second while the bottom used the second minus the first, and that mix flipped the sign.
Keep one order in both places.
Then , so . Add 4 to both sides to get .
The equation is , and the second point agrees, since .
Example 3
When is 3, 6, 9 and 12, a table shows as 8, 10, 12 and 14. Write the equation.
Each step, goes up 3 and goes up 2, so .
There is no row for , so work back from . That gives , so . Subtract 2 from both sides to get .
The equation is , and the last row agrees, since .
Example 4
Write the equation of the line through and .
Then , so . Subtract 6 from both sides to get .
The equation is , and the other point agrees, since .
Example 5
A pool fills at a steady rate. After 2 hours the water is 18 inches deep, and after 5 hours it is 33 inches deep. Write an equation for the depth.
Let be hours and be depth in inches, so the points are and .
Then , so . Subtract 10 from both sides to get .
The equation is , so the water rises an hour from a start of .
Example 6
A hiker climbs at a steady rate and is at 1,450 feet after 30 minutes and 1,900 feet after 75 minutes. Write the equation and find when the hiker reaches 2,300 feet.
Let be minutes and be height in feet, so the points are and .
Then , so . Subtract 300 from both sides to get .
The equation is . Now set .
Subtract 1150 from both sides, then divide both sides by 10, to get .
The hiker reaches 2,300 feet after .
Why do people write lines as equations?
An equation answers questions about points nobody has plotted yet. Without one, each new question means a longer graph or more table rows.
- Predicting past the page. The hiker's equation gave 115 minutes in two steps, with no graph needed.
- Packing a pattern into two numbers. A hundred table rows shrink to one slope and one y-intercept.
- Comparing at a glance. A line with slope 5 climbs faster than one with slope 3, which makes comparing linear functions quick.
- Following real rules. The Internal Revenue Service set its business mileage rate at 76 cents a mile for July 1 to December 31, 2026, so the amount counted for business miles in that period follows in dollars. Its charity rate stayed at 14 cents a mile in every period the IRS lists from 2020 to 2026, a flatter line, .
Each of these uses rests on the same two numbers, and , which is why finding them is the whole job.
What most guides miss about writing linear equations
Most guides stop the moment appears. The step that catches sign and order errors comes after that.
Checking with the point you used to find can only catch a slip in solving for , because was built to fit that point. It can't catch a wrong slope. Two points fix exactly one line, so if the equation also hits the unused point, both and are right. Example 2 shows that check catching a wrong slope.
The starting value isn't the top row, either. Tables and stories often begin after (Example 3 starts at ), so is usually a value you work back to.
In Algebra 1, the same line also appears in point-slope form and standard form, and both still need the slope you learn to find now.
Where do kids trip up when writing linear equations?
Mistake 1: Subtracting the points in different orders
Where it slips in: Finding the slope from two points, as in Examples 2 and 4.
Don't do this: For and , writing . The top starts with the second point, and the bottom starts with the first.
The correct way: Keep one order, , so the line is .

This one starts with a sensible wish. A child wants a positive bottom, flips it, and forgets the top.
Mistake 2: Putting the run on top
Where it slips in: Any slope from two points or a graph.
Don't do this: For and , writing .
The correct way: The rise goes on top, so and the line is .
Because comes first in every coordinate pair, it feels natural to put it first in the fraction too.
Mistake 3: Reading the first row of a table as b
Where it slips in: Tables and stories that begin after , as in Example 3.
Don't do this: Seeing at the top and writing , or guessing .
The correct way: Work back to with , which gives and .
The phrase "starting value" invites a child to grab the first number in sight, even when that row sits at .
Key Takeaways
- Every line that isn't vertical comes down to two numbers, and writing linear equations is the work of finding them.
- From two points, the slope comes first, because can only be worked out once is known.
- Only a point you did not use to find can catch a wrong slope in the finished equation.
- Tables and stories hide at , a row or a moment that often isn't shown.
- For more practice turning two points into a line with a teacher who spots the mixed-order slope slip, explore Bhanzu's 8th grade math curriculum or an algebra tutor.
Read More
- Finding Slope From Two Points
- Slope Intercept Form of a Line
- Point Slope Form
- Graphing Linear Equations
- Using Linear Models to Make Predictions
Research Behind This Article
- J J O'Connor and E F Robertson, MacTutor History of Mathematics, René Descartes (2014). mathshistory.st-andrews.ac.uk
- Common Core State Standards Initiative, Grade 8, Expressions and Equations (2010). thecorestandards.org
- Common Core State Standards Initiative, Grade 8, Functions (2010). thecorestandards.org
- Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, OpenStax, Elementary Algebra 2e, 4.6 Find the Equation of a Line (2020). openstax.org
- Internal Revenue Service, Standard mileage rates (2026). irs.gov
- OpenStax, Algebra 1, 4.7.3 Writing Linear Equations (2025). openstax.org
Quick Quiz: Check Yourself
Three levels, new numbers every time: a slope through the origin, a y-intercept from two points, then a two-point story.
Was this article helpful?
Your feedback helps us write better content
Frequently Asked Questions
What is the difference between writing and solving a linear equation?
Why is the slope called in ?
Is a writing linear equations worksheet enough practice?
Can my child use a writing linear equations calculator?
My child can find the slope but gets stuck on . How can I help?
What should my child know about writing linear equations by the end of 8th grade?




