General equation of line that goes through center of a circle and a point Given an arbitrary point $P$, at $(x_{1}, y_{1})$, is there a general expression of a line that goes through a circle of radius $r$ centered at the origin? I know there are infinite number of such lines/diameters when $P = 0$.
If such an expression exists, is it possible to algebraically, or otherwise, find the general equation for all intersection points between the line and the circle?
 A: An arbitrary line is given by the equation
$$
a \, x + b\, y = c \quad (*)
$$
The circle through the origin with radius $r$ has the equation
$$
x^2 + y^2 = r^2
$$
The requirements on the line is to go through the origin $(0,0)$ which happens to be the center of the circle and some point $P=(x_1, y_1)$.
This line can be written in parametric form as
$$
x = (1-t)\, 0 + t\, x_1 = t \, x_1 \\
y = (1-t)\, 0 + t\, y_1 = t \, y_1
$$
for $t \in \mathbb{R}$.
Using $(*)$ we insert the origin and get
$$
a\, 0 + b\, 0 = c \Rightarrow c = 0
$$
Then we insert $P$ and get
$$
a\, x_1 + b\, y_1 = 0
$$
If $P$ is different from the origin, this gives another condition. E.g. if $x_1 \ne 0$ we have
$$
a = - \frac{y_1}{x_1} b
$$
and
$$
-\frac{y_1}{x_1} b x + b y = 0
$$
which means $b = 0$ or $y = (y_1/x_1) x$.
A: A line is often written in standard form as
$$y=mx+b$$
where $m$ is the slope and $b$ is some constant. We can solve for $m$ easily:
$$m=\frac{x_{\text{point}}-x_{\text{center of the circle}}}{y_{\text{point}}-y_{\text{center of the circle}}}$$
Plugging this back in, we have
$$y=\frac{x_{\text{point}}-x_{\text{center of the circle}}}{y_{\text{point}}-y_{\text{center of the circle}}}x+b$$
Then, we can once again use the coordinates of $P$ to find $b$:
$$y_{\text{center of the circle}}-\frac{x_{\text{point}}-x_{\text{center of the circle}}}{y_{\text{point}}-y_{\text{center of the circle}}}x_{\text{center of the circle}}=b$$
Therefore, we have the equation
$$y=\frac{x_{\text{point}}-x_{\text{center of the circle}}}{y_{\text{point}}-y_{\text{center of the circle}}}x+\left(y_{\text{center of the circle}}-\frac{x_{\text{point}}-x_{\text{center of the circle}}}{y_{\text{point}}-y_{\text{center of the circle}}}x_{\text{center of the circle}}\right)$$
