How to Write Linear Equations? (+FREE Worksheet!)
Writing Linear Equations
Writing a linear equation means turning the facts you’re given — a slope and a point, or two points — into \(y = mx + b\). Find the slope, find the intercept, and you’re done. We’ll cover every starting point, with a solver, practice, and a worksheet maker a tap away.

Writing a linear equation is the skill of turning whatever you’re given — a slope and a point, or two points — into the equation \(y = mx + b\). It comes up constantly, because once you have the equation you can graph the line, predict values, and compare it to others. The recipe is always the same: find the slope, then find the intercept.
In short: find the slope \(m\), find the y-intercept \(b\) (read it or solve for it), then write \(y = mx + b\). For example, the line through \((0,1)\) and \((2,7)\) is \(y = 3x + 1\).
Slope First, Intercept Second
Every non-vertical line is \(y = mx + b\). The slope \(m\) sets the tilt; the intercept \(b\) sets where it crosses the y-axis. Whatever the problem gives you, your job is to pin down those two numbers.
How to write the equation (3 steps):
- Find the slope (from two points: \(\tfrac{y_2-y_1}{x_2-x_1}\); or it’s given).
- Find \(b\): read it if you have the y-intercept, or plug a point into \(y = mx + b\) and solve.
- Write \(y = mx + b\).
Through \((0,1)\) and \((2,7)\)
Slope \(=\tfrac{7-1}{2-0}=3\); the point \((0,1)\) gives \(b=1\). So \(y = 3x + 1\). The line below climbs 3 for every 1 across, crossing the y-axis at 1.
⚡ Write a line’s equationWorked Examples
Slope first, intercept second — each finished line is graphed through its given point.
Example A — Two points (intercept given)
Through \((0,1)\) and \((2,7)\).
- Slope: \(m = \dfrac{7 – 1}{2 – 0} = 3\).
- One point has \(x = 0\), so it’s the intercept: \(b = 1\).
- Write it: \(y = 3x + 1\).
Answer: \(y = 3x + 1\)
Example B — Slope and a point
Slope 2 through \((3,1)\).
- Plug into \(y = mx + b\): \(1 = 2(3) + b\).
- Solve: \(1 = 6 + b\), so \(b = -5\).
- Write it: \(y = 2x – 5\).
Answer: \(y = 2x – 5\)
Example C — Two points (solve for b)
Through \((1,1)\) and \((2,4)\).
- Slope: \(m = \dfrac{4 – 1}{2 – 1} = 3\).
- Use \((1,1)\): \(1 = 3(1) + b\), so \(b = -2\).
- Write it: \(y = 3x – 2\).
Answer: \(y = 3x – 2\)
Example D — A horizontal result
Through \((2,3)\) and \((4,3)\).
- Slope: \(m = \dfrac{3 – 3}{4 – 2} = 0\).
- Zero slope means a flat line at the shared \(y\)-value.
- Write it: \(y = 3\).
Answer: \(y = 3\)
Where You’ll Use It
Any steady real-world relationship becomes a linear equation: a gym’s flat fee plus a per-class rate, a tank draining at a constant speed, a phone plan’s monthly cost. Write the equation once and you can answer “what’s the cost at 30 classes?” or “when will the tank be empty?” without re-reading the data.
Slip-Ups That Cost Easy Points
- Run over rise. Slope is the change in \(y\) over the change in \(x\) — y on top.
- Forgetting to solve for \(b\). If the y-intercept isn’t given, plug a point in and solve; don’t guess \(b = 0\).
- Sign mistakes plugging in. \(1 = 2(3) + b\) gives \(b = -5\), not \(5\).
- Order of subtraction. Keep the points in the same order top and bottom of the slope fraction.
Your Turn: Write the Equation
Write each in \(y = mx + b\). Reveal to check.
- Through \((0,2)\) and \((4,10)\)
- Through \((1,1)\) and \((2,4)\)
- Through \((0,-1)\) and \((5,9)\)
- Through \((2,3)\) and \((4,3)\)
Show answers
- \(\color{blue}{y = 2x + 2}\)
- \(\color{blue}{y = 3x – 2}\)
- \(\color{blue}{y = 2x – 1}\)
- \(\color{blue}{y = 3 \text{ (slope } 0)}\)
Make Your Own Worksheet
Generate fresh write-the-equation problems with a full answer key — print or save as a PDF.
Frequently Asked Questions
What are the steps to write a linear equation?
Find the slope, find the y-intercept (read it or solve for it with a point), then write \(y = mx + b\).
How do I find \(b\) if it isn’t given?
Substitute the slope and one known point into \(y = mx + b\) and solve for \(b\). For slope 2 through \((3,1)\): \(1 = 6 + b\), so \(b = -5\).
What if I’m given the equation in another form?
Rearrange it to \(y = mx + b\) by solving for \(y\); then the slope and intercept are easy to read.
What if the two points have the same y-value?
The slope is 0 and the line is horizontal: \(y = \) that shared value, like \(y = 3\).
Related Topics
Continue Your Study
Ready for the next step? Pick up right where this lesson leaves off:
Related to This Article
More math articles
- Top 10 SHSAT Prep Books (Our 2023 Favorite Picks)
- The Ultimate CLEP College Algebra Course (+FREE Worksheets & Tests)
- How to Understand and Master Polygons and Angles
- 5th Grade MEA Math Worksheets: FREE & Printable
- Full-Length Accuplacer Math Practice Test
- The Best Grade 3 Math Book for North Carolina Students
- How Math Skills Give Players a Competitive Edge in Various Online Games
- How to Ace the GRE Quantitative Section (2026 Guide)
- Where to Go to Get Math Homework Help Quickly and Effectively?
- ISEE vs. SSAT




























What people say about "How to Write Linear Equations? (+FREE Worksheet!) - Effortless Math"?
No one replied yet.