How to Build Linear Functions from Tables, Graphs, and Points? (+FREE Worksheet!)

How to Build Linear Functions from Tables, Graphs, and Points? (+FREE Worksheet!)

Building a linear function means writing an equation in the form \(y = mx + b\) from the information you are given. You might start with a slope and a y-intercept, a slope and one point, or just two points. Regardless of the starting information, the goal is always the same: find \(m\) (slope) and \(b\) (y-intercept).

This is a foundational 8th-grade algebra skill that connects tables, graphs, word problems, and equations. In this lesson you will learn three core techniques, work through fully solved examples, and practice on your own.

Three Ways to Build a Linear Function

Method 1, Given Slope and Y-Intercept

If you already know \(m\) and \(b\), simply plug them into the slope-intercept form:

\(y = mx + b\)

Example: Slope \(= 4\), y-intercept \(= -3\). Equation: \(y = 4x – 3\). Done!

Method 2, Given Slope and One Point

  1. Substitute the slope \(m\) and the point \((x_{1}, y_{1})\) into \(y = mx + b\).
  2. Solve for \(b\).
  3. Write the final equation.

Example: Slope \(= 2\), point \((3, 11)\).

\(11 = 2(3) + b \Rightarrow 11 = 6 + b \Rightarrow b = 5\)

Equation: \(y = 2x + 5\).

Method 3, Given Two Points

  1. Find the slope: \(m = \dfrac{y_{2} – y_{1}}{x_{2} – x_{1}}\).
  2. Find the y-intercept: Substitute \(m\) and either point into \(y = mx + b\) and solve for \(b\).
  3. Write the equation.

Example: Points \((1, 3)\) and \((4, 12)\).

\(m = \dfrac{12 – 3}{4 – 1} = \dfrac{9}{3} = 3\)

\(3 = 3(1) + b \Rightarrow b = 0\)

Equation: \(y = 3x\).

Step-by-Step Guide

  1. Identify what you are given: slope + intercept, slope + point, or two points.
  2. If you need the slope, use the slope formula: \(m = \dfrac{y_{2} – y_{1}}{x_{2} – x_{1}}\).
  3. If you need the y-intercept, substitute \(m\) and a known point into \(y = mx + b\) and solve for \(b\).
  4. Write the equation in slope-intercept form \(y = mx + b\).
  5. Verify by plugging a known point into your equation to confirm both sides match.

Worked Examples

Example 1, From a Table

\(x\)\(y\)
0-1
25
411

Solution: The table includes \(x = 0\), so the y-intercept is \(b = -1\). Slope: \(m = \frac{5-(-1)}{2-0} = \frac{6}{2} = 3\).

Equation: \(y = 3x – 1\)

Check with \((4, 11)\): \(3(4) – 1 = 11\) ✓

Example 2, From Two Points

Points: \((-2, 7)\) and \((3, -3)\).

\(m = \dfrac{-3 – 7}{3 – (-2)} = \dfrac{-10}{5} = -2\)

Using \((3, -3)\): \(-3 = -2(3) + b \Rightarrow -3 = -6 + b \Rightarrow b = 3\)

Equation: \(y = -2x + 3\)

Example 3, From a Word Problem

A plumber charges \$45 per hour plus a \$30 trip fee. Write a linear function for the total cost \(C\) after \(h\) hours.

Slope (rate): \(m = 45\). Initial value (trip fee): \(b = 30\).

Equation: \(C = 45h + 30\)

Example 4, From Slope and a Point

Slope \(= \frac{3}{4}\), passes through \((8, 10)\).

\(10 = \frac{3}{4}(8) + b \Rightarrow 10 = 6 + b \Rightarrow b = 4\)

Equation: \(y = \frac{3}{4}x + 4\)

Video Lesson

Watch this video for additional examples and a step-by-step walkthrough:

Special Cases

Horizontal Lines

A horizontal line has slope \(m = 0\). The equation is simply \(y = b\), where \(b\) is the constant \(y\)-value. Example: \(y = 5\) is a horizontal line at height 5.

Vertical Lines

A vertical line has an undefined slope. Its equation is \(x = a\) (a constant). Note: a vertical line is not a function (it fails the vertical line test).

Through the Origin

If the line passes through \((0, 0)\), then \(b = 0\) and the equation simplifies to \(y = mx\). This is called a direct variation or proportional relationship.

Practice Problems

  1. Write the equation of a line with slope \(5\) and y-intercept \(-2\).
  2. Write the equation of a line with slope \(-3\) passing through \((2, 1)\).
  3. Find the equation of the line through \((0, 4)\) and \((6, 10)\).
  4. Find the equation of the line through \((-1, 5)\) and \((3, -7)\).
  5. A taxi charges \$2.50 per mile plus a \$3.00 base fare. Write the equation for total cost.
  6. A table shows \(x = 1, 2, 3\) and \(y = 8, 13, 18\). Write the equation.
  7. Write the equation of a line with slope \(\frac{2}{3}\) passing through \((-6, 1)\).
  8. Find the equation of the line through \((4, 0)\) and \((0, -8)\).
  9. A membership starts at \$100 and increases by \$15 each month. Write the equation for total cost after \(m\) months.
  10. The points \((2, 9)\) and \((5, 9)\) are on a line. Write its equation.

Solutions

  1. \(y = 5x – 2\)
  2. \(1 = -3(2) + b \Rightarrow b = 7\). Answer: \(y = -3x + 7\)
  3. Slope \(= \frac{10-4}{6-0} = 1\). Answer: \(y = x + 4\)
  4. Slope \(= \frac{-7-5}{3-(-1)} = \frac{-12}{4} = -3\). Using \((-1, 5)\): \(b = 5 + (-3) = 2\). Answer: \(y = -3x + 2\)
  5. \(C = 2.50m + 3.00\)
  6. Slope \(= 5\). Using \((1, 8)\): \(b = 3\). Answer: \(y = 5x + 3\)
  7. \(1 = \frac{2}{3}(-6) + b \Rightarrow 1 = -4 + b \Rightarrow b = 5\). Answer: \(y = \frac{2}{3}x + 5\)
  8. Slope \(= \frac{-8-0}{0-4} = 2\). Intercept \(= -8\). Answer: \(y = 2x – 8\)
  9. \(C = 15m + 100\)
  10. Same \(y\)-value → horizontal line. Answer: \(y = 9\)

Common Mistakes to Avoid

  • Subtracting coordinates in the wrong order. In the slope formula, make sure you subtract the same point’s coordinates on top and bottom: \(\frac{y_{2}-y_{1}}{x_{2}-x_{1}}\), not \(\frac{y_{2}-y_{1}}{x_{1}-x_{2}}\).
  • Forgetting to find \(b\). After computing the slope, you still need the y-intercept. Always plug in a known point.
  • Sign errors with negatives. When points have negative coordinates, be extra careful: \((-3)-5 = -8\), not \(-2\).

Frequently Asked Questions

How do you construct linear functions?

To construct a linear function, find the slope m and the y-intercept b, then write y = mx + b. You might be given them directly, a slope and a point, or two points. For example, slope 2 through (3, 11): substitute to get 11 = 2(3) + b, so b = 5 and the function is y = 2x + 5.

How do you make a linear function from a table?

Pick two rows and find the rate of change: change in y divided by change in x. Then use the row where x = 0, if there is one, for b. If a table shows (0, 4), (1, 7) and (2, 10), y goes up 3 each time x goes up 1, so m = 3 and b = 4, giving y = 3x + 4. Check a third row to confirm.

How do you make a linear equation from two points?

Use the slope formula m = (y₂ − y₁)/(x₂ − x₁), then plug m and one point into y = mx + b to solve for b. With (2, 7) and (5, 16), m = 9/3 = 3. Then 7 = 3(2) + b gives b = 1, so y = 3x + 1. Plug in the other point to check: 3(5) + 1 = 16.

How do you make a linear function from a graph?

Read the y-intercept where the line crosses the y-axis, then pick two clear grid points and count rise over run for the slope. If a line crosses at (0, −3) and rises 4 for every 1 step right, the slope is 4 and the function is y = 4x − 3. Choose points that land exactly on grid corners to avoid reading errors.

How do you make linear equations from word problems?

Look for the starting amount and the rate. The starting amount is b and the constant rate is m. For example, a gym charges a $25 joining fee plus $10 per month, so the cost is y = 10x + 25, where x is months. After 6 months, y = 10(6) + 25 = $85.

What is a linear cost function?

A linear cost function gives total cost as C = mx + b, where m is the cost per item and b is the fixed cost you pay no matter what. If printing T-shirts costs $8 each plus a $40 setup fee, C = 8x + 40. Printing 15 shirts costs 8(15) + 40 = $160.

Related to This Article

What people say about "Build Linear Functions from Tables and Graphs"?

No one replied yet.

Leave a Reply