Example 1.17. Form the equation of the line $l$ passing through the point $A(2; -4)$ and being at a distance of 2 units from the origin.
Solution. Let the equation of the desired line have the form:

$$
y-y_{A}=k\left(x-x_{A}\right),
$$

or

$$
y+4=k(x-2)
$$

or

$$
k x-y-(4+2 k)=0 .
$$

To determine the slope $k$ of this line, we will use the fact that it is 2 units away from the origin. We will find this distance directly. The equation of the perpendicular dropped from the origin to the line $k x-y-(2+4 k)=0$ is $y=-\frac{1}{k} x$, or $x+k y=0$. Solving the equations of these two lines simultaneously

$$
\begin{aligned}
& k x-y-(2+4 k)=0 \\
& x+k y=0
\end{aligned}
$$

we obtain the coordinates of the point $C$ of their intersection:

$$
x_{C}=\frac{2 k(k+2)}{1+k^{2}} ; y_{C}=-\frac{2(k+2)}{1+k^{2}}
$$

From this, we find the distance from the origin to the line $l$ :

$$
\begin{gathered}
O C=\sqrt{x_{C}^{2}+y_{C}^{2}}=\frac{2}{1+k^{2}} \sqrt{k^{2}(k+2)^{2}+(k+2)^{2}}= \\
=\frac{2(k+2)}{1+k^{2}} \sqrt{k^{2}+1}=\frac{2(k+2)}{\sqrt{k^{2}+1}}
\end{gathered}
$$

On the other hand, by the condition $O C=2$. Thus, we obtain an equation for finding the slope $k$ of the desired line $l$ :

$$
\frac{2(k+2)}{\sqrt{k^{2}+1}}=2 \text { or } k+2=\sqrt{k^{2}+1},
$$

from which $k=-\frac{3}{4}$. Thus, substituting the found value $k=-\frac{3}{4}$ into the equation (*), we get the equation of the line:

$$
-\frac{3}{4} x-y-4-2 \cdot \frac{3}{4}=0
$$

or finally,

$$
3 x+4 y+10=0
$$

In conclusion, by seeking the equation of the line $l$ in the form $y-y_{A}=k\left(x-x_{A}\right)$, we assumed that this line is not parallel to the y-axis. However, it is clear that the line $x=2$ (parallel to the y-axis) also satisfies the condition of the problem, as it passes through the point $A(2 ;-4)$ and is 2 units away from the origin (Fig. 17).

![](https://cdn.mathpix.com/cropped/2024_05_22_e915d089cc29fd681be5g-053.jpg?height=537&width=713&top_left_y=490&top_left_x=348)

Fig. 17