1. Find the midpoint M of AB:
\(M = \left( \frac{-1 + 7}{2}, \frac{-5 + 1}{2} \right) = (3, -2)\)
2. Calculate the gradient of AB:
\(\text{Gradient of } AB = \frac{1 - (-5)}{7 - (-1)} = \frac{6}{8} = \frac{3}{4}\)
3. The gradient of the perpendicular bisector is the negative reciprocal:
\(\text{Perpendicular gradient} = -\frac{4}{3}\)
4. Equation of the perpendicular bisector through M:
\(y + 2 = -\frac{4}{3}(x - 3)\)
5. Find where it meets the x-axis (y = 0):
\(0 + 2 = -\frac{4}{3}(x - 3)\)
\(2 = -\frac{4}{3}x + 4\)
\(\frac{4}{3}x = 2\)
\(x = \frac{3}{2}\)
\(C = \left( \frac{3}{2}, 0 \right)\)
6. Find where it meets the y-axis (x = 0):
\(y + 2 = -\frac{4}{3}(0 - 3)\)
\(y + 2 = 4\)
\(y = 2\)
\(D = (0, 2)\)
7. Calculate the length of CD using the distance formula:
\(CD = \sqrt{\left( \frac{3}{2} - 0 \right)^2 + (0 - 2)^2}\)
\(CD = \sqrt{\left( \frac{3}{2} \right)^2 + (-2)^2}\)
\(CD = \sqrt{\frac{9}{4} + 4}\)
\(CD = \sqrt{\frac{9}{4} + \frac{16}{4}}\)
\(CD = \sqrt{\frac{25}{4}}\)
\(CD = \frac{5}{2} = 2.5\)