(04.03) The graph shows the amount of money paid when purchasing bags of peanuts at the zoo:Write an equation to represent the relationship between the total cost (y) and the number of bags of peanuts (x).

Use the following general equation of a line which passes through the point (xo,yo):
y - yo = m(x - xo)
where m is the slope of the line and can be calculated by using the following formula:
[tex]m=\frac{y_2-y_1}{x_2-x_1}[/tex]where (x1,y1) and (x2,y2) are any two points on the line.
Based on the given graph, you can use (x1,y1) = (0,0) and (x2,y2) = (1,4) to calculate the slope m:
[tex]m=\frac{4-0}{1-0}=\frac{4}{1}=4[/tex]Now, replace (xo,yo) = (0,0) and m=4 into the general equation and solve for y:
y - 0 = 4(x - 0)
y = 4x
Hence, the cost y and the number of bags x can be related with the equation y = 4x