Michael M. answered 10/19/20
Struggling with STEM classes? I can help!
Okay, Jimmy; let's see if it's close...
The (shortest) distance between any two points is a straight line, but these point locations are given in rectangular coordinates; that means if we assume the two points are two vertices of a right-triangle (neither of which is equal to 90-degrees), then the difference in the coordinates will form the two sides of the right-triangle, and the distance between the two points (vertices) is the hypotenuse. Then the distance is given by the equation
d = sqrt{[x1 - x2]^2 + [y1 - y2]^2}
Here, d = the distance, and sqrt means "square root".
Let the first point be P1(x1,y1) = P1(-2,1), and
let the second point be P2(x2,y2) = P2(-2,9).
Plugging these coordinate values into our equation for distance, we get
d = sqrt{[-2 - (-2)]^2 + [1 - 9]^2} = sqrt{[0]^2 + [-8]^2} = sqrt{[64]} = 8
So, it appears that YOUR ANSWER IS CORRECT.
Note that if the two x-coordinates are the same (as in this case), or the two y-coordinates are the same, then
(1) the distance is NOT the hypotenuse of a right triangle, but is just a horizontal or vertical line, and
(2) the distance is the absolute value of the difference between the coordinates that are NOT the same (which are the end-points of the line).
For example, here the two x-coordinates are the same (x1 and x2 both equal -2); so the distance is the absolute value of the difference between the y-coordinates (which is |1 - 9| = |-8| = 8).