Equation of a straight line passing through a given point
Let a point P(x
0; y
0) be given. Let's substitute the coordinates of point P into the equation of the line y=kx+b:
y0 = kx0 + b ⇔ b = y0 - kx0.
Substituting the found value of b into the equation, we obtain:
y = kx + y0 - kx0 ⇔ y = k(x - x0) + y0 ⇔ y - y0 = k(x - x0).
This equation of a straight line defines a sheaf of straight lines (except a vertical straight line) with center at point P(x
0; y
0):
The equation of a straight line passing through two given points
Let two points be given P
1(x
1; y
1) and P
2(x
2; y
2). We obtain the equation of a straight line passing through these points.
Equation of a sheaf of lines with center at a point P
1(x
1; y
1):
y - y1 = k(x - x1).
To obtain from this equation the equation of a straight line passing through the point P
2(x
2; y
2), you need to find the corresponding angular coefficient. To do this, simply substitute the coordinates of point P
2 into the sheaf equation:
y2 - y1 = k(x2 - x1) ⇔ k = (y2 - y1) ∕ (x2 - x1).
And finally, we get
y - y1 = (y2 - y1) ∕ (x2 - x1)⋅(x - x1).
Usually, the equation of a straight line passing through two points is written as:
(y - y1) ∕ (y2 - y1) = (x - x1) ∕ (x2 - x1).
In this case, the angular coefficient of the straight line k = (y
2 - y
1) ∕ (x
2 - x
1).
If the given points P
1 and P
2 lie on lines parallel to the coordinate axes, that is y
2 = y
1 ( || axes OX) or x
2 = x
1 ( || axes OY), the equations of the lines will be, respectively, y = y
1 or x = x
1.
Conditions of parallelism and perpendicularity of two straight lines
1) Two straight lines y=k
1x+b
1 and y=k
2+b
2 are parallel if and only if their angular coefficients coincide k
1=k
2.
2) We obtain the condition of line perpendicularity. Consider two straight lines with angular coefficients k
1=tgα
1 and k
2=tgα
2. A necessary and sufficient condition for their perpendicularity:
α1 - α2 = π/2 ⇔ α1 = α2+π/2 ⇔ tgα1 = tg(α2+π/2) ⇔ tgα1 = -ctgα2 ⇔ k1k2 = -1.
Thus, we have obtained the necessary and sufficient condition for the perpendicularity of two straight lines: the product of the angular coefficients must be -1.
Angle between two lines
Let us find the angle α between two straight lines AC and BC, given by the equations y=k
1x+b
1, y=k
2+b
2. We assume that the lines are not perpendicular.

Angle ∠ACB=∠α, since these angles are
vertical. Since the angle γ is an
external angle of a triangle ABC,
γ = α + β ⇔ α = γ - β.
Therefore, using the well-known trigonometric formula, we obtain:
tgα = tg(γ - β) ⇔ tgα = (tgγ - tgβ) ∕ (1 + tgγ tgβ).
Since tgβ = k
1, tgγ = k
2,
tgα = (k1 - k2) ∕ (1 + k1k2).
An angle between two lines is by definition an acute angle (or a right angle if the lines are perpendicular), therefore, tgα≥0. Therefore, the formula for the tangent of the angle between lines is:
tgα = |(k1 - k2) ∕ (1 + k1k2)|.
If lines AC and BC are perpendicular, then k
1k
2=-1, and in this case the formula does not make sense.
Also, the formula does not make sense if at least one of the lines is parallel to the OY axis. In this case, the angle between the lines is easy to find for common sense reasons using the formula α=|π/2-β| or α=|π/2-γ|.
A condition under which three given points lie on the same line
Let three points be given P
1(x
1; y
1), P
2(x
2; y
2) and P
3(x
3; y
3). Let's write the equation of a straight line passing through two points P
1 and P
2:
(y - y1) ∕ (y2 - y1) = (x - x1) ∕ (x2 - x1).
For the point P
3 to lie on this straight line, it is necessary and sufficient that its coordinates satisfy this equation. Therefore, we simply substitute the coordinates x
3, y
3 of the point P
3 into the equation of the straight line and obtain the condition under which three points lie on the same straight line:
(y3 - y1) ∕ (y2 - y1) = (x3 - x1) ∕ (x2 - x1).