How to derive equation of chord of circle given its midpoint? There is an equation which instantly gives you the chord having mid point $(x_1,y_1)$ in a circle discussed here:
For a circle,
$$ C(x,y)=x^2 +y^2 + 2gx + 2fy + c = 0$$
The chord having mid point $(a,b)$ is given as:
$$ ax+by+g(x+a)+f(y+b) + c =  C(a,b)$$
and I found a similar result here. However is there a general elegant way to prove this equation for all conics?
 A: Consider the equation of a general conic $$ax^2+2hxy+by^2+2gx+2fy+c=0$$
Now consider a point $(m,n)$ which is to be taken as the midpoint of the chord of the conic.
Now consider the equation $$\begin{aligned}amx+h(my+nx)+bny+g(x+m)+f(y+n)+c \\ =am^2+2hmn+bn^2+2gm+2fn+c\end{aligned}$$
Above is a straight line which passes through $(m,n)$ and of course it would cut the conic at maximum of $2$ points. Now if we solve this equation with the conic, and consider that as a quadratic in $x$, we will get the sum of roots as $2m$ and similarly if we consider it a quadratic in $y$, sum of roots would be $2n$.
Edit: Note that if the roots of the quadratic are real and distinct, then a chord exists, if the roots are equal, then the point $(m,n)$ lies on the conic and hence that line would be a tangent. If the roots are imaginary, no chord exists.
A: Actually there is a very easy way to do this which I realized when I saw the question again.
I take the equation of circle as $C(x,y) = x^2 + y^2 + 2gx + 2fy +c$
The center of circle is $(-g,-f)$, we can write the normal vector to the line segment made by chord as:
$$ n = (x_m + g , y_m +f)$$
That is the vector connecting center of circle to mid point of chord. We can also write a vector along the chord as:
$$ r = (x-x_m,y-y_m)$$
We have:
$$ n \cdot r = 0 \iff (x-x_m) (x_m+g) + (y_m +f)(y-y_m) =0 \iff  xx_m + xg -x_m^2 - x_m g + y_m y -y_m^2 +fy -fy_m=0$$
Rearranging terms in the double implication, we have:
$$ xx_m + yy_m +gx + fy = x_m^2 + y_m^2 + fy_m + gx_m$$
Adding $c$ on both sides, we can write:
$$ xx_m + y y_m + gx +fy + c = C(x_m,y_m)$$
Which is what was required.
