Back to homeMathematics · 3rd Year · Change subject
Start for free
3rd Year · Mathematics
Functions · Functions

Linear and affine functions

Before you start, make sure you know: Linear equations (2nd Year, Junior Cycle)

A taxi in Cork charges €3.50 for getting in and €1.20 per kilometre. A gym charges a €20 joining fee and €15 a month. Your savings for the Transition Year trip grow by €5 every week. In all these cases the graph is a straight line, and with two numbers (how much it rises per unit and where it starts) you know everything.

Gradient and y-intercept

Move $m$ and $c$ (the slider labelled $n$). Notice that $m$ changes the steepness and $c$ raises or lowers the line without turning it:

  • $m > 0$: increasing. $\quad m < 0$: decreasing. $\quad m = 0$: horizontal line (constant function).

  • The greater $|m|$ is, the steeper the line.

  • Two lines with the same slope are parallel. Two lines are perpendicular if their slopes multiply to give $-1$, for example $2$ and $-\frac{1}{2}$.

  • A constant function such as $y = 4$ has slope $0$: it is a horizontal line, so it does have a slope, and that slope is $0$. A line with $m < 0$ cannot pass through the origin unless $c = 0$, so having a negative slope says nothing about the origin.

Practice★☆☆Not started
For each of the following functions, state the value of the gradient and the y-intercept, and indicate whether its graph is increasing or decreasing: a) $y = 4x - 3$ b)…

For each of the following functions, state the value of the gradient and the y-intercept, and indicate whether its graph is increasing or decreasing:

  1. a) $y = 4x - 3$
  1. b) $y = -2x + 7$
  1. c) $y = \frac{1}{3}x$
  1. d) $y = 5 - x$
Solve
Practice★☆☆Not started
Of the following equations, state which correspond to a linear function, which to an affine function, and which are neither linear nor affine. Justify your answer. a)…

Of the following equations, state which correspond to a linear function, which to an affine function, and which are neither linear nor affine. Justify your answer.

  1. a) $y = -3x$
  1. b) $y = x^2 + 1$
  1. c) $y = \frac{x}{2} - 4$
  1. d) $y = \frac{2}{x}$
  1. e) $y = 7$
Solve
Practice★☆☆Not started
The figure shows three lines, $a$, $b$ and $c$, as shown below. a) Match each line with its equation from these three: $y = 2x + 1$, $y = -x + 3$,…

The figure shows three lines, $a$, $b$ and $c$, as shown below.

X Y −4 −3 −2 −1 1 2 3 4 5 −4 −3 −1 2 4 5 6 (0, 3) (0, 1) (0, −2) a b c
  1. a) Match each line with its equation from these three: $y = 2x + 1$, $y = -x + 3$, $y = \frac{1}{2}x - 2$.
  1. b) Explain how you used the sign of the gradient and the y-intercept to decide.
Solve

Calculating the slope

If you know two points $A(x_1, y_1)$ and $B(x_2, y_2)$ on the line:

$$m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\text{rise}}{\text{run}}$$ Graph showing the calculation of the slope between two points A(1, 2) and B(5, 4) using the triangle with horizontal run 4 and vertical rise 2, giving m = 0.5. run 4rise 2 A(1, 2)B(5, 4) m = 2/4 = 0.5
Practice★☆☆Not started
Calculate the gradient of the line passing through each pair of points: a) $A(2, 5)$ and $B(6, 13)$ b) $P(-1, 4)$ and $Q(3, -8)$ c) $M(0, -2)$ and $N(5, -2)$

Calculate the gradient of the line passing through each pair of points:

  1. a) $A(2, 5)$ and $B(6, 13)$
  1. b) $P(-1, 4)$ and $Q(3, -8)$
  1. c) $M(0, -2)$ and $N(5, -2)$
Solve
Practice★★☆Not started
Find the equation of the line passing through the points $A(1, 2)$ and $B(3, 8)$ by following these steps: a) Calculate the gradient $m$. b) Substitute the coordinates…

Find the equation of the line passing through the points $A(1, 2)$ and $B(3, 8)$ by following these steps:

  1. a) Calculate the gradient $m$.
  1. b) Substitute the coordinates of one of the points into $y = mx + n$ to find $n$.
  1. c) Write the final equation and check that the other point also satisfies it.
Solve
Practice★★★Not started
a) Find the equation of the line passing through the points $A(-1, 7)$ and $B(2, -5)$. b) Check whether the point $C(5, -17)$ is collinear with $A$ and $B$. c) What…
  1. a) Find the equation of the line passing through the points $A(-1, 7)$ and $B(2, -5)$.
  1. b) Check whether the point $C(5, -17)$ is collinear with $A$ and $B$.
  1. c) What about the point $D(0, 5)$? Justify your answer without plotting.
Solve

Drawing a line

Two points are enough. Make a table with two simple values of $x$ (for example, 0 and 1, or 0 and another that gives whole numbers), calculate their $y$ values, plot the points and join them.

To check whether a point is on the line, substitute: $(1, 4)$ is on $y = -2x + 6$ because $-2 + 6 = 4$ ✓.

Practice★☆☆Not started
Check, by substituting the coordinates into the equation, whether the points $A(3, 4)$ and $B(-2, 11)$ lie on the line $y = -3x + 5$.

Check, by substituting the coordinates into the equation, whether the points $A(3, 4)$ and $B(-2, 11)$ lie on the line $y = -3x + 5$.

Solve
Practice★☆☆Not started
Copy and complete the table of values of the function $y = -2x + 6$ in your notebook for $x = -1$, $0$, $1$, $2$ and $3$, and plot the line on Cartesian axes. At what…

Copy and complete the table of values of the function $y = -2x + 6$ in your notebook for $x = -1$, $0$, $1$, $2$ and $3$, and plot the line on Cartesian axes. At what point does it cross the $X$ axis?

Solve
Practice★☆☆Not started
The graph shows an affine function, as shown in the figure. a) What is its y-intercept? b) By how much does $y$ increase when $x$ increases by one unit? What is the…

The graph shows an affine function, as shown in the figure.

X Y −2 −1 1 2 3 4 5 6 7 −2 −1 0 1 2 3 4 5 6 (0, 2) (3, 4)
  1. a) What is its y-intercept?
  1. b) By how much does $y$ increase when $x$ increases by one unit? What is the gradient?
  1. c) Write its equation.
Solve
Practice★☆☆Not started
The line in the figure represents a linear function, as shown below. a) Find two points with integer coordinates that the line passes through. b) Calculate its gradient…

The line in the figure represents a linear function, as shown below.

−2 −1 1 2 3 4 5 6 −2 −1 1 2 3 4 5 6 x y (0, 0) (4, 3)
  1. a) Find two points with integer coordinates that the line passes through.
  1. b) Calculate its gradient using those points.
  1. c) Write the equation of the function.
Solve

Lines in real life

In problems, $c$ is usually the fixed value (the joining fee, the starting charge) and $m$ the value per unit (euros per month, euros per km), also called the rate of change. A speed is a rate of change too: $24$ km/h means $m = 24$ in $y = 24x$ (distance against time).

Practice★☆☆Not started
A gym charges a registration fee of $\text{€}\ 20$ and $\text{€}\ 15$ per month. a) Write the equation giving the total cost $y$ in euros as a function of the number of…

A gym charges a registration fee of $\text{€}\ 20$ and $\text{€}\ 15$ per month.

  1. a) Write the equation giving the total cost $y$ in euros as a function of the number of months $x$.
  1. b) What is the y-intercept and what does it represent in this context?
  1. c) What about the gradient? What does it mean?
Solve
Practice★★☆Not started
A taxi charges a flat fee of $\text{€}\ 3.50$ and $\text{€}\ 1.20$ per kilometre travelled. a) Write the function giving the price $y$ for a journey of $x$ kilometres.…

A taxi charges a flat fee of $\text{€}\ 3.50$ and $\text{€}\ 1.20$ per kilometre travelled.

  1. a) Write the function giving the price $y$ for a journey of $x$ kilometres.
  1. b) How much will a journey of $12\ \text{km}$ cost?
  1. c) If a journey cost $\text{€}\ 16.70$, how many kilometres were travelled?
Solve
Practice★★☆Not started
Find the point of intersection of the lines $y = 2x + 1$ and $y = -x + 7$: a) Set up the equation that results from equating the two expressions and solve it. b)…

Find the point of intersection of the lines $y = 2x + 1$ and $y = -x + 7$:

  1. a) Set up the equation that results from equating the two expressions and solve it.
  1. b) Calculate the y-coordinate of the intersection point.
  1. c) Check the result by substituting into both equations.
Solve

Back to the start: The taxi follows the line $y = 1.20x + 3.50$ (€ according to km) and the gym follows $y = 15x + 20$ (€ according to months); in both cases, the fixed fee is the y-intercept ($c$) and the cost per unit is the slope ($m$).

Summary

See all the exercises in this section