Learn on PengiOpenStax Algebra and TrigonometryChapter 4: Linear Functions

Lesson 4.1: Linear Functions

In this Grade 7 math lesson from OpenStax Algebra and Trigonometry, students learn to represent and interpret linear functions using word form, function notation, tabular form, and graphical form. The lesson covers key concepts including slope as a rate of change, the slope-intercept form f(x) = mx + b, and how to determine whether a linear function is increasing, decreasing, or constant. Students also explore how to write equations for parallel and perpendicular lines, using real-world contexts like train motion and plant growth to ground the algebra.

Section 1

📘 Linear Functions

New Concept

Linear functions describe relationships with a constant rate of change. We'll explore how to write their equations, like f(x)=mx+bf(x) = mx + b, interpret slope and intercepts, and graph them to model and solve real-world problems.

What’s next

Next, you'll work through interactive examples on finding slope and writing linear equations. Then, test your skills with practice cards and challenge problems.

Section 2

Linear Function

Property

A linear function is a function whose graph is a line. Linear functions can be written in the slope-intercept form of a line

f(x)=mx+bf(x) = mx + b

where bb is the initial or starting value of the function (when input, x=0x = 0), and mm is the constant rate of change, or slope of the function. The yy-intercept is at (0,b)(0, b).

Examples

  • A car travels at a constant speed of 50 miles per hour. Its distance DD from a starting point after tt hours can be modeled by D(t)=50tD(t) = 50t.
  • A phone plan costs 20 dollars a month plus 5 cents for each text message. The monthly cost CC for xx messages is C(x)=0.05x+20C(x) = 0.05x + 20.
  • For the function f(x)=3x+2f(x) = 3x + 2, the value when x=4x=4 is f(4)=3(4)+2=14f(4) = 3(4) + 2 = 14. The point (4,14)(4, 14) is on the line.

Explanation

Think of a linear function as a rule for anything that changes at a steady rate. The 'm' is the rate of change (how steep the line is), and 'b' is the starting point on the vertical axis before any change happens.

Section 3

Increasing, Decreasing, and Constant Functions

Property

The slope determines if the function is an increasing linear function, a decreasing linear function, or a constant function.

f(x)=mx+b is an increasing function if m>0.f(x) = mx + b \text{ is an increasing function if } m > 0.
f(x)=mx+b is a decreasing function if m<0.f(x) = mx + b \text{ is a decreasing function if } m < 0.
f(x)=mx+b is a constant function if m=0.f(x) = mx + b \text{ is a constant function if } m = 0.

Examples

  • The function f(x)=2x+5f(x) = 2x + 5 is increasing because the slope m=2m=2 is positive.
  • The function g(x)=−3x+1g(x) = -3x + 1 is decreasing because the slope m=−3m=-3 is negative.
  • The function h(x)=9h(x) = 9 is constant because the slope m=0m=0. Its graph is a horizontal line.

Explanation

The sign of the slope tells you the direction of the line. A positive slope means the line goes uphill from left to right. A negative slope means it goes downhill. A zero slope means the line is perfectly flat.

Section 4

Calculate Slope

Property

The slope, or rate of change, of a function mm can be calculated according to the following:

m=change in output (rise)change in input (run)=ΔyΔx=y2−y1x2−x1m = \frac{\text{change in output (rise)}}{\text{change in input (run)}} = \frac{\Delta y}{\Delta x} = \frac{y_2 - y_1}{x_2 - x_1}

where x1x_1 and x2x_2 are input values, y1y_1 and y2y_2 are output values. To interpret the slope, use the units of the output and input, such as 'dollars per hour' or 'feet per second'.

Examples

  • Given the points (2,1)(2, 1) and (6,9)(6, 9), the slope is m=9−16−2=84=2m = \frac{9-1}{6-2} = \frac{8}{4} = 2.
  • A town's population grew from 5,200 to 6,000 in 4 years. The rate of change is 6000−52004 years=8004=200\frac{6000 - 5200}{4 \text{ years}} = \frac{800}{4} = 200 people per year.
  • If a linear function has points (1,−1)(1, -1) and (4,5)(4, 5), its slope is m=5−(−1)4−1=63=2m = \frac{5 - (-1)}{4 - 1} = \frac{6}{3} = 2. The function is increasing.

Explanation

Slope measures the steepness of a line. It's the 'rise over run,' telling you how much the vertical value changes for every one unit of horizontal change. A bigger slope value means a steeper line.

Section 5

Writing an Equation for a Linear Function

Property

To write an equation for a linear function, you need to find the slope (m)(m) and the yy-intercept (b)(b).

  1. Identify two points on the line.
  2. Use the two points to calculate the slope: m=y2−y1x2−x1m = \frac{y_2 - y_1}{x_2 - x_1}.
  3. Use the slope and one point (x1,y1)(x_1, y_1) in the point-slope form, y−y1=m(x−x1)y - y_1 = m(x - x_1), and solve for yy. Alternatively, substitute mm and a point into y=mx+by = mx+b and solve for bb.

Examples

  • A line has a slope of 4 and passes through (2,5)(2, 5). Using y=mx+by = mx + b, we get 5=4(2)+b5 = 4(2) + b, so 5=8+b5 = 8 + b, and b=−3b = -3. The equation is y=4x−3y = 4x - 3.
  • A line passes through (1,2)(1, 2) and (4,11)(4, 11). The slope is m=11−24−1=93=3m = \frac{11-2}{4-1} = \frac{9}{3} = 3. Using the point (1,2)(1,2), we have y−2=3(x−1)y-2 = 3(x-1), which simplifies to y=3x−1y = 3x - 1.
  • A gym charges a 50 dollars sign-up fee and 25 dollars per month. The cost function is C(x)=25x+50C(x) = 25x + 50, where xx is the number of months.

Explanation

To define a specific line, you need to know its direction (slope) and one point it passes through. Once you have these two pieces of information, you can create a unique formula for that line.

Section 6

x-intercept

Property

The xx-intercept of the function is value of xx when f(x)=0f(x) = 0. It is the point where the graph crosses the xx-axis. It can be solved by the equation 0=mx+b0 = mx + b. Not all linear functions have xx-intercepts; a horizontal line like y=cy=c (for c≠0c \neq 0) does not cross the xx-axis.

Examples

  • To find the x-intercept of f(x)=2x−10f(x) = 2x - 10, set 0=2x−100 = 2x - 10. Solving gives 10=2x10 = 2x, so x=5x = 5. The x-intercept is (5,0)(5, 0).
  • The function f(x)=−13x+2f(x) = -\frac{1}{3}x + 2 has an x-intercept where 0=−13x+20 = -\frac{1}{3}x + 2. This gives 13x=2\frac{1}{3}x = 2, so x=6x=6. The intercept is (6,0)(6, 0).
  • The horizontal line f(x)=4f(x)=4 never crosses the x-axis, so it has no x-intercept.

Explanation

The x-intercept is where the line hits the horizontal axis. At this specific point, the output of the function is zero. To find it, you just set the function's formula equal to zero and solve for x.

Section 7

Horizontal and Vertical Lines

Property

Lines can be horizontal or vertical.
A horizontal line is a line defined by an equation in the form f(x)=bf(x) = b. It has a slope of 0.
A vertical line is a line defined by an equation in the form x=ax = a. Its slope is undefined. A vertical line is not a function.

Examples

  • The equation of a horizontal line passing through the point (5,−2)(5, -2) is y=−2y = -2.
  • The equation of a vertical line passing through the point (3,8)(3, 8) is x=3x = 3.
  • The function f(x)=10f(x) = 10 represents a horizontal line with a slope of 0. The line x=−1x = -1 is a vertical line with an undefined slope.

Explanation

A horizontal line is perfectly flat because its y-value is always the same, resulting in a zero slope. A vertical line is straight up and down because its x-value is constant. Its slope is undefined.

Section 8

Parallel and Perpendicular Lines

Property

Two lines are parallel lines if they do not intersect. The slopes of the lines are the same (m1=m2m_1 = m_2) and the yy-intercepts are different.
Two lines are perpendicular lines if they intersect to form a right angle. The product of their slopes is −1-1 (m1m2=−1m_1 m_2 = -1), meaning their slopes are negative reciprocals of each other (m2=−1m1m_2 = -\frac{1}{m_1}).

Examples

  • The lines f(x)=4x+1f(x) = 4x + 1 and g(x)=4x−5g(x) = 4x - 5 are parallel because both have a slope of 44.
  • The lines f(x)=2x+3f(x) = 2x + 3 and g(x)=−12x+8g(x) = -\frac{1}{2}x + 8 are perpendicular because their slopes, 22 and −12-\frac{1}{2}, multiply to −1-1.
  • The line parallel to y=−x+2y = -x + 2 that passes through (1,5)(1, 5) is y=−x+6y = -x + 6.

Explanation

Parallel lines have the same steepness, so they never meet. Perpendicular lines intersect at a perfect 90-degree angle. Their slopes have a special relationship: one is the flipped, negated version of the other, like 33 and −13-\frac{1}{3}.

Book overview

Jump across lessons in the current chapter without opening the full course modal.

Continue this chapter

Chapter 4: Linear Functions

  1. Lesson 1Current

    Lesson 4.1: Linear Functions

  2. Lesson 2

    Lesson 4.2 : Modeling with Linear Functions

  3. Lesson 3

    Lesson 4.3 : Fitting Linear Models to Data

Lesson overview

Expand to review the lesson summary and core properties.

Expand

Section 1

📘 Linear Functions

New Concept

Linear functions describe relationships with a constant rate of change. We'll explore how to write their equations, like f(x)=mx+bf(x) = mx + b, interpret slope and intercepts, and graph them to model and solve real-world problems.

What’s next

Next, you'll work through interactive examples on finding slope and writing linear equations. Then, test your skills with practice cards and challenge problems.

Section 2

Linear Function

Property

A linear function is a function whose graph is a line. Linear functions can be written in the slope-intercept form of a line

f(x)=mx+bf(x) = mx + b

where bb is the initial or starting value of the function (when input, x=0x = 0), and mm is the constant rate of change, or slope of the function. The yy-intercept is at (0,b)(0, b).

Examples

  • A car travels at a constant speed of 50 miles per hour. Its distance DD from a starting point after tt hours can be modeled by D(t)=50tD(t) = 50t.
  • A phone plan costs 20 dollars a month plus 5 cents for each text message. The monthly cost CC for xx messages is C(x)=0.05x+20C(x) = 0.05x + 20.
  • For the function f(x)=3x+2f(x) = 3x + 2, the value when x=4x=4 is f(4)=3(4)+2=14f(4) = 3(4) + 2 = 14. The point (4,14)(4, 14) is on the line.

Explanation

Think of a linear function as a rule for anything that changes at a steady rate. The 'm' is the rate of change (how steep the line is), and 'b' is the starting point on the vertical axis before any change happens.

Section 3

Increasing, Decreasing, and Constant Functions

Property

The slope determines if the function is an increasing linear function, a decreasing linear function, or a constant function.

f(x)=mx+b is an increasing function if m>0.f(x) = mx + b \text{ is an increasing function if } m > 0.
f(x)=mx+b is a decreasing function if m<0.f(x) = mx + b \text{ is a decreasing function if } m < 0.
f(x)=mx+b is a constant function if m=0.f(x) = mx + b \text{ is a constant function if } m = 0.

Examples

  • The function f(x)=2x+5f(x) = 2x + 5 is increasing because the slope m=2m=2 is positive.
  • The function g(x)=−3x+1g(x) = -3x + 1 is decreasing because the slope m=−3m=-3 is negative.
  • The function h(x)=9h(x) = 9 is constant because the slope m=0m=0. Its graph is a horizontal line.

Explanation

The sign of the slope tells you the direction of the line. A positive slope means the line goes uphill from left to right. A negative slope means it goes downhill. A zero slope means the line is perfectly flat.

Section 4

Calculate Slope

Property

The slope, or rate of change, of a function mm can be calculated according to the following:

m=change in output (rise)change in input (run)=ΔyΔx=y2−y1x2−x1m = \frac{\text{change in output (rise)}}{\text{change in input (run)}} = \frac{\Delta y}{\Delta x} = \frac{y_2 - y_1}{x_2 - x_1}

where x1x_1 and x2x_2 are input values, y1y_1 and y2y_2 are output values. To interpret the slope, use the units of the output and input, such as 'dollars per hour' or 'feet per second'.

Examples

  • Given the points (2,1)(2, 1) and (6,9)(6, 9), the slope is m=9−16−2=84=2m = \frac{9-1}{6-2} = \frac{8}{4} = 2.
  • A town's population grew from 5,200 to 6,000 in 4 years. The rate of change is 6000−52004 years=8004=200\frac{6000 - 5200}{4 \text{ years}} = \frac{800}{4} = 200 people per year.
  • If a linear function has points (1,−1)(1, -1) and (4,5)(4, 5), its slope is m=5−(−1)4−1=63=2m = \frac{5 - (-1)}{4 - 1} = \frac{6}{3} = 2. The function is increasing.

Explanation

Slope measures the steepness of a line. It's the 'rise over run,' telling you how much the vertical value changes for every one unit of horizontal change. A bigger slope value means a steeper line.

Section 5

Writing an Equation for a Linear Function

Property

To write an equation for a linear function, you need to find the slope (m)(m) and the yy-intercept (b)(b).

  1. Identify two points on the line.
  2. Use the two points to calculate the slope: m=y2−y1x2−x1m = \frac{y_2 - y_1}{x_2 - x_1}.
  3. Use the slope and one point (x1,y1)(x_1, y_1) in the point-slope form, y−y1=m(x−x1)y - y_1 = m(x - x_1), and solve for yy. Alternatively, substitute mm and a point into y=mx+by = mx+b and solve for bb.

Examples

  • A line has a slope of 4 and passes through (2,5)(2, 5). Using y=mx+by = mx + b, we get 5=4(2)+b5 = 4(2) + b, so 5=8+b5 = 8 + b, and b=−3b = -3. The equation is y=4x−3y = 4x - 3.
  • A line passes through (1,2)(1, 2) and (4,11)(4, 11). The slope is m=11−24−1=93=3m = \frac{11-2}{4-1} = \frac{9}{3} = 3. Using the point (1,2)(1,2), we have y−2=3(x−1)y-2 = 3(x-1), which simplifies to y=3x−1y = 3x - 1.
  • A gym charges a 50 dollars sign-up fee and 25 dollars per month. The cost function is C(x)=25x+50C(x) = 25x + 50, where xx is the number of months.

Explanation

To define a specific line, you need to know its direction (slope) and one point it passes through. Once you have these two pieces of information, you can create a unique formula for that line.

Section 6

x-intercept

Property

The xx-intercept of the function is value of xx when f(x)=0f(x) = 0. It is the point where the graph crosses the xx-axis. It can be solved by the equation 0=mx+b0 = mx + b. Not all linear functions have xx-intercepts; a horizontal line like y=cy=c (for c≠0c \neq 0) does not cross the xx-axis.

Examples

  • To find the x-intercept of f(x)=2x−10f(x) = 2x - 10, set 0=2x−100 = 2x - 10. Solving gives 10=2x10 = 2x, so x=5x = 5. The x-intercept is (5,0)(5, 0).
  • The function f(x)=−13x+2f(x) = -\frac{1}{3}x + 2 has an x-intercept where 0=−13x+20 = -\frac{1}{3}x + 2. This gives 13x=2\frac{1}{3}x = 2, so x=6x=6. The intercept is (6,0)(6, 0).
  • The horizontal line f(x)=4f(x)=4 never crosses the x-axis, so it has no x-intercept.

Explanation

The x-intercept is where the line hits the horizontal axis. At this specific point, the output of the function is zero. To find it, you just set the function's formula equal to zero and solve for x.

Section 7

Horizontal and Vertical Lines

Property

Lines can be horizontal or vertical.
A horizontal line is a line defined by an equation in the form f(x)=bf(x) = b. It has a slope of 0.
A vertical line is a line defined by an equation in the form x=ax = a. Its slope is undefined. A vertical line is not a function.

Examples

  • The equation of a horizontal line passing through the point (5,−2)(5, -2) is y=−2y = -2.
  • The equation of a vertical line passing through the point (3,8)(3, 8) is x=3x = 3.
  • The function f(x)=10f(x) = 10 represents a horizontal line with a slope of 0. The line x=−1x = -1 is a vertical line with an undefined slope.

Explanation

A horizontal line is perfectly flat because its y-value is always the same, resulting in a zero slope. A vertical line is straight up and down because its x-value is constant. Its slope is undefined.

Section 8

Parallel and Perpendicular Lines

Property

Two lines are parallel lines if they do not intersect. The slopes of the lines are the same (m1=m2m_1 = m_2) and the yy-intercepts are different.
Two lines are perpendicular lines if they intersect to form a right angle. The product of their slopes is −1-1 (m1m2=−1m_1 m_2 = -1), meaning their slopes are negative reciprocals of each other (m2=−1m1m_2 = -\frac{1}{m_1}).

Examples

  • The lines f(x)=4x+1f(x) = 4x + 1 and g(x)=4x−5g(x) = 4x - 5 are parallel because both have a slope of 44.
  • The lines f(x)=2x+3f(x) = 2x + 3 and g(x)=−12x+8g(x) = -\frac{1}{2}x + 8 are perpendicular because their slopes, 22 and −12-\frac{1}{2}, multiply to −1-1.
  • The line parallel to y=−x+2y = -x + 2 that passes through (1,5)(1, 5) is y=−x+6y = -x + 6.

Explanation

Parallel lines have the same steepness, so they never meet. Perpendicular lines intersect at a perfect 90-degree angle. Their slopes have a special relationship: one is the flipped, negated version of the other, like 33 and −13-\frac{1}{3}.

Book overview

Jump across lessons in the current chapter without opening the full course modal.

Continue this chapter

Chapter 4: Linear Functions

  1. Lesson 1Current

    Lesson 4.1: Linear Functions

  2. Lesson 2

    Lesson 4.2 : Modeling with Linear Functions

  3. Lesson 3

    Lesson 4.3 : Fitting Linear Models to Data