Suppose it cost $2 a mile for a taxi ride. The equation y = 2x can be used to model this situation, where x represents the number of miles and y represents the total cost of the ride.