Skip to content
🎯⭐ INTERACTIVE LESSON

Writing Linear Equations

Learn step-by-step with interactive practice!

Writing Linear Equations - Complete Interactive Lesson

Part 1: Slope-Intercept Form: y = mx + b

📈 Writing Linear Equations

Part 1 of 5 — Slope-Intercept Form: y=mx+by = mx + b


Topics in This Part

Section
What the Form Tells You
Reading Slope and Intercept
Graphing from y=mx+by = mx + b

🔑 Key Concept: Every straight (non-vertical) line can be written as y=mx+by = mx + b, where mm is the slope and bb is the yy-intercept. Master this one form and you can describe any line.

What the Form Tells You

The slope-intercept form of a line is:

y=mx+by = mx + b

Two numbers do all the work:

  • mm = the slope — how steep the line is, and which way it tilts. Slope is riserun\dfrac{\text{rise}}{\text{run}}, the change in yy for each step right in xx.
  • bb = the yy-intercept — the yy-value where the line crosses the vertical axis (that is, where x=0x = 0).

Reading Off the Pieces

EquationSlope mmyy-intercept bb
y=3x+2y = 3x + 23322
y=−12x+5y = -\tfrac{1}{2}x + 5−12-\tfrac{1}{2}55
y=4xy = 4x4400
y=−x−7y = -x - 7−1-1−7-7

💡 Watch the signs. In y=−x−7y = -x - 7, the slope is −1-1 (an unwritten 11) and b=−7b = -7. The sign in front of each number belongs to it.

Concept Check 🎯

Identify mm and bb 🧮

For each line, enter the slope mm first, then the yy-intercept bb.

1) y=5x−8⇒m= ?,  b= ?y = 5x - 8 \quad\Rightarrow\quad m = \,?,\ \ b = \,? 2) y=−x+3⇒m= ?,  b= ?y = -x + 3 \quad\Rightarrow\quad m = \,?,\ \ b = \,?

Graphing from y=mx+by = mx + b

Slope-intercept form is a recipe for drawing the line in two moves:

  1. Plot the yy-intercept (0,b)(0, b) — your starting dot on the vertical axis.
  2. Use the slope as rise over run to step to the next point: m=riserunm = \dfrac{\text{rise}}{\text{run}}.

Example: y=2x+1y = 2x + 1

  • Start at (0,1)(0, 1).
  • Slope 2=212 = \dfrac{2}{1}: go up 22, right 11 to reach (1,3)(1, 3).
  • Draw the line through both points.

Example: y=−13x+4y = -\tfrac{1}{3}x + 4

  • Start at (0,4)(0, 4).
  • Slope −13=−13-\dfrac{1}{3} = \dfrac{-1}{3}: go down 11, right 33 to reach (3,3)(3, 3).

⚠️ A positive slope rises left-to-right; a negative slope falls left-to-right. If your sketch tilts the wrong way, you've mixed up the sign of mm.

Concept Check 🎯

Part 2: From Slope and a Point

📈 Writing Linear Equations

Part 2 of 5 — From Slope and a Point


🔑 The Goal: You're given enough information to pin down a line — a slope and one point, or two points. Your job is to produce the equation y=mx+by = mx + b. Everything reduces to finding mm and bb.

Given the Slope and a Point

You already know mm. To find bb, plug the point's xx and yy into y=mx+by = mx + b and solve.

Worked Example: slope 22 through (3,5)(3, 5)

Start from y=mx+by = mx + b with m=2m = 2:

y=2x+by = 2x + b

Substitute the point x=3, y=5x = 3,\ y = 5:

5=2(3)+b  ⇒  5=6+b  ⇒  b=−15 = 2(3) + b \;\Rightarrow\; 5 = 6 + b \;\Rightarrow\; b = -1

So the equation is y=2x−1\boxed{y = 2x - 1}.

✅ Check: at x=3x = 3, y=2(3)−1=5y = 2(3) - 1 = 5 ✓ — the line really does pass through (3,5)(3, 5).

Worked Example: slope −3-3 through (2,4)(2, 4)

4=−3(2)+b  ⇒  4=−6+b  ⇒  b=104 = -3(2) + b \;\Rightarrow\; 4 = -6 + b \;\Rightarrow\; b = 10

Equation: y=−3x+10y = -3x + 10.

Worked Example: slope 12\tfrac{1}{2} through (4,1)(4, 1)

1=12(4)+b  ⇒  1=2+b  ⇒  b=−11 = \tfrac{1}{2}(4) + b \;\Rightarrow\; 1 = 2 + b \;\Rightarrow\; b = -1

Equation: y=12x−1y = \tfrac{1}{2}x - 1.

💡 The pattern: b=y−mxb = y - mx, using the point's coordinates. Once bb is found, just write y=mx+by = mx + b.

Concept Check 🎯

Find bb, Then the Equation 🧮

Each line's slope mm and a point are given. Find the yy-intercept bb.

1) m=3m = 3, through (2,4)⇒b= ?(2, 4) \quad\Rightarrow\quad b = \,? 2) m=−1m = -1, through (5,2)⇒b= ?(5, 2) \quad\Rightarrow\quad b = \,? 3) m=12m = \tfrac{1}{2}, through (6,1)⇒b= ?(6, 1) \quad\Rightarrow\quad b = \,?

Build the Equation 🔽

A line has slope 55 and passes through (2,7)(2, 7). Fill in each step.

Part 3: From Two Points & Point-Slope Form

📈 Writing Linear Equations

Part 3 of 5 — From Two Points & Point-Slope Form


🔑 Two points are enough. Given any two points on a line, you can find the slope with the slope formula, and then you're back to the "slope and a point" case from Part 2.

The Slope Formula

For two points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2):

m=y2−y1x2−x1=change in ychange in xm = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\text{change in } y}{\text{change in } x}

Worked Example: line through (2,3)(2, 3) and (4,9)(4, 9)

m=9−34−2=62=3m = \frac{9 - 3}{4 - 2} = \frac{6}{2} = 3

Now use slope 33 with either point — say (2,3)(2, 3):

3=3(2)+b  ⇒  3=6+b  ⇒  b=−33 = 3(2) + b \;\Rightarrow\; 3 = 6 + b \;\Rightarrow\; b = -3

Equation: y=3x−3y = 3x - 3.

⚠️ Subtract in the same order top and bottom. y2−y1x2−x1\dfrac{y_2 - y_1}{x_2 - x_1} is fine, and so is y1−y2x1−x2\dfrac{y_1 - y_2}{x_1 - x_2} — but never mix the orders, or you'll flip the sign of the slope.

Concept Check 🎯

Slope from Two Points 🧮

Use m=y2−y1x2−x1m = \dfrac{y_2 - y_1}{x_2 - x_1}. Enter each slope as an integer.

1) (2,5)(2, 5) and (6,13)⇒m= ?(6, 13) \quad\Rightarrow\quad m = \,? 2) (−2,7)(-2, 7) and (3,−3)⇒m= ?(3, -3) \quad\Rightarrow\quad m = \,? 3) (0,−3)(0, -3) and (4,5)⇒m= ?(4, 5) \quad\Rightarrow\quad m = \,?

Point-Slope Form

There's a shortcut that skips solving for bb. The point-slope form uses a slope mm and any point (x1,y1)(x_1, y_1) directly:

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

Worked Example: slope 44 through (1,2)(1, 2)

y−2=4(x−1)y - 2 = 4(x - 1)

To convert to slope-intercept form, distribute and isolate yy:

y−2=4x−4  ⇒  y=4x−2y - 2 = 4x - 4 \;\Rightarrow\; y = 4x - 2

💡 Two valid routes to the same line. Point-slope is fastest to write down; slope-intercept is best for graphing and reading off bb. Distributing and solving for yy converts one into the other.

Convert Point-Slope → Slope-Intercept 🔽

Convert y−5=−2(x−3)y - 5 = -2(x - 3) to slope-intercept form.

Part 4: Special Lines, Standard Form & Modeling

📈 Writing Linear Equations

Part 4 of 5 — Special Lines, Standard Form & Modeling


🔑 Beyond the basics. Horizontal and vertical lines, parallel and perpendicular lines, the standard form Ax+By=CAx + By = C, and real-world stories all reduce to the same skill: nail down mm and bb.

Horizontal & Vertical Lines

LineEquationSlope
Horizontal through (3,4)(3, 4)y=4y = 400
Vertical through (3,4)(3, 4)x=3x = 3undefined
  • A horizontal line has slope 00: y=mx+by = mx + b becomes y=by = b. The yy-value never changes.
  • A vertical line has an undefined slope (run =0= 0 means dividing by zero). It is written x=ax = a and cannot be put in y=mx+by = mx + b form.

Parallel & Perpendicular Lines

RelationshipSlopes
Parallelequal: m1=m2m_1 = m_2
Perpendicularnegative reciprocals: m1⋅m2=−1m_1 \cdot m_2 = -1

To get a perpendicular slope, flip the fraction and change the sign:

2  →  −12,−3  →  13,34  →  −432 \;\to\; -\tfrac{1}{2}, \qquad -3 \;\to\; \tfrac{1}{3}, \qquad \tfrac{3}{4} \;\to\; -\tfrac{4}{3}

⚠️ "Negative reciprocal" needs both moves: flip and negate. The reciprocal of 22 is 12\tfrac{1}{2}; negating gives −12-\tfrac{1}{2}.

Concept Check 🎯

Standard Form: Ax+By=CAx + By = C

Lines often appear as Ax+By=CAx + By = C. To find the slope and intercept, solve for yy.

Worked Example: 2x+3y=122x + 3y = 12

3y=−2x+12  ⇒  y=−23x+43y = -2x + 12 \;\Rightarrow\; y = -\tfrac{2}{3}x + 4

So m=−23m = -\dfrac{2}{3} and b=4b = 4.

Worked Example: 4x−2y=64x - 2y = 6

−2y=−4x+6  ⇒  y=2x−3-2y = -4x + 6 \;\Rightarrow\; y = 2x - 3

So m=2m = 2 and b=−3b = -3 — remember dividing by the negative −2-2 flips the sign of every term.

💡 To go the other way (slope-intercept → standard), move the xx-term to the left so xx and yy are on one side and the constant is on the other.

Convert Standard Form 🧮

Solve each for yy, then enter the slope mm and intercept bb.

1) x+y=8⇒m= ?,  b= ?x + y = 8 \quad\Rightarrow\quad m = \,?,\ \ b = \,? 2) 4x−2y=6⇒m= ?,  b= ?4x - 2y = 6 \quad\Rightarrow\quad m = \,?,\ \ b = \,?

Real-World Modeling

In a linear story, the rate of change is the slope and the starting amount is the yy-intercept.

Example: Gym Membership

A gym charges a $25 sign-up fee plus $15 per month. Total cost after xx months:

y=15x+25y = 15x + 25

  • b=25b = 25: the cost at month 00 (the one-time fee).
  • m=15m = 15: the cost added each month.

After 66 months: y=15(6)+25=90+25=115y = 15(6) + 25 = 90 + 25 = 115, giving $115.

💡 Decode the words. "Per," "each," and "every" signal the slope. A flat "fee," "deposit," or "starting" amount signals the yy-intercept.

Concept Check 🎯

Part 5: Mixed Practice & Mastery Check

📈 Writing Linear Equations

Part 5 of 5 — Mixed Practice & Mastery Check


You can now (1) read slope and intercept from y=mx+by = mx + b, (2) write a line from a slope and a point, (3) write a line from two points or point-slope form, and (4) handle special lines, standard form, and word problems. Time to put it together.

Quick Reference

GoalKey move
Read a liney=mx+by = mx + b: mm = slope, bb = yy-intercept
Slope from two pointsm=y2−y1x2−x1m = \dfrac{y_2 - y_1}{x_2 - x_1}
Find bb from a pointb=y−mxb = y - mx
Point-slope formy−y1=m(x−x1)y - y_1 = m(x - x_1)
Standard Ax+By=CAx + By = Csolve for yy to read mm and bb
Parallel slopesequal
Perpendicular slopesnegative reciprocals (m1m2=−1m_1 m_2 = -1)

⚠️ Subtract coordinates in a consistent order for slope, distribute carefully in point-slope, and flip and negate for a perpendicular slope.

Mixed Practice 🧮

1) Line through (0,4)(0, 4) and (2,0)(2, 0): enter mm, then bb. 2) Slope −2-2 through (3,1)(3, 1): enter bb.

Mixed Practice 🎯

Exit Quiz ✅

Answer all three to finish the lesson.