Writing Linear Equations

Create equations from given information

In the previous lesson, you learned how to read a linear equation and understand what it tells you about a line. Now you are going to reverse the process. Instead of starting with an equation and figuring out the graph, you will start with information about a line and write the equation yourself. Think of it as reverse engineering. You already have all the tools you need. This lesson is about putting them together.

Core Concepts

Starting with Slope and Y-Intercept

The simplest case is when someone hands you the slope and the y-intercept directly. If you know both of these, you can write the equation immediately using slope-intercept form:

$$y = mx + b$$

where $m$ is the slope and $b$ is the y-intercept.

For example, if someone tells you “the slope is 4 and the y-intercept is $-3$,” you just plug those values in: $y = 4x - 3$. That is the equation. Done.

This feels almost too easy, and that is because it is the ideal situation. In real life, you rarely get handed exactly the information you need in exactly the form you want it. More often, you have to work a bit to extract the slope and y-intercept from other clues.

Writing Equations Given Slope and a Point

What if you know the slope and one point on the line, but that point is not the y-intercept? This is where point-slope form becomes useful.

Point-slope form is:

$$y - y_1 = m(x - x_1)$$

where $m$ is the slope and $(x_1, y_1)$ is any point on the line.

Here is the intuition: the slope tells you the relationship between any two points on the line. If you know one point and the slope, you can describe every other point on the line by saying “start at $(x_1, y_1)$ and use the slope to find the change.”

The formula $y - y_1 = m(x - x_1)$ is really just the slope formula rearranged:

$$m = \frac{y - y_1}{x - x_1}$$

Multiply both sides by $(x - x_1)$ and you get point-slope form.

Once you write the equation in point-slope form, you can distribute and simplify to get slope-intercept form if that is what you need. Both forms describe the same line.

Writing Equations Given Two Points

If you have two points but no slope, no problem. You can find the slope yourself using the slope formula:

$$m = \frac{y_2 - y_1}{x_2 - x_1}$$

Once you have the slope, pick either of your two points and use point-slope form to write the equation.

The process is:

  1. Use the two points to calculate the slope
  2. Plug the slope and one of the points into point-slope form
  3. Simplify to slope-intercept form if desired

It does not matter which point you choose for point-slope form. Both will give you the same final equation because both points are on the same line.

Writing Equations from Graphs

When you have a graph, you are looking at a visual representation of all the information you need. Your job is to extract two key pieces:

  1. Find the slope. Pick two points where the line crosses grid intersections (so you can read the coordinates clearly). Then count the rise and run between them, or use the slope formula.

  2. Find the y-intercept. Look for where the line crosses the y-axis. The y-coordinate at that point is your value of $b$.

Once you have both, plug them into $y = mx + b$.

If the y-intercept is not easy to read from the graph (maybe it falls between grid lines), just use any two clear points and the point-slope method instead.

Writing Equations from Real-World Scenarios

Word problems often describe linear relationships without using mathematical notation. Your job is to translate the English into an equation.

Look for these clues:

  • Rate of change (per hour, per mile, per item) usually becomes the slope
  • Starting value or initial amount usually becomes the y-intercept
  • Total amount is typically what you are solving for (the dependent variable, $y$)

For example: “A plumber charges $75 for a service call plus $50 per hour of labor.”

  • The $50 per hour is the rate of change (slope): $m = 50$
  • The $75 is the starting charge (y-intercept): $b = 75$
  • The equation is $y = 50x + 75$, where $x$ is hours worked and $y$ is total cost

Parallel Lines

Two lines are parallel if they never intersect. What would cause two different lines to never cross? They would have to be tilting at exactly the same angle, going in exactly the same direction. That means parallel lines have the same slope.

If you need to write an equation parallel to a given line:

  1. Find the slope of the given line
  2. Use that same slope for your new line
  3. Use point-slope form with the new point you are given

For example, if you need a line parallel to $y = 2x + 5$ that passes through $(3, 1)$:

  • The slope of the given line is 2
  • Your parallel line also has slope 2
  • Use point-slope form: $y - 1 = 2(x - 3)$
  • Simplify: $y = 2x - 5$

The two equations have the same slope (2) but different y-intercepts (5 versus $-5$), so they are parallel.

Perpendicular Lines

Two lines are perpendicular if they meet at a 90-degree angle, forming an L-shape or plus sign. For this to happen, the slopes must have a very specific relationship: they must be negative reciprocals of each other.

To find the negative reciprocal of a number:

  1. Take the reciprocal (flip the fraction)
  2. Change the sign (positive becomes negative, negative becomes positive)

For example:

  • The negative reciprocal of 2 is $-\frac{1}{2}$
  • The negative reciprocal of $-3$ is $\frac{1}{3}$
  • The negative reciprocal of $\frac{2}{5}$ is $-\frac{5}{2}$

Here is why this works: when you multiply a number by its negative reciprocal, you always get $-1$. Try it: $2 \times (-\frac{1}{2}) = -1$. This mathematical relationship is what creates the 90-degree angle.

If you need to write an equation perpendicular to a given line:

  1. Find the slope of the given line
  2. Find the negative reciprocal of that slope
  3. Use point-slope form with the new slope and the point you are given

Notation and Terminology

Term Meaning Example
Point-slope form $y - y_1 = m(x - x_1)$ $y - 3 = 2(x - 1)$
Parallel lines Lines with same slope, never intersect $y = 2x + 1$ and $y = 2x - 3$
Perpendicular lines Lines meeting at 90 degrees, slopes are negative reciprocals $y = 2x$ and $y = -\frac{1}{2}x$
Negative reciprocal Flip and change sign Negative reciprocal of 2 is $-\frac{1}{2}$

Examples

Example 1: Writing an Equation Given Slope and Y-Intercept

Write the equation of a line with slope 3 and y-intercept $-2$.

Solution:

We have the slope $m = 3$ and the y-intercept $b = -2$.

Plug directly into slope-intercept form:

$$y = mx + b$$

$$y = 3x + (-2)$$

$$y = 3x - 2$$

The equation is $y = 3x - 2$.

Check your understanding: The slope of 3 means the line rises 3 units for every 1 unit it moves to the right. The y-intercept of $-2$ means the line crosses the y-axis at the point $(0, -2)$.

Example 2: Writing an Equation Through a Point on the Y-Axis

Write the equation of a line that passes through $(0, 5)$ with slope $-1$.

Solution:

Notice that the point $(0, 5)$ is on the y-axis (the x-coordinate is 0). This means $5$ is the y-intercept.

We have $m = -1$ and $b = 5$.

$$y = mx + b$$

$$y = -1x + 5$$

$$y = -x + 5$$

The equation is $y = -x + 5$.

Why this works: Any point with an x-coordinate of 0 lies on the y-axis, so its y-coordinate is automatically the y-intercept. Recognizing this saves you the extra steps of using point-slope form.

Example 3: Writing an Equation Given Slope and a Point

Write the equation of a line that passes through $(2, 7)$ with slope 4.

Solution:

We know $m = 4$ and we have the point $(2, 7)$, but this is not the y-intercept. We use point-slope form.

Step 1: Write point-slope form with our values: $$y - y_1 = m(x - x_1)$$ $$y - 7 = 4(x - 2)$$

Step 2: Distribute the 4: $$y - 7 = 4x - 8$$

Step 3: Add 7 to both sides: $$y = 4x - 8 + 7$$ $$y = 4x - 1$$

The equation is $y = 4x - 1$.

Verification: We can check that $(2, 7)$ is actually on this line by substituting: $y = 4(2) - 1 = 8 - 1 = 7$. It checks out.

Example 4: Writing an Equation Given Two Points

Write the equation of a line that passes through $(1, 3)$ and $(4, 12)$.

Solution:

We have two points but no slope. First, we calculate the slope.

Step 1: Find the slope using the slope formula: $$m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{12 - 3}{4 - 1} = \frac{9}{3} = 3$$

Step 2: Use point-slope form with the slope and either point. We will use $(1, 3)$: $$y - 3 = 3(x - 1)$$

Step 3: Simplify to slope-intercept form: $$y - 3 = 3x - 3$$ $$y = 3x - 3 + 3$$ $$y = 3x$$

The equation is $y = 3x$.

Notice: The y-intercept turned out to be 0, which means the line passes through the origin. We could verify this by checking both original points: $3(1) = 3$ and $3(4) = 12$. Both check out.

Example 5: Writing an Equation Parallel to a Given Line

Write the equation of a line parallel to $y = 2x - 1$ that passes through $(3, 5)$.

Solution:

Parallel lines have the same slope.

Step 1: Identify the slope of the given line.

The equation $y = 2x - 1$ is in slope-intercept form. The slope is $m = 2$.

Step 2: Our parallel line also has slope 2. Use point-slope form with $(3, 5)$: $$y - 5 = 2(x - 3)$$

Step 3: Simplify: $$y - 5 = 2x - 6$$ $$y = 2x - 6 + 5$$ $$y = 2x - 1$$

Wait, that is the same equation we started with. Let me recalculate.

$$y = 2x - 6 + 5 = 2x - 1$$

Actually, this means the point $(3, 5)$ is already on the original line. Let me verify: $2(3) - 1 = 6 - 1 = 5$. Yes, the point $(3, 5)$ is on $y = 2x - 1$.

This is actually correct. If the given point is already on the original line, then the “parallel” line through that point is the original line itself.

Let us redo this with a point that is not on the original line. Suppose we want a line parallel to $y = 2x - 1$ through the point $(3, 7)$.

Step 1: Slope is still $m = 2$.

Step 2: Use point-slope form with $(3, 7)$: $$y - 7 = 2(x - 3)$$

Step 3: Simplify: $$y - 7 = 2x - 6$$ $$y = 2x + 1$$

The equation is $y = 2x + 1$.

Verification: Both lines have slope 2, so they are parallel. The point $(3, 7)$: $2(3) + 1 = 7$. Correct.

Example 6: Writing an Equation Perpendicular to a Given Line

Write the equation of a line perpendicular to $y = \frac{1}{3}x + 2$ that passes through $(-6, 4)$.

Solution:

Perpendicular lines have slopes that are negative reciprocals.

Step 1: Identify the slope of the given line.

The equation $y = \frac{1}{3}x + 2$ has slope $m = \frac{1}{3}$.

Step 2: Find the negative reciprocal.

The reciprocal of $\frac{1}{3}$ is $\frac{3}{1} = 3$.

Change the sign: the negative reciprocal is $-3$.

Step 3: Use point-slope form with slope $-3$ and point $(-6, 4)$: $$y - 4 = -3(x - (-6))$$ $$y - 4 = -3(x + 6)$$

Step 4: Simplify: $$y - 4 = -3x - 18$$ $$y = -3x - 18 + 4$$ $$y = -3x - 14$$

The equation is $y = -3x - 14$.

Verification:

  • Original slope: $\frac{1}{3}$
  • New slope: $-3$
  • Product: $\frac{1}{3} \times (-3) = -1$ (confirms perpendicular)
  • Check point: $-3(-6) - 14 = 18 - 14 = 4$ (confirms the point is on the line)

Key Properties and Rules

Forms of Linear Equations

Slope-intercept form: $y = mx + b$

  • Use when you know slope and y-intercept
  • Best for graphing and quick analysis

Point-slope form: $y - y_1 = m(x - x_1)$

  • Use when you know slope and any point
  • Best for writing equations from given information

Standard form: $Ax + By = C$

  • Useful for certain algebraic operations
  • Convert to slope-intercept form to find slope: $m = -\frac{A}{B}$

Strategy Summary

Given Information Strategy
Slope and y-intercept Plug directly into $y = mx + b$
Slope and a point Use point-slope form, then simplify
Two points Calculate slope first, then use point-slope form
Graph Read slope (rise/run) and y-intercept, use $y = mx + b$
Parallel to a line Use same slope as given line
Perpendicular to a line Use negative reciprocal of given slope

Parallel and Perpendicular Slopes

Parallel lines: Same slope, different y-intercepts

If Line 1 has slope $m$, then any parallel line also has slope $m$.

Perpendicular lines: Negative reciprocal slopes

If Line 1 has slope $m$, then any perpendicular line has slope $-\frac{1}{m}$.

Quick check: Two lines are perpendicular if and only if their slopes multiply to $-1$.

Real-World Applications

Creating Cost Models from Data

Businesses often need to create pricing equations from known data points. If you know that producing 100 items costs $500 and producing 300 items costs $900, you can find the linear cost equation:

  1. Calculate slope: $m = \frac{900 - 500}{300 - 100} = \frac{400}{200} = 2$ dollars per item
  2. Use point-slope form: $y - 500 = 2(x - 100)$
  3. Simplify: $y = 2x + 300$

The equation tells you: each item costs $2 to produce (variable cost), plus there is a $300 fixed cost regardless of production level.

Predicting Future Values

Linear equations let you extrapolate trends. If a company’s revenue was $1.2 million in 2020 and $1.8 million in 2023, and growth is approximately linear:

  1. Slope: $\frac{1.8 - 1.2}{2023 - 2020} = \frac{0.6}{3} = 0.2$ million per year
  2. Equation: $y - 1.2 = 0.2(x - 2020)$ or $y = 0.2x - 402.8$

To predict 2025 revenue: $y = 0.2(2025) - 402.8 = 405 - 402.8 = 2.2$ million dollars.

Converting Between Units

Many unit conversions are linear. The formula $F = \frac{9}{5}C + 32$ converts Celsius to Fahrenheit. If you only knew two data points (water freezes at 0C/32F and boils at 100C/212F), you could derive this equation:

  1. Slope: $\frac{212 - 32}{100 - 0} = \frac{180}{100} = \frac{9}{5}$
  2. Y-intercept: When $C = 0$, $F = 32$, so $b = 32$
  3. Equation: $F = \frac{9}{5}C + 32$

Modeling Relationships in Science

In physics, Ohm’s Law states that voltage equals current times resistance: $V = IR$. If resistance is constant, this is a linear relationship between voltage and current with slope equal to the resistance. Scientists use experimental data points to determine the resistance of a material by finding the slope of the voltage-current graph.

Self-Test Problems

Problem 1: Write the equation of a line with slope $-5$ and y-intercept 8.

Show Answer

Using slope-intercept form with $m = -5$ and $b = 8$:

$$y = -5x + 8$$

The equation is $y = -5x + 8$.

Problem 2: Write the equation of a line passing through $(4, 1)$ with slope $\frac{3}{2}$.

Show Answer

Using point-slope form: $$y - 1 = \frac{3}{2}(x - 4)$$

Distribute: $$y - 1 = \frac{3}{2}x - 6$$

Add 1 to both sides: $$y = \frac{3}{2}x - 5$$

The equation is $y = \frac{3}{2}x - 5$.

Problem 3: Write the equation of a line passing through $(-2, 5)$ and $(4, -7)$.

Show Answer

First, find the slope: $$m = \frac{-7 - 5}{4 - (-2)} = \frac{-12}{6} = -2$$

Use point-slope form with $(-2, 5)$: $$y - 5 = -2(x - (-2))$$ $$y - 5 = -2(x + 2)$$ $$y - 5 = -2x - 4$$ $$y = -2x + 1$$

The equation is $y = -2x + 1$.

Problem 4: Write the equation of a line parallel to $y = -4x + 7$ that passes through $(2, 3)$.

Show Answer

Parallel lines have the same slope, so $m = -4$.

Use point-slope form: $$y - 3 = -4(x - 2)$$ $$y - 3 = -4x + 8$$ $$y = -4x + 11$$

The equation is $y = -4x + 11$.

Problem 5: Write the equation of a line perpendicular to $y = \frac{2}{3}x - 1$ that passes through $(6, 0)$.

Show Answer

The given slope is $\frac{2}{3}$. The negative reciprocal is $-\frac{3}{2}$.

Use point-slope form: $$y - 0 = -\frac{3}{2}(x - 6)$$ $$y = -\frac{3}{2}x + 9$$

The equation is $y = -\frac{3}{2}x + 9$.

Verification: $\frac{2}{3} \times (-\frac{3}{2}) = -1$, confirming perpendicularity.

Problem 6: A phone plan charges a flat monthly fee plus a cost per gigabyte of data. Using 5 GB costs $35, and using 12 GB costs $56. Write an equation for the monthly cost in terms of gigabytes used.

Show Answer

Let $x$ = gigabytes used and $y$ = total monthly cost.

We have two points: $(5, 35)$ and $(12, 56)$.

Find the slope: $$m = \frac{56 - 35}{12 - 5} = \frac{21}{7} = 3$$

This means each gigabyte costs $3.

Use point-slope form with $(5, 35)$: $$y - 35 = 3(x - 5)$$ $$y - 35 = 3x - 15$$ $$y = 3x + 20$$

The equation is $y = 3x + 20$.

Interpretation: The plan charges $20 per month as a base fee, plus $3 per gigabyte of data used.

Summary

  • When you have slope and y-intercept, use slope-intercept form directly: $y = mx + b$.
  • When you have slope and any point, use point-slope form: $y - y_1 = m(x - x_1)$, then simplify.
  • When you have two points, first calculate the slope using $m = \frac{y_2 - y_1}{x_2 - x_1}$, then use point-slope form.
  • When reading from a graph, identify two clear points for slope and find where the line crosses the y-axis.
  • Parallel lines have the same slope. To write a parallel equation, keep the slope and use the new point.
  • Perpendicular lines have slopes that are negative reciprocals (flip and change sign). Their slopes multiply to $-1$.
  • In real-world problems, rates of change become slopes and starting values become y-intercepts.
  • Point-slope form is your most versatile tool because it works whenever you know the slope and at least one point.