Algebra · Grade 7 · The linear function and its graph

Lesson · Grade 7 · About 45 min

The linear function and its graph

A taxi fare, a phone bill, the height of a burning candle: in all of these one quantity changes evenly together with another. Such relationships are described by a linear function, and its graph is always a straight line. In this lesson you will learn to recognise a linear function from its formula, draw its graph from two points, and read from the formula how the line will go.

What you will learn

  1. Recognise a linear function y = kx + b, name its coefficients k and b, and tell a linear formula from a non-linear one.
  2. Draw the graph of a linear function from a table with two points, and check by substitution whether a point lies on the graph.
  3. Explain what k and b do: the sign and size of k, the horizontal line when k = 0, the point (0, b) on the y-axis, the line through the origin when b = 0. Find where the line crosses each axis.
  4. Decide from the coefficients whether two lines are parallel, intersecting or the same line, and find the intersection point by solving k₁x + b₁ = k₂x + b₂.

Teacher: Dana Yermekova

Where lines come from: one quantity depends on another

Imagine a taxi ride. You pay 500 tenge to get in, and then 100 tenge for every kilometre. How much is a 3 km ride? A 7 km ride?

Call the distance x and the fare y. Then the fare follows one rule for any distance:

y = 100x + 500

Put in x = 3: y = 100 · 3 + 500 = 800. Put in x = 7: y = 1200. Every distance gets exactly one fare. A rule like this is called a function. Here x is the independent variable, or argument, and y is the dependent variable, or value of the function.

Every kilometre adds the same amount. That is exactly why the relationship is called linear.

Take away the specific numbers and keep only the shape of the formula. A linear function is a function that can be given by the formula

y = kx + b,

where k and b are numbers and x is the independent variable. The number k is called the slope, and the number b the constant term. In the taxi formula k = 100 and b = 500.

The numbers k and b can be anything: negative, fractional, even zero. Here are some linear functions and their coefficients:

  • y = 3x − 2: k = 3, b = −2
  • y = −x + 5: k = −1, b = 5 (there is a minus in front of x, so k = −1)
  • y = 4 − 3x: k = −3, b = 4 (the order of the terms does not matter, k is always the number next to x)
  • y = 0.5x: k = 0.5, b = 0
  • y = 7: k = 0, b = 7

Quick check

The graph of a linear function: a line through two points

The graph of a function is the set of all points on the coordinate plane whose x-coordinate and y-coordinate are linked by the formula of the function. The graph of a linear function is always a straight line.

Exactly one straight line passes through two points. So to draw the graph it is enough to find two points and then draw a line through them with a ruler.

Let us draw the graph of y = 2x − 1.

  1. Choose two convenient values of x. Zero is always convenient: at x = 0 we get y = 2 · 0 − 1 = −1. Take x = 2 as well: y = 2 · 2 − 1 = 3.
  2. Mark the points (0, −1) and (2, 3) on the coordinate plane.
  3. Draw a straight line through them.

To check yourself, take a third point: at x = 1 we get y = 1. The point (1, 1) must lie on the same line.

The graph of y = 2x − 1: two points fix the line, a third point confirms there is no mistake.

How can you tell whether a point lies on the graph without drawing it? Substitute the coordinates of the point into the formula. If the equality is true, the point belongs to the graph.

  • The point (3, 5) and the function y = 2x − 1: 2 · 3 − 1 = 5. The equality is true, the point is on the graph.
  • The point (1, 2) and the same function: 2 · 1 − 1 = 1, not 2. The point is not on the graph.

The same idea finds a missing coordinate. If the point (5, y) lies on the graph of y = 2x − 1, then y = 2 · 5 − 1 = 9.

Quick check

What k and b do

The number b shows where the line crosses the y-axis. Put x = 0 into y = kx + b and you get y = b. So the point (0, b) always lies on the graph. If you change b, the line slides up or down without turning.

The number k shows how fast y grows. When x increases by 1, y changes by exactly k.

  • If k > 0, the line goes up from left to right: the function increases.
  • If k < 0, the line goes down: the function decreases.
  • If k = 0, the formula becomes y = b: a horizontal line, parallel to the x-axis.

The larger k is in absolute value, the steeper the line. If you change k, the line turns around the point (0, b).

The sign of k sets the direction of the line. The dot on the y-axis is (0, b).

Try it yourselfA line controlled by k and b

Move the k and b sliders and watch the line. Find where it crosses the axes and check how much y rises when x steps by 1.

Examples:
−6 −4 −2 2 4 6 −4 −2 2 4 0 x y
Formula
Crosses the y-axis at
Crosses the x-axis at
The line
When x grows by 1, y changes by

The dashed corner shows the step: 1 to the right, then k up or down. Change b: the line slides up and down. Change k: the line turns around the point (0, b).

The crossing point with the x-axis can also be found without a drawing. On the x-axis the y-coordinate is zero, so we solve kx + b = 0. For example, for y = 2x − 6: 2x − 6 = 0, x = 3. The line crosses the x-axis at (3, 0) and the y-axis at (0, −6).

A special case: if b = 0, the formula becomes y = kx. This relationship is called direct proportionality, and its graph passes through the origin (0, 0).

Quick check

Two lines on one plane

Take two linear functions: y = k1x + b1 and y = k2x + b2. How are their graphs placed? The coefficients decide everything.

  • k1 = k2 and b1 ≠ b2: the lines are parallel. They rise equally steeply but cross the y-axis at different points, so they have no common points. For example, y = 2x + 1 and y = 2x − 3.
  • k1 ≠ k2: the lines intersect in exactly one point, whatever b1 and b2 are.
  • k1 = k2 and b1 = b2: it is the same line, the graphs coincide.

Note that equal values of b do not make lines parallel. They only mean that both lines pass through the same point on the y-axis.

Try it yourselfParallel, intersecting or the same line?

Set the coefficients of two lines. Make the two k equal and see what happens. Then find the intersection point in the picture and compare it with the answer.

Line 1
Line 2
Examples:
−6 −4 −2 2 4 6 −4 −2 2 4 0 x y
Position
Check

The orange line is line 1, the blue line is line 2. The intersection point comes from the equation k₁x + b₁ = k₂x + b₂.

How do you find the intersection point without a drawing? At that point both lines have the same x and the same y. So the values of the functions are equal: set the formulas equal and solve the equation.

Example: y = 2x + 1 and y = −x + 4.

  1. 2x + 1 = −x + 4
  2. 3x = 3, so x = 1
  3. Put it into either formula: y = 2 · 1 + 1 = 3

The intersection point is (1, 3). Check with the second formula: −1 + 4 = 3. It matches.

Quick check

The key ideas in one place

  • A linear function is given by y = kx + b, where k and b are numbers. Its graph is a straight line.
  • Two points are enough to draw the graph. A point belongs to the graph if its coordinates turn the formula into a true equality.
  • b shows where the line crosses the y-axis: at (0, b). k shows the direction and steepness: for k > 0 the function increases, for k < 0 it decreases, for k = 0 the line is horizontal.
  • Equal k: the lines are parallel (or the same line if b is equal too). Different k: the lines intersect in one point, found by setting the formulas equal.

Quick check

Practice

Choose a topic and how many questions you want. Questions are picked at random each time, and every answer comes with an explanation.

Wrap-up

  • 0Sections read
  • 0Quick checks answered
  • 0Practice rounds completed

What to do next

Find one relationship around you that a linear function describes: an internet plan, a price per kilogram, travel time. Write its formula, state k and b, and draw its graph from two points in your notebook.

Next lesson we will solve systems of equations graphically, and being able to draw lines will help a lot. The practice on this page will help you prepare.

This page does not grade you. It is a space to learn and practise at your own pace.