Algebra 1

When Lines Collide

You already know how to graph a line using y = mx + b. But what happens when you put two lines on the same graph? Sometimes they cross, sometimes they don’t, and sometimes they’re secretly the same line all along.

This is the world of systems of equations — and it turns out that finding where two lines meet is one of the most useful skills in all of math.


Part 1: Two Lines, One Graph

Let’s start simple. Here are two lines sharing the same coordinate plane:

y=2x+10y=x+4y = 2x + 1 \quad \text0 \quad y = -x + 4
-6-4-2246-4-2246810y = 2x + 1y = -x + 4

See where they cross? That point — (1, 3) — is special. It’s the one point that lives on both lines at the same time. Plug x = 1 into either equation and you get y = 3. That crossing point is called the solution to the system.

Try This

Think about it: A “solution” to a system of two equations is an (x, y) pair that makes both equations true at the same time. Graphically, it’s the point where the two lines intersect.


Part 2: Build Your Own Collision

Now it’s your turn. Use the sliders to control two lines and watch them interact in real time. Line 1 is purple, Line 2 is red.

Line 1: slope (m₁)1
-55
Line 1: intercept (b₁)2
-88
Line 2: slope (m₂)-1
-55
Line 2: intercept (b₂)3
-88
y=1x+20y=1x+3y = 1x + 2 \quad \text0 \quad y = -1x + 3
-10-8-6-4-2246810-10-8-6-4-2246810Line 1Line 2

Drag those sliders around. Watch the lines tilt, shift, cross, and separate. You’re controlling a whole system of equations with your fingertips.


Part 3: The Three Possible Outcomes

Every system of two linear equations falls into one of exactly three categories. Let’s explore each one.

Case 1: One Solution (Lines Cross)

When two lines have different slopes, they will always cross at exactly one point. One solution. Done.

Slope 1 (m₁)2
-44
Slope 2 (m₂)-0.5
-44
-8-6-4-22468-8-6-4-22468Line 1Line 2
Try This

Experiment: Try making the slopes closer and closer to each other. The intersection point slides further and further away from the center. The more similar the slopes, the further out the lines finally meet. But as long as the slopes are different, they will cross somewhere!

Case 2: No Solution (Parallel Lines)

What if the two lines have the same slope but different y-intercepts? They tilt the same way, but one is shifted up or down. They’re parallel — they never touch.

Shared slope (m)1.5
-33
Intercept 1 (b₁)3
-66
Intercept 2 (b₂)-2
-66
y=1.5x+30y=1.5x+2y = 1.5x + 3 \quad \text0 \quad y = 1.5x + -2
-8-6-4-22468-10-8-6-4-2246810Line 1Line 2

No matter how far you extend the graph, those lines never meet. There is no solution — no (x, y) pair that satisfies both equations at once. In math class, you might hear this called an inconsistent system.

Connection

Spot the pattern: Parallel lines have the same slope (m) but different y-intercepts (b). If you tried to solve the system algebraically, you’d end up with something impossible like 0 = 5. That’s math’s way of saying “nope, no solution exists.”

Case 3: Infinite Solutions (Same Line)

Here’s the wild one. What if both equations describe the exact same line? Same slope AND same y-intercept. Every single point on the line is a solution!

Slope (m)1
-33
Intercept (b)1
-55
y=1x+10y=1x+1y = 1x + 1 \quad \text0 \quad y = 1x + 1
-8-6-4-22468-8-6-4-22468Line 1Line 2

See how the red line sits right on top of the purple one? They’re the same line, so every point is an intersection. That’s infinitely many solutions. Math folks call this a dependent system.

Try This

Real talk: In practice, two equations that look totally different can still describe the same line. For example, y = 2x + 4 and 2y = 4x + 8 are the same line in disguise — just divide the second equation by 2. When you try to solve algebraically, you get something like 0 = 0, which is true but useless. That’s the sign of infinitely many solutions.


Part 4: Finding the Solution (The Math)

Seeing the intersection on a graph is great, but you can also calculate it exactly. Here’s the idea.

If two lines intersect, then at that point they share the same x and the same y. So you can set the two equations equal:

m1x+b1=m2x+b2m_1 x + b_1 = m_2 x + b_2

Solve for x:

x=b2b1m1m2x = \frac{b_2 - b_1}{m_1 - m_2}

Then plug that x back into either equation to get y. This is called the substitution method — you’re substituting one equation into the other.

Try It Live

Use the sliders below and watch the solution coordinates update automatically.

m₁2
-44
b₁1
-66
m₂-1
-44
b₂4
-66
y=2x+10y=1x+4y = 2x + 1 \quad \text0 \quad y = -1x + 4
-10-8-6-4-2246810-10-8-6-4-2246810x = -0.5Line 1Line 2difference

The faint teal line shows the difference between the two equations. Where it crosses the x-axis (the root) is the x-coordinate of the intersection — that’s where the two lines give the same y value.

Connection

Why does the difference line work? The difference line plots (m₁x + b₁) - (m₂x + b₂). When this equals zero, the two original equations are equal — that’s the intersection! Finding where a line crosses zero is exactly what “solving the system” means.


Part 5: Substitution vs. Elimination

There are two main algebraic strategies for solving a system. You’ve already seen substitution. Let’s compare them.

Substitution

  1. Solve one equation for y (or x)
  2. Plug that expression into the other equation
  3. Solve for the remaining variable
  4. Back-substitute to find the other variable

Example: Solve y = 2x + 1 and y = -x + 4.

Since both are solved for y, set them equal: 2x + 1 = -x + 4. Add x to both sides: 3x + 1 = 4. Subtract 1: 3x = 3. So x = 1. Plug back in: y = 2(1) + 1 = 3. Solution: (1, 3).

Elimination

  1. Line up the two equations
  2. Add or subtract them to eliminate one variable
  3. Solve for the remaining variable
  4. Back-substitute

Example: Solve 2x + y = 5 and x - y = 1.

Add the equations: 3x = 6, so x = 2. Plug back in: 2(2) + y = 5, so y = 1. Solution: (2, 1).

Try This

When to use which? If one equation already has y (or x) isolated, go with substitution — it’s quicker. If both equations are in standard form (Ax + By = C), try elimination — adding or subtracting often cancels a variable cleanly. Both methods always give the same answer!


Part 6: The Big Picture

Here’s a summary of everything you’ve learned. Use the interactive graph from Part 2 to verify each case for yourself.

SlopesInterceptsLines are…Number of solutions
Different (m₁ ≠ m₂)AnythingCrossingOne
Same (m₁ = m₂)Different (b₁ ≠ b₂)ParallelNone
Same (m₁ = m₂)Same (b₁ = b₂)IdenticalInfinite
Challenge

Final Challenges:

  1. Use the Part 2 sliders to create two lines that intersect at the origin (0, 0). What must be true about both y-intercepts?
  2. Find a system where the solution is (2, 5). Hint: pick any two different slopes, then figure out the intercepts.
  3. Set up a parallel system. Now try to solve it using substitution on paper. What happens?
  4. Can you make a system where the intersection point has a negative x but a positive y? What quadrant is that?

Wrapping Up

A system of equations is just a question: “Where do these lines meet?” The answer is either one point, no point, or every point. You can find it by graphing, by substitution, or by elimination — all roads lead to the same answer.

Next time you see two equations stacked on top of each other, don’t panic. Just picture two lines on a graph and ask yourself: do they cross? If so, that crossing point is your answer.

Two equations. Two unknowns. One intersection. That’s the whole game.

Take the Quiz