ax+by+c=0
If b is not 0, the slope of that line is -a/b .Take any two lines
a x + b y + c = 0
d x + e y + f = 0
The lines are parallel
<=>
A direction vector of the first line is a multiple of
the direction vector of the second line.
<=>
(b, -a) is a multiple of (e, -d)
<=>
(a, b) is a multiple of (d, e)
<=>
a e = b d
<=>
| a b |
| d e | = 0
The lines a x + b y + c = 0 and d x + e y + f = 0 are parallel
<=>
a e = b d
<=>
| a b |
| d e | = 0
|
Three points P(x1,y1) Q(x2,y2) and R(x3,y3) are collinear
<=>
There is a line a x + b y + c = 0 that contains the points P, Q and R.
<=>
There is a line a x + b y + c = 0 such that
a x1 + b y1 + c = 0
a x2 + b y2 + c = 0
a x3 + b y3 + c = 0
<=>
There is an a, b and c, not all zero, such that
a x1 + b y1 + c = 0
a x2 + b y2 + c = 0
a x3 + b y3 + c = 0
<=>
The following homogeneous system with unknowns a, b and c
has a solution different from (0,0,0).
a x1 + b y1 + c = 0
a x2 + b y2 + c = 0
a x3 + b y3 + c = 0
<=>
|x1 y1 1|
|x2 y2 1| = 0
|x3 y3 1|
Conclusion :
Three points P(x1,y1) Q(x2,y2) and R(x3,y3) are collinear if and only if
|x1 y1 1|
|x2 y2 1| = 0
|x3 y3 1|
|
|x y 1|
|x1 y1 1| = 0
|x2 y2 1|
So, this is the equation of the line PQ.
The line PQ with P(x1,y1) and Q(x2,y2) is
|x y 1|
|x1 y1 1| = 0
|x2 y2 1|
|
Three lines
a x + b y + c = 0
a' x + b' y + c' = 0
a" x + b" y + c" = 0
are concurrent if and only if
| a b c |
| a' b' c'| = 0
| a" b" c"|
|
a x + b y = 1 (1) a x + y = b (2) x + b y = a (3)are the equations of three lines. The parameters a and b are real and different. Examine the relative position of the three lines for all values of a and b. |
(1) and (2) are parallel if and only if ( a = 0 of b = 1 )
(1) and (3) are parallel if and only if ( b = 0 of a = 1 )
(2) and (3) are parallel if and only if ( a b = 1 )
We now treat these cases separately
The equations of the lines are
b y = 1 (1)
y = b (2)
x + b y = 0 (3)
The lines (1) and (2) are parallel and the third one intersects (1) and (2).
The equations of the lines are
a x = 1 (1)
a x + y = 0 (2)
x = a (3)
The lines (1) and (3) are parallel and the second one intersects (1) and (3).
The equations of the lines are
x + b y = 1 (1)
x + y = b (2)
x + b y = 1 (3)
The lines (1) and (3) coincides and the second one intersects (1) and (3).
The equations of the lines are
a x + y = 1 (1)
a x + y = 1 (2)
x + y = a (3)
The lines (1) and (2) coincides and the third one intersects (1) and (2).
The equations of the lines are
a x + (1/a) y = 1 (1)
a x + y = (1/a) (2)
x + (1/a) y = a (3)
The lines (2) and (3) are parallel but they don't coincide.
a and b are different from 1 and from 0 and a.b is not 1.
The three lines are concurrent if and only if
| a b 1 | | a 1 b | = 0 | 1 b a | <=> (a-1)(b-1)(a+b+1) = 0Since a and b are not equal to 1, we have :
The three lines form a triangle.
___________________________
|
\| (x2 - x3)2 + (y2 - y3)2
From above, the equation of the line QR is
|x y 1|
|x2 y2 1| = 0
|x3 y3 1|
If we calculate this determinant emanating from the first row, we find
x(y2 - y3) - y(x2-x3) + x2 y3 - x3 y2 = 0
To calculate the distance from P to the line QR, we write first the
normal equation of a line QR
x(y2 - y3) - y(x2 - x3) + x2 y3 - x3 y2
--------------------------------------- = 0
_________________________
|
\| (x2 - x3)2 + (y2 - y3)2
<=>
|x y 1|
|x2 y2 1|
|x3 y3 1|
--------------------------------------- = 0
___________________________
|
\| (x2 - x3)2 + (y2 - y3)2
Now, to find the distance, we have to take the absolute value
of the left side and we must replace x and y by the coordinates of P.
The distance from P to QR is
|x1 y1 1|
|x2 y2 1|
|x3 y3 1|
| -------------------------------- |
_________________________
|
\| (x2 - x3)2 + (y2 - y3)2
The area of the triangle P(x1,y1) Q(x2,y2) and R(x3,y3) is
|x1 y1 1|
_________________________ |x2 y2 1|
1 | |x3 y3 1|
- . \| (x2 - x3)2 + (y2 - y3)2 | -------------------------------- |
2 _________________________
|
\| (x2 - x3)2 + (y2 - y3)2
<=>
1 |x1 y1 1|
-.| |x2 y2 1| |
2 |x3 y3 1|
This is a very simple formula to calculate the area of a triangle.
The area of the triangle P(x1,y1) Q(x2,y2) and R(x3,y3) is
1 |x1 y1 1|
-.| |x2 y2 1| |
2 |x3 y3 1|
|