Linear functions are those of the form, f(x) = ax + c, where, a and c are integers, and linear means a straight line.

Recall that, y = f(x)

Therefore, y = ax + c

Where, y is the dependent variable

a is the coefficient of x

x is the independent variable

c is the constant term.

Note also that, y = mx + c, equation of a line

Therefore, y = ax + c = mx + c

Where, m is the gradient of the line (ratio of the vertical rise over the horizontal run)

c is the point at which the line intercepts the y axis.

Having stated the form of linear functions, below is an example of how to draw linear functions.

Example

Draw the graph of the linear function, f(x) = 3x + 2, for the domain -2 ≤ x ≤ 2.

Method 1

Substitute the values given for x in the domain (-2, -1, 0, 1, 2), in the function, solving for the respective f(x)/ y values.

Given, f(x) = 3x + 2

Then, f(-2) = 3(-2) + 2 = -6 + 2 = -4

f(-1) = 3(-1) + 2 = -3 + 2 = -1

f(0) = 3(0) + 2 = 0 + 2 = 2

f(1) = 3(1) + 2 = 3 + 2 = 5

f(2) = 3(2) + 2 = 6 + 2 = 8

Therefore, the set of (x, y) values to be plotted and connected in forming the linear function are:

{(-2, -4), (-1, -1), (0, 2), (1, 5), (2, 8)}

Method 2

This method involves finding the x and y intercepts, that is the point at which the graph crosses the x and y axis. A linear function written in its correct form, that is, f(x) = mx + c, states the y intercept, c [in (x, y) form is (0, c)]. So, to find the x intercept, substitute 0 for y in the function and solve for x.

Given, f(x) = 3x + 2

Y intercept (point of intersection on the y axis) is, (0, 2)

X intercept (point of intersection on the x axis) is, y = f(x)

y = 3x + 2

0 = 3x +2 (substituting 0 for y)

3x = -2

x = -2/3 or -0.66

That is, x intercept is (-0.66, 0)

Using the x and y intercepts, (-0.66, 0) and (0, 2), the graph is plotted below.