Some point in a line $Ax+By+C=0$

437 Views Asked by At

Given a line in a 2D space, defined by equation $Ax+By+C=0$, is it possible to find a point of it without assume that A or B are different of 0 ?

That is, usually the method to find some point is "assume $A \ne 0$, if we fix $y=0$ the solution of the equation gives that point $(-C/A,0)$ is a point of the line, otherwise $B \ne 0$ and ...·

But it is possible any other method without split the problem in two ?

In other words, is it possible to find an expression for some point (any one) of the line that doesn't contains a division by A, B or C or by any other term that can be zero in some cases ?

The question could be expressed in another way: given a line $Ax+By+C=0$, give an expression of the same line in vector/parametric form that is valid for any value of A, B, C.

The direction vector is easy to find, (-B,A), the remainder target is to find the expression of some point.

4

There are 4 best solutions below

8
On BEST ANSWER

Consider the additional line $Bx-Ay=0$. The linear system \begin{cases} Ax+By=-C\\[4px] Bx-Ay=0 \end{cases} has solution $$ x=-\frac{AC}{A^2+B^2} \qquad y=-\frac{BC}{A^2+B^2} $$

Comments

The additional line is the perpendicular passing through the origin and we found the intersection of the two lines. If $C=0$, we of course get $(0,0)$, but no assumption on $C$ is actually necessary.

Since either $A$ or $B$ is nonzero, we have $A^2+B^2\ne0$, so the division doesn't pose problems.

A graphic example with $A=3$, $B=2$, $C=5$ that shows we're essentially finding the point having minimal distance from the origin.

enter image description here

If instead you consider as additional line $Bx-Ay=t$, for a variable $t$, the solution is $$ x=-\frac{AC-Bt}{A^2+B^2} \qquad y=-\frac{BC+At}{A^2+B^2} $$ and, as $t$ varies, you get all points on the given line.

6
On

For $C=0$, we can choose

  • $x=-B$
  • $y=A$

For $C\neq0$ and $A=1$, we can choose

  • $x=-C-By$

For $C\neq0$ and $B=1$, we can choose

  • $y=-C-Ax$

For $C\neq0$ and $C=kA$, we can choose

  • $x=-B-k$
  • $y=A$

For $C\neq0$ and $C=kB$, we can choose

  • $x=-B$
  • $y=A-k$

otherwise we need always division.

0
On

This is an interesting question. I think the answer is "no".

If $C = 0$ then the point $$ \left( \frac{AB^2}{A^2+B^2}, \frac{-A^2 B}{A^2+B^2} \right) $$ will do, but if $A=0$ and $C \ne 0$ then $y$ must be $-C/B$. You have to divide by $B$. Any general formula you propose to deal with the general problem will have a $B$ in the denominator.

Edit. As @gimusi points out, $(B, -A)$ works when $C=0$. My solution was clumsy.

Edit. My "think so" is wrong. Other answers are better. At least my use of $A^2 + B^2$ was on the right track. It's the determinant of the matrix in @egreg 's solution.

1
On

How about $$( -\frac{AC}{A^2 + B^2}, - \frac{BC}{A^2 + B^2})$$