Linear Function Explorer
A linear function is of the form y = ax + b

In the applet below, move the sliders on the right to change the values of coefficients a and b and note the effects it has on the graph. See also Quadratic Function Explorer and Cubic Function Explorer
(If no image appears below, see support page.)
The origin point can be dragged to reposition the graph axes

Linear functions

Linear functions are those that have no exponents in them such as 2x2. Wherever the variables appear, they are not raised to a power. The linear function on this page is the general way we write the equation of a straight line. It is of the form
y = ax + b Where:
x,y are the coordinates of any point on the line
a is the slope of the line
b is the intercept (where the line crosses the y-axis)
The a term is the slope of the line and controls its 'steepness'. A positive value has the slope going up to the right. A negative slope goes down to the right. The b term is the y intercept - the point where the line crosses the y axis. Adjust the sliders above to vary the values of a and b, and note the effects they have on the graph.

Things to try

The simplest case. Y=constant. (y=b)

  1. Click 'zero all'

a and b are both set to zero, so this is the graph of the equation y = 0x+0. This simplifies to y=0 and is of course zero for all values of x. Its graph is therefore a horizontal straight line through the origin.

  1. Now move the rightmost slider for b and let it settle on, say, 9.
This is the graph of the equation y = 0x+9. This simplifies to y=9 and so the function has the value 9 for all values of x. It is therefore a straight horizontal line through 9 on the y axis. Play with different values of b and observe the result.

Linear equation. (y=ax+b)

  1. Click 'reset'
  2. Click 'zero' under the right b slider.

The value of a is 0.5 and b is zero, so this is the graph of the equation y = 0.5x+0 which simplifies to y=0.5x. This is a simple linear equation and so is a straight line whose slope is one half (0.5). That is, y increases by 0.5 every time x increases by one. Since the slope is positive, the line slopes up and to the right. Since b is zero, the intercept is zero and the line passes through the origin (0,0). Play with the a slider and observe the results, including negative values.

  1. Move the b slider to, say, 8.

The value of a is 0.5 and b is 8, so this is the graph of y = 0.5x+8. The effect of changing b from zero to 8 is that the graph has moved upwards and now passes through 8 on the y axis.

  1. Move both sliders and observe the overall effects of these two coefficients together.

Try it yourself

  1. Press "reset", then "hide details"
  2. Press "random line" until you see a line that appeals to you
  3. Estimate the slope and intercept of the line and write down the equation for the line
  4. Click on "show details" and see how close you got

Using the "run" command

  1. Click 'zero all'
  2. Click on "run"
The value of a is now varying continuously from a positive to a negative value and back. While it is running, move the slider for b and observe the effects.

Coordinate Geometry

In coordinate geometry, the equation for a straight line is usually written y=mx+b. That is, the letter m is used to indicate the slope. See Equation of a line (coordinate geometry).

Other graphing tools