
David Gwyn J. answered 10/20/20
Highly Experienced Tutor (Oxbridge graduate and former tech CEO)
I will use distance (in miles) on the x axis, and cost (in $) on the y axis.
The two data points given are (12, 11.75) and (27, 19.23)
A linear function has a general equation y = mx + b as stated, where m is the gradient, and b is the y intercept.
The gradient we can see is positive as it goes up and to the right (i.e. price increases as distance increases).
Gradient = distance up / distance across
We have two points, so we can use the differences, so
m = (19.23 - 11.75) / (27 - 12) = 7.48 / 15 = 0.498666.. or 0.50 to 2 decimal places
So now our equation is y = (7.48/15) x + b [use the actual value of m for accuracy in calculating b]
We can now plug in the values of either of the points to find b
11.75 = (7.48/15) (12) + b
=> 11.75 = 7.48 x 4/5 + b
=> b = 11.75 - 7.48 x 4/5
=> b = 5.766 or 5.77 to 2 decimal places
Hence the equation is y = 0.50x + 5.77 OR 2y = x + 11.54
(or perhaps you can approximate with y = 1/2 x + 6 OR 2y = x + 12)
b ($5.77) represents a fixed cost, a cost even if you go 0 miles.
m ($0.50) represents the incremental cost for each additional mile.
Hence, for, say, 50 miles, the equation predicts a cost of $30.77 ($31 with the approximation).
Always good to double check, so for 12 miles, what's my cost? $5.77 + $6 = $11.77