In a linear relationship there is typically one dependent and one independent variable. The dependent variable is a function of the independent variable.
The general equation for a linear relationship describes the relationship between the dependent and independent variable. This equation has the form:
y = m*x + c
Here "y" is the dependent variable and "x" the independent variable. "m" is the gradient and specifies the rate of change of "y" with "x." That is, for every unit change in "x" there will be a corresponding "m" unit changes in "y." The intercept "c" describes the value of "y" when "x" is 0 (the initial value of the dependent variable).
If the relationship between the dependent and independent variables was plotted on a graph, it would appear as a straight line. It is common practice to plot the dependent variable on the vertical axis and the independent variable on the horizontal axis. The line describing the linear relationship would intersect the dependent variable axis a distance "c" from the origin. The steepness or gradient of the line would be determined by "m." For every step along the independent variable axis, one would take "m" equivalent steps along the dependent variable axis.
Consider a box that can hold 10 apples. A farmer wants to know how many apples he could pack into a certain number of boxes.
In this case the number of boxes is specified and is the independent variable (y). The number of apples depends on the number of boxes and is therefore the dependent variable (x). For every box there will be 10 apples, so the gradient (m) is 10. Finally, if there are no boxes, there will be no apples, so the intercept "c" is 0. Written as an equation:
Number of apples = 10*number of boxes
or
y = 10*x + 0 (to be consistent with the general equation presented in Section 2).