βš™οΈ Function Kingdom Β· Functions

Linear Functions

Work with straight lines: slope as a rate of change, intercepts, and the equation y = mx + b.

In short

  • Slope is rise over run β€” the constant rate of change of a linear function.
  • In y = mx + b, m is the slope and b is the y-intercept (the value when x = 0).
  • For the y-intercept set x = 0; for the x-intercept set y = 0.
  • A fixed start plus a constant change per step is always a linear model, with a negative slope when something decreases.

Constant rate of change

A function is linear when it changes by the same amount for every step of the input. Its graph is a straight line, and the size of that constant step is the slope.

m = (change in y) / (change in x) = rise / run

Slope is a rate: metres per second, gold per quest, degrees per hour. A slope of 3 means "up 3 for every 1 across"; a slope of -2 means "down 2 for every 1 across". A horizontal line has slope 0, and a vertical line has no slope at all, because its run is 0 and division by zero is not allowed.

For two points (x1, y1) and (x2, y2):

m = (y2 - y1) / (x2 - x1)

Start with the same point on the top and the bottom. Mixing the order flips the sign.

Slope-intercept form

The most useful way to write a line is

y = m x + b

where m is the slope and b is the y-intercept β€” the height at which the line crosses the y-axis, that is the value of y when x = 0.

Reading a line from a graph is then a two-step routine: find where it crosses the y-axis (that is b), then count the rise over a convenient run (that is m).

The x-intercept is where the line crosses the x-axis, and every point there has y = 0. So set y = 0 and solve:

y = 3x - 12 -> 3x - 12 = 0 -> x = 4

Do not confuse the two intercepts. For the y-intercept set x = 0; for the x-intercept set y = 0.

Building the equation of a line

From a point and a slope. You already know m, so only b is missing. Substitute the point and solve:

slope 4 through (2, 11): 11 = 4(2) + b, so b = 3, and y = 4x + 3

From two points. Find the slope first, then use either point to find b:

(1, 5) and (3, 11): m = (11 - 5)/(3 - 1) = 3 5 = 3(1) + b, so b = 2, and y = 3x + 2

Always check your equation against the point that you did not use β€” here 3(3) + 2 = 11. Correct.

An equivalent shortcut is point-slope form, y - y1 = m(x - x1), which rearranges to the same line.

Linear models in the world

Whenever there is a fixed starting amount plus a constant change per step, the situation is linear.

"Join the guild for 30 gold, then pay 5 gold per quest" becomes

y = 5x + 30

Here b = 30 is the joining fee (the cost before any quest) and m = 5 is the cost per quest.

When something is being used up, the rate is negative: "start with 80 arrows, use 6 per hour" gives y = -6x + 80.

The four representations from function notation all reappear here. The table shows a constant step; the graph shows a straight line; the words describe a start and a rate; the equation lets you compute. Being able to switch between them is what makes linear functions so useful.

Worked examples

Example 1

Find the slope of the line through (-2, 7) and (4, -5).

  1. Use m = (y2 - y1) / (x2 - x1), keeping the same point first on top and bottom.
  2. Change in y: -5 - 7 = -12.
  3. Change in x: 4 - (-2) = 6.
  4. m = -12 / 6 = -2. The negative sign means the line falls as x increases.

Example 2

Write the equation of the line with slope -3 passing through (5, 4).

  1. Start from y = mx + b with m = -3, so y = -3x + b.
  2. Substitute the point: 4 = -3(5) + b.
  3. 4 = -15 + b, so b = 19.
  4. The line is y = -3x + 19. Check: -3(5) + 19 = 4. Correct.

Practice problems, with solutions

Three problems of increasing difficulty, each with the full working. In the game these are generated fresh every time; these three are fixed so this page always shows the same ones.

Problem 1

Difficulty 1 of 5

A line passes through (2, 7) and (5, 9). What is its slope? Give the answer as a fraction in lowest terms (a whole number if it simplifies to one).

Answer: 2/3

  1. m = (y2 - y1) / (x2 - x1)
  2. m = (9 - (7)) / (5 - (2))
  3. m = 2 / 3
  4. m = 2/3

Problem 2

Difficulty 3 of 5

A straight line crosses the y-axis at (0, 8) and also passes through (2, 16). Write its equation as an expression in x (for example 2x - 5).

Answer: 4x + 8

  1. y-intercept: the line meets the y-axis at (0, 8), so b = 8.
  2. Slope: rise / run = 8 / 2 = 4.
  3. y = 4x + 8

Problem 3

Difficulty 4 of 5

A line has slope -6 and passes through the point (0, -12). Write its equation as an expression in x (for example 2x - 5).

Answer: -6x - 12

  1. y = mx + b with m = -6.
  2. Substitute (0, -12): -12 = -6(0) + b
  3. -12 = 0 + b, so b = -12
  4. y = -6x - 12

Common mistakes

  • Computing run over rise instead of rise over run.
  • Subtracting the coordinates in opposite orders on the top and bottom, which flips the sign.
  • Swapping m and b when reading or writing y = mx + b.
  • Forgetting the starting amount, so the model becomes rate x time with no intercept.

What you should be able to do

  • Compute the slope between two points.
  • Write the equation of a line from a slope and a point.
  • Interpret slope and intercept in a real-world context.
  • Identify parallel and perpendicular slopes.

Where this fits in the curriculum

Common Core

  • 8.EE.B.6

    Grade 8 β€” Use similar triangles to explain slope, and derive y = mx + b for a line through the origin and elsewhere.

  • 8.F.B.4

    Grade 8 β€” Construct a function to model a linear relationship and interpret its rate of change and initial value.

  • HSG-GPE.B.5

    High school β€” Prove and use the slope criteria for parallel and perpendicular lines.

Ontario

  • MTH1W.C3.2

    Grade 9 de-streamed β€” Represent linear relations using tables of values, graphs and equations, and identify the rate of change and the initial value.

  • MTH1W.C4.4

    Grade 9 de-streamed β€” Determine the equations of lines by connecting rates of change with slopes and initial values with y-intercepts.

SAT

Learn these first

This leads on to