Suppose salami and sausage cost €6€6 and €3€3 per kilogram, and we wish to buy €12€12 worth. How much of each can we purchase? Letting ''x'' and ''y'' be the weights of salami and sausage, the total cost is: <math>6x + 3y = 12</math>. Solving for ''y'' gives the point-slope form <math>y = -2x + 4</math>, as above. That is, if we first choose the amount of salami ''x'', the amount of sausage can be computed as a function <math>y = f(x) = -2x + 4</math>. Since salami costs twice as much as sausage, adding one kilo of salami decreases the sausage by 2 kilos: <math>f(x{+}1) = f(x) - 2</math>, and the slope is −2. The ''y''-intercept point <math>(x,y)=(0,4)</math> corresponds to buying only 4kg of sausage; while the ''x''-intercept point <math>(x,y)=(2,0)</math> corresponds to buying only 2kg of salami.
Note that the graph includes points with negative values of ''x'' or ''y'', which have no meaning in terms of the original variables (unless we imagine selling meat to the butcher). Thus we should restrict our function <math>f(x)</math> to the ___domain <math>0\le x\le 2</math>.