Writing Linear Equations

Learn to write linear equations from given information like slope, points, or real-world situations.

Intermediate25 minLesson

Definition

Writing linear equations means creating an equation in the form y=mx+by = mx + b (or equivalent) from given information.
To write a linear equation, you need:
  • The slope (mm) - how steep the line is
  • A point on the line - or the y-intercept (bb)
Given: slope and y-intercept→y=mx+b\text{Given: slope and y-intercept} \rightarrow y = mx + b
Given: slope and a point→y−y1=m(x−x1)\text{Given: slope and a point} \rightarrow y - y_1 = m(x - x_1)
Once you identify the slope and a point, you can write the equation!

Try it now

What is the equation of a line with slope m=2m = 2 and y-intercept b=5b = 5?

Worked Examples

Write the equation of a line with slope m=3m = 3 and y-intercept b=−2b = -2.

1

Identify the slope

m=3m = 3 → Slope is 3

2

Identify the y-intercept

b=−2b = -2 → Y-intercept is −2-2

3

Substitute into slope-intercept form

y=mx+by = mx + b y=3x+(−2)y = 3x + (-2) → y=3x−2y = 3x - 2

Common Mistakes

Confusing slope and y-intercept positions

Why it's wrong: In y=mx+by = mx + b, the coefficient of xx is ALWAYS the slope, and the constant is ALWAYS the y-intercept.

Correct: Remember: mm multiplies xx (slope), bb stands alone (y-intercept). In y=5+3xy = 5 + 3x, the slope is 3, not 5!

Calculating slope as x2−x1y2−y1\frac{x_2 - x_1}{y_2 - y_1}

Why it's wrong: This gives the reciprocal of the correct slope!

Correct: Slope is always riserun=y2−y1x2−x1\frac{\text{rise}}{\text{run}} = \frac{y_2 - y_1}{x_2 - x_1} (y's on top, x's on bottom)

Forgetting to distribute negative slopes

Why it's wrong: When m=−2m = -2 and the point is (3,5)(3, 5): y−5=−2(x−3)y - 5 = -2(x - 3) becomes y−5=−2x+6y - 5 = -2x + 6, not −2x−6-2x - 6

Correct: A negative times a negative is positive: −2×(−3)=+6-2 \times (-3) = +6

Using inconsistent points in slope formula

Why it's wrong: Switching the order of points mid-calculation gives wrong answers.

Correct: If you start with (x1,y1)=(2,5)(x_1, y_1) = (2, 5), use that consistently: m=y2−5x2−2m = \frac{y_2 - 5}{x_2 - 2}

Interactive Visual

Linear Function Explorer

y = x
Slope (m)1
Y-Intercept (b)0
b
run
rise
xy
-2-2
-1-1
00
11
22

Interactive Sandbox

Interactive Grapher

Try these examples:

y = 2x + 1

m=2, b=1

Expression Calculator

Try these:

History

No calculations yet

Practice Problems

16 problems
Problem 1 of 16
Easy

What is the equation of a line with slope m=2m = 2 and y-intercept b=5b = 5?

Why It Matters

Writing linear equations is a fundamental skill that connects algebra to the real world:
  • Business: A company charges 50 dollars per hour plus a 100 dollar service fee: y=50x+100y = 50x + 100
  • Science: Temperature drops 2 degrees every hour from an initial 20 degrees: T=−2h+20T = -2h + 20
  • Finance: You save 25 dollars per week starting with 150 dollars: S=25w+150S = 25w + 150
  • Sports: A runner covers 8 meters per second: d=8td = 8t
Mastering this skill lets you model and predict real-world relationships mathematically!

Real World Applications

Cell Phone Plans

Phone companies use linear equations to calculate monthly bills with base fees and per-unit charges.

Example:

A plan costs 30 dollars per month plus 0.10 dollars per text. The equation is C=0.10t+30C = 0.10t + 30.

1Try It Yourself

A streaming service charges 12 dollars per month plus 3 dollars for each premium movie rental.

Write an equation for the monthly cost based on premium rentals.

Step 1: Write the mathematical expression

Let rr be the number of rentals. Write the cost equation:

Science Experiments

Scientists use linear equations to model relationships like temperature changes or distance traveled.

Example:

Water cools by 5 degrees per minute from an initial 80 degrees: T=−5t+80T = -5t + 80

2Try It Yourself

A candle loses 2 centimeters of height per hour. It starts at 20 cm tall.

Write an equation for the candle's height after hh hours.

Step 1: Write the mathematical expression

Height equation:

Savings Goals

Linear equations help track savings progress toward financial goals.

Example:

Starting with 200 dollars and saving 50 dollars weekly: S=50w+200S = 50w + 200

3Try It Yourself

You have 75 euros saved and add 15 euros each week from your allowance.

Write an equation for your total savings after ww weeks.

Step 1: Write the mathematical expression

Savings equation:

Key Takeaways

  • 1Use y=mx+by = mx + b when you know the slope and y-intercept directly
  • 2Use point-slope form y−y1=m(x−x1)y - y_1 = m(x - x_1) when you know a point and slope
  • 3Calculate slope from two points: m=y2−y1x2−x1m = \frac{y_2 - y_1}{x_2 - x_1}
  • 4From tables: slope is the constant change in yy divided by change in xx
  • 5In word problems: the rate is the slope, the starting value is the y-intercept

Frequently Asked Questions

If you know the y-intercept, use slope-intercept (y=mx+by = mx + b). If you only know a point that's not on the y-axis, point-slope (y−y1=m(x−x1)y - y_1 = m(x - x_1)) is easier. Both give the same line!
If you know the y-intercept, use slope-intercept (y=mx+by = mx + b). If you only know a point that's not on the y-axis, point-slope (y−y1=m(x−x1)y - y_1 = m(x - x_1)) is easier. Both give the same line!
Different points give equations that look different but represent the same line. For example, using points (1,5)(1, 5) and (2,8)(2, 8) with slope 3: y−5=3(x−1)y - 5 = 3(x - 1) and y−8=3(x−2)y - 8 = 3(x - 2) both simplify to y=3x+2y = 3x + 2.
Substitute a known point into your equation. If both sides are equal, you're correct! For example, if your line passes through (2,7)(2, 7) and your equation is y=2x+3y = 2x + 3, check: 7=2(2)+3=77 = 2(2) + 3 = 7 ✓

Glossary

Slope-intercept form
The equation y=mx+by = mx + b where mm is the slope and bb is the y-intercept
Point-slope form
The equation y−y1=m(x−x1)y - y_1 = m(x - x_1) using slope mm and point (x1,y1)(x_1, y_1)
Y-intercept
The point where the line crosses the y-axis; the value of yy when x=0x = 0
Rate of change
Another name for slope; how much yy changes for each unit change in xx

Formula Card

Slope-Intercept Form

y=mx+by = mx + b

Use when you know the slope and y-intercept

Point-Slope Form

y−y1=m(x−x1)y - y_1 = m(x - x_1)

Use when you know a point and the slope

Slope Formula

m=y2−y1x2−x1m = \frac{y_2 - y_1}{x_2 - x_1}

Calculate slope from two points

More in This Topic