MathematicsGrade 7–9

Linear function

Change the slope and the y-intercept of a line and read off the slope triangle and the zero.

Loading simulation …

What is it about?

A linear function has the equation

f(x)=m⋅x+cf(x) = m \cdot x + c

Its graph is always a straight line.

  • The y-intercept cc tells you where the line crosses the y-axis: at the point (0,c)(0, c).
  • The slope mm tells you how steep the line is: go 1 to the right and the line goes mm up – or down if mm is negative. This is what the slope triangle shows.

If you know two points P1(x1,y1)P_1(x_1, y_1) and P2(x2,y2)P_2(x_2, y_2) on the line, the slope is

m=y2−y1x2−x1=ΔyΔxm = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\Delta y}{\Delta x}

The zero (x-intercept) is where the line crosses the x-axis. Set f(x)=0f(x) = 0: x0=−cmx_0 = -\frac{c}{m} (for m≠0m \neq 0). For m=0m = 0 the line is horizontal: if c≠0c \neq 0 there is no zero, if c=0c = 0 the line lies on the x-axis.

A vertical line is not the graph of a function, because one xx-value belongs to infinitely many yy-values. That is why you cannot set one up in the simulation.

Explore

  1. Change only cc. What happens to the line – and what stays the same? Load example
  2. Change only mm and watch the slope triangle. What happens for m=0m = 0? Load example
  3. Drag the highlighted points directly in the coordinate system: the point on the y-axis and the tip of the slope triangle.
  4. Turn on the second line gg. When do two lines not intersect? Parallel lines

Exercises

Exercise 1: Read off the equation

Load exercise Read the slope and the y-intercept from the graph and write down the equation. The results on the right are hidden – reveal them only to check.

Show solution

The line crosses the y-axis at 2, so c=2c = 2. Going 1 to the right, it goes 1.5 down, so m=−1.5m = -1.5:

f(x)=−1.5x+2f(x) = -1.5x + 2

Exercise 2: Line through two points

Find the equation of the line through A(−2,−1)A(-2, -1) and B(2,5)B(2, 5). Then set it up in the simulation and check that it passes through both points.

Show solution

m=5−(−1)2−(−2)=64=1.5m = \frac{5 - (-1)}{2 - (-2)} = \frac{6}{4} = 1.5

Substituting AA: −1=1.5⋅(−2)+c-1 = 1.5 \cdot (-2) + c, so c=2c = 2 and f(x)=1.5x+2f(x) = 1.5x + 2. Show in simulation

Exercise 3: Find the zero

Calculate the zero of f(x)=0.5x−2f(x) = 0.5x - 2 and check it in the simulation.

Show solution

0=0.5x−2  ⇒  x=40 = 0.5x - 2 \;\Rightarrow\; x = 4. The line crosses the x-axis at N(4,0)N(4, 0). Show in simulation

Exercise 4: Perpendicular lines

Set up f(x)=2x−1f(x) = 2x - 1 and turn on the second line. Find a line gg that crosses ff at a right angle. What do you notice about the two slopes?

Show solution

For example g(x)=−0.5x+2g(x) = -0.5x + 2. For perpendicular lines m⋅m2=−1m \cdot m_2 = -1, so m2=−12m_2 = -\frac{1}{2}. The y-intercept of gg can be anything. Show in simulation

Exercise 5: Phone tariff (modelling)

A phone tariff costs a basic fee of €5 per month plus €2 per gigabyte used.

  1. Write down the equation for the monthly cost (xx: gigabytes, f(x)f(x): cost in €).
  2. How much does a month with 3 GB cost?
  3. A second tariff costs €8 basic fee plus €1 per GB. From how many GB on is it cheaper?
Show solution
  1. f(x)=2x+5f(x) = 2x + 5
  2. f(3)=2⋅3+5=11f(3) = 2 \cdot 3 + 5 = 11, so €11.
  3. g(x)=x+8g(x) = x + 8. Intersection: 2x+5=x+8⇒x=32x + 5 = x + 8 \Rightarrow x = 3. At 3 GB both tariffs cost €11. For more than 3 GB the second tariff is cheaper. Show both tariffs

Ideas for the classroom

  • Use: introduction in grade 7/8 or revision before quadratic functions. On the projector, let the class predict what will happen before moving a slider.
  • Notation: The simulation writes f(x)=mx+cf(x) = mx + c (the German version writes f(x)=mx+tf(x) = mx + t). If your textbook uses bb for the y-intercept, point this out briefly.
  • Common stumbling blocks:
    • Slope and y-intercept are confused.
    • For a negative slope, the slope triangle is drawn “upwards”.
    • The constant function (m=0m = 0) is not recognised as a linear function.
    • A graph that looks flatter is taken to have a smaller slope, although only the axes are scaled differently. The simulation uses equal units on both axes.
  • Exercise mode: Share → Hide results creates a link or QR code with the equation, zero and intersection hidden – ideal for reading-off exercises. Lock controls prevents accidental changes.
  • Differentiation: Faster learners use the second line to explore parallel and perpendicular lines or solve systems of linear equations graphically.