Alex P. answered 08/17/21
Supportive, expert tutor for Physics, Python, and Data Science
To find the midpoint, use the midpoint formula: add each of the coordinates together and divide by 2:
MP = ( ((x1+x2)/2), ((y1+y2)/2) )
so the x coordinate of the midpoint is: (0 + (-4)) / 2 = -4/2 = -2
and the y coordinate of the midpoint is: (2 + (-1)) / 2 = 1/2
Therefore the midpoint is (-2, 1/2)
Gradient is just another word for slope. Slope is defined as change in y over change in x ("rise" over "run")
mathematically, this is (y2-y1) / (x2-x1)
plugging in our numbers: slope = (-1-2) / (-4-0) = -3/-4 = 3/4
so the slope is 3/4
To find the equation of the line, we start with y = mx + b, where m is the slope and b is the y-intercept.
We just found the slope in the previous part, so m=3/4
the y intercept is the y-coordinate when x is 0. They actually gave that to us for free in the problem statement when they said the point (0, 2) is on the line, so the y-intercept is b=2. Thus, the equation of this line is y = (3/4)x + 2
If the hadn't told us that, we could have plugged in any of the points on the line (-4, -1) or (-2, 1/2) and solved for the intercept. Let's do that with the point (-4, -1):
y = mx + b
we just found that m=3/4
the point (-4, -1) tells us that y=-1 and x=-4, so:
-1 = (3/4) * (-4) + b
-1 = -3 + b
2 = b (which is what we got above)