find the gradient of line ab