See also General Function Explorer where you can graph up to three functions
of your choice simultaneously using sliders for independent variables as above.
Linear functions are those where the independent variable x never has an exponent.
So for example they would not have a var such as 3x2 in them. The linear function on this page is the general way we
write the equation of a straight line. It is of the form
The m variable 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 variable 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.
y = mx + b
|| are the coordinates of any point on the line
||is the slope of the line
|| is the y-intercept (where the line crosses the y-axis)
Sometimes the linear equation is written y = ax+b,
using a for the slope instead of m. If you prefer it that way use
Linear explorer (ax+b).
Things to try
The simplest case. Y = constant. (y = b)
- Click 'zero' below each slider
Since m and b are both set to zero, 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.
This is the graph of the equation y = 0x+5.
This simplifies to y = 5 and so the function has the value 5 for all values of x.
It is therefore a straight horizontal line through 5 on the y axis.
Play with different values of b and observe the result.
- Now move the rightmost slider for b and let it settle on, say, 5.
Linear equation. (y = mx+b)
- Click 'reset'
- Click 'zero' under the right b slider.
The value of m 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 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 y-intercept is zero and the line passes through the origin (0,0).
Play with the a slider and observe the results, including negative values.
- Click on 'reset' and move the b slider to, say, 8.
The value of m 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.
- Move both sliders and observe the overall effects of these two coefficients (a and b) working together.
Try it yourself
- Press "reset", then "hide details"
- Adjust the sliders until you see a line that appeals to you
- Estimate the slope and y-intercept of the line and write down the equation for the line
- Click on "show details" and see how close you got
- The point where the line crosses the (vertical) y-axis is the y-intercept - b
- For each increase of one on the (horizontal) x-axis, how much does the line go up or down?
This is m, the slope of the line
- If the line goes down and to the right, the slope (m) will be negative.
See also Equation of a line (coordinate geometry).
While you are here..
... I have a small favor to ask. Over the years we have used advertising to support the site so it can remain free for everyone.
However, advertising revenue is falling and I have always hated the ads. So, would you go to Patreon and become a patron of the site?
When we reach the goal I will remove all advertising from the site.
It only takes a minute and any amount would be greatly appreciated.
Thank you for considering it! – John Page
Become a patron of the site at patreon.com/mathopenref
Other linear equation topics
Linear Function Explorer
(C) 2011 Copyright Math Open Reference. All rights reserved