The equation of a circle:
[tex](x-h)^2+(y-k)^2=r^2[/tex]
(h,k) - the coordinates of the centre
r - the radius
The midpoint of the diameter is the centre of a circle.
The coordinates of the midpoint:
[tex](\frac{x_1+x_2}{2}, \frac{y_1+y_2}{2})[/tex]
(x₁,y₁), (x₂,y₂) - the coordinates of endpoints
[tex]P(-1,1) \\
x_1=-1 \\ y_1=1 \\ \\ Q(5,9) \\ x_2=5 \\ y_2=9 \\ \\
\frac{x_1+x_2}{2}=\frac{-1+5}{2}=\frac{4}{2}=2 \\ \frac{y_1+y_2}{2}=\frac{1+9}{2}=\frac{10}{2}=5[/tex]
The centre of the circle is (2,5).
The radius is the distance between an endpoint of the diameter and the centre.
The formula for distance:
[tex]d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}[/tex]
[tex](-1,1) \\ x_1=-1 \\ y_1=1 \\ \\ (2,5) \\ x_2=2 \\ y_2=5 \\ \\ d=\sqrt{(2-(-1))^2+(5-1)^2}=\sqrt{3^2+4^2}=\sqrt{9+16}=\sqrt{25}=5[/tex]
The radius is 5.
[tex](x-2)^2+(y-5)^2=5^2 \\
\boxed{(x-2)^2+(y-5)^2=25}[/tex]