Algebra 1

The Secret Life of Lines

You’ve seen lines on graphs before. But have you ever wondered what actually controls a line? What makes one steep and another flat? What makes one cross high up on the y-axis and another way down low?

It all comes down to two numbers. Let’s meet them.

What IS a Line?

The equation of every straight line can be written as:

y=mx+by = mx + b

That’s it. Two letters — m and b — and you can describe any straight line on a graph (well, almost any… we’ll get to the exception later).

Here’s a simple one to start: y = x. That means m = 1 and b = 0.

-8-6-4-22468-8-6-4-22468

For every step you take to the right, you go up by the same amount. That’s what a slope of 1 looks like. Now let’s start playing with those two magic numbers.


Part 1: The Slope (m) — How Steep Is Your Line?

The slope tells you how tilted the line is. Mathematicians call it m, and here’s the simple way to think about it:

Slope = rise / run — how much you go UP for every step to the RIGHT.

Drag the slider to change the slope and watch what happens:

Slope (m)1
-55
y=1xy = 1x
-8-6-4-22468-10-8-6-4-2246810
Try This

Play with the slope and notice these things:

  • m = 1: For every 1 step right, you go 1 step up
  • m = 2: For every 1 step right, you go 2 steps up — steeper!
  • m = 0.5: For every 1 step right, you only go half a step up — gentler
  • m = 0: Completely flat — a horizontal line!
  • m < 0: The line tilts the other way — it goes downhill

Part 2: The Y-Intercept (b) — Where Does the Line Start?

Now let’s look at b. The y-intercept is where your line crosses the y-axis (the vertical line in the middle). It’s the value of y when x = 0.

Keep the slope at 1 and slide b around:

Y-intercept (b)0
-88
y=x+0y = x + 0
-8-6-4-22468-10-8-6-4-2246810

See how the line slides up and down but keeps the same tilt? That’s because b only shifts the line vertically — it doesn’t change the steepness at all.

Try This

Think about it: When x = 0, the equation y = mx + b becomes y = m(0) + b = b. So the line always passes through the point (0, b) on the y-axis. That’s why it’s called the y-intercept — it’s where the line intercepts (crosses) the y-axis!


Part 3: Both Together — The Full Picture

Now let’s put both sliders together and see the full power of y = mx + b:

Slope (m)1
-55
Y-intercept (b)0
-88
y=1x+0y = 1x + 0
-10-8-6-4-2246810-10-8-6-4-2246810

The dot on the x-axis shows where y = 0 — that’s the x-intercept, or the root of the equation. You can find it by setting y = 0 and solving: 0 = mx + b, so x = -b/m.

Challenge

Challenge: Can you use the sliders to make a line that:

  1. Passes through the point (0, 3)?
  2. Passes through both (0, 2) and (2, 0)?
  3. Goes through the origin with a slope of -3?

Hint: For #2, think about what b must be, then figure out what slope gets you from (0, 2) to (2, 0) — that’s a rise of -2 over a run of 2.


Part 4: Negative Slopes — Going Downhill

When m is negative, the line falls from left to right instead of rising. Think of it like walking downhill.

Negative slope (m)-1
-5-0.1
y=1xy = -1x
-8-6-4-22468-10-8-6-4-2246810negative slopey = x (for reference)

Notice how the negative-slope line is like a mirror image of the positive one. A slope of -2 means: for every 1 step right, you go 2 steps down.


Part 5: Special Cases

Horizontal Lines: m = 0

When the slope is zero, there is no rise at all. The line is perfectly flat:

b (height)3
-55
y=3y = 3
-8-6-4-22468-8-6-4-22468

A horizontal line has the equation y = b — no matter what x is, y is always the same number. Every point on this line has the same height.

Super Steep Lines

What happens when the slope gets really big (or really negative)? The line becomes almost vertical:

Steep slope (m)5
-1010
y=5xy = 5x
-8-6-4-22468-10-8-6-4-2246810
Connection

Fun fact: A truly vertical line (like x = 3) can’t be written as y = mx + b. Its slope would be “infinity” — the rise is some number, but the run is zero, and you can’t divide by zero! That’s why we said y = mx + b describes almost any line. Vertical lines are the one exception.


Part 6: Comparing Lines

Let’s put multiple lines on the same graph to see how different slopes look side by side:

-6-4-2246-6-4-2246810y = 0.5x + 1y = x + 1y = 2x + 1

All three lines have the same y-intercept (b = 1) but different slopes. They all cross the y-axis at the same point, then fan out at different angles.

Now let’s see lines with the same slope but different intercepts:

-6-4-2246-6-4-22468y = x - 2y = xy = x + 3

Same slope, different intercepts — the lines are parallel! They have the same steepness but are shifted up or down. They’ll never cross each other, no matter how far you extend them.


Part 7: Parallel and Perpendicular Lines

Parallel Lines: Same Slope

Two lines are parallel when they have the same slope (same m). Slide the slopes together and watch:

Slope of Line 1 (m₁)1
-33
Slope of Line 2 (m₂)1
-33
-8-6-4-22468-10-8-6-4-2246810Line 1Line 2
Try This

Try this: Set both slopes to the same number (like m1 = 2 and m2 = 2). The lines stay parallel — they never meet! Now make the slopes different and watch them cross somewhere on the graph.

Perpendicular Lines: Slopes Multiply to -1

Two lines are perpendicular (they meet at a 90-degree angle) when their slopes multiply to give -1. In other words:

m1×m2=1m_1 \times m_2 = -1

That means if one line has slope m, the perpendicular line has slope -1/m.

Slope of Line 1 (m)2
0.24
m1=2,m2=00m_1 = 2, \quad m_2 = -\frac00
-8-6-4-22468-8-6-4-22468Line 1Line 2 (perpendicular)
Connection

Why -1? Think about it: if one line goes up steeply (big positive slope), the perpendicular line must go down gently (small negative slope) to make that right angle. The “up steeply” and “down gently” parts cancel each other out perfectly — that’s why their product is always -1.

Try sliding the slope to see this in action. When Line 1 has slope 2, Line 2 has slope -0.5, and 2 x (-0.5) = -1.


Wrapping Up

Here’s what you’ve discovered:

Part of y = mx + bWhat it controls
m (slope)How steep the line is — positive goes uphill, negative goes downhill
b (y-intercept)Where the line crosses the y-axis — shifts the line up or down
m = 0Horizontal line
Same m, different bParallel lines
m1 x m2 = -1Perpendicular lines
Challenge

Final Challenge: A line passes through (0, 4) and (2, 0). Find its slope and y-intercept. Then find the equation of a line that is:

  1. Parallel to it and passes through (0, -1)
  2. Perpendicular to it and passes through the origin

Use the sliders above to check your answers visually!

Two numbers. That’s all it takes to define a line. Not bad for the simplest equation in algebra, right?

Take the Quiz