Your cart is empty
The equation of a straight line II
In the case when the straight line is defined by a point and a normal vector we can directly give the equation. Our aim now is to obtain the equation describing the points of the straight line with a simple substitution also when the straight line is given with other characteristics.
The equation of a straight line given by a point and a direction vector
The point \latex{P_0(x_0;y_0)} and the direction vector \latex{\vec{v} (v_1;v_2)} of the straight line \latex{ e } are given. Then \latex{\vec{n} (v_2;-v_1)} is a normal vector of \latex{ e } (Figure 31).
By substituting it into the general form of the equation of the straight line \latex{(A=v_2,B=-v_1)} the following is obtained

\latex{v_2x-v_1y=v_2x_0-v_1y_0}
This is the equation of the straight line given by the direction vector \latex{\vec{v} (v_1;v_2)} and the point \latex{P_0(x_0;y_0)}, or in other words the direction vector form of the equation of the straight line.
Example 1
Give the equation of the straight line passing through the point \latex{P_0(-2;4)} and with the direction vector \latex{\vec{v} (5;-3)}.
Solution
As now \latex{v_1=5,\;v_2=-3,\;x_0=-2,\;y_0=4,} the equation of the straight line is
\latex{-3x-5y=(-3)\times(-2)-5\times4=6-20=-14.}
By multiplying both sides by \latex{ –1 }, we obtain \latex{ 3x + 5y = 14 }.
The equation of a straight line given by a point and the gradient
The point \latex{P_0(x_0;y_0)} and the gradient \latex{ m } of the straight line \latex{ e } are given. In this case \latex{\vec{n} (m;-1)} is a normal vector of \latex{ e }. By substituting it into the general form \latex{(A=m,\;B=-1)}:
\latex{mx-y=mx_0-y_0}
and after the rearranging

\latex{y-y_0=m(x-x_0).}
This is the equation of the straight line given by the gradient \latex{ m } and the point \latex{P_0(x_0;y_0)}, or in other words the gradient form of the straight line equation.
The straight lines parallel with the \latex{ y }-axis do not have an gradient, therefore if a straight line intersects the \latex{ x }-axis at the point \latex{P_0(x_0;0)}, then its equation is
\latex{x=x_0}.
Example 2
Let us give the equation of the straight line \latex{ e } passing through the point \latex{P_0(3;-1)} and with gradient \latex{\frac{1}{2}} . What is the equation of the straight line \latex{ g } perpendicularly intersecting the straight line e at \latex{ P_0 }?
Solution
By substituting the values \latex{x_0=3,\;y_0-1,\;m=\frac{1}{2}} into the gradient form the equation of e is obtained: \latex{y+1=\frac{1}{2} \cdot (x-3)}.
After the rearranging and multiplying by \latex{ 2 }
\latex{x-2y=5}.
\latex{x-2y=5}.
\latex{ g } is perpendicular to \latex{ e } (Figure 32), thus in terms of the gradient \latex{ m’ }
\latex{m’ =-\frac{1}{m} =\frac{1}{\frac{1}{2}}=-2}.
\latex{m’ =-\frac{1}{m} =\frac{1}{\frac{1}{2}}=-2}.
\latex{ g } also passes through \latex{ P_0, } thus its equation is
\latex{y+1=-2(x-3)}, or after rearranging \latex{2x+y=5.}
Example 3
The straight line with the gradient \latex{ m } intersects the \latex{ y }-axis at the point \latex{P_0(0;b)}. Let us set up its equation.
Solution
By substituting into the gradient form
\latex{ y – b = mx } or \latex{ y = mx + b }.
In year \latex{ 9 } we saw that the equation of the graph of the linear function defined on the set of real numbers has the form \latex{ y = ax + b }, where a is the slope of the straight line, and the point (\latex{ 0 }; \latex{ b }) is the intersection point of the straight line and the \latex{ y }-axis, in short form the \latex{ y }-intercept. Back then we could not prove that the graphs of the linear functions are straight lines, but now it is directly obtained as a result of our investigations in coordinate geometry.
The equation of a straight line given by two points
The points \latex{P_1(x_1;y_1)} and \latex{P_2(x_2;y_2)} of the straight line \latex{ e } are given (Figure 33). We saw it earlier that in this case the following can be direction characteristics of the straight line \latex{ e }:
a direction vector:
\latex{\vec{v}(x_2-x_1;y_2-y_1)},
a normal vector:
\latex{\vec{n}(y_2-y_1;x_1-x_2)}.
By substituting any of these into the corresponding form of the equation of \latex{ e } an equation is obtained where only the coordinates of the two given points appear as data. Now, just as before, we are substituting into the general form so that \latex{ P_1 } takes the role of \latex{ P_0 } (so the form of the equation of \latex{ e } obtained will also hold if \latex{ e } is parallel with the \latex{ y }-axis, i.e. \latex{x_1=x_2}):
\latex{(y_2-y_1)x+(x_-x_2)y=(y_2-y_1)x_1+(x_1-x_2)y_1}
By rearranging it slightly we get that

\latex{(y_2-y_1)\times(x-x_1)=(x_2-x_1)\times (y-y_1)}
This is the equation of the straight line given by the points \latex{P_1(x_1;y_1)} and \latex{P_2(x_2;y_2)}, or in other words the two-point form of the equation of the straight line.
Example 4
Let us give the equation of the straight line that intersects the \latex{ x }-axis at the point \latex{A( a; \, 0 )} and intersects the \latex{ y }-axis at the point \latex{ B }(\latex{ 0 }; \latex{ b }).
Solution
In the form we deduced above, now \latex{x_1=a,\;y_1=0,\;x_2=0,\;y_2=b,} thus
\latex{b(x-a)=-ay}, which implies \latex{bx+ay=ab.}
\latex{b(x-a)=-ay}, which implies \latex{bx+ay=ab.}
If \latex{a\neq0} and \latex{b\neq0}, then the following is obtained when dividing by \latex{ ab }:

\latex{\frac{x}{a}+\frac{y}{b}=1 }
The latter beautiful and symmetric form of the equation of a straight line holds for straight lines that are not parallel with any of the coordinate axes and do not pass through the origin (Figure 34). In such cases this is the intercept form of the straight line equation.
⯁ ⯁ ⯁
Now we are going to summarise shortly and systematise the information about the equation of a straight line.
DEFINITON: In the planar Cartesian coordinate system the equation of a straight line is an equation in two variables that is satisfied by the coordinates of the points \latex{ P }(\latex{ x } ; \latex{ y }) and only of those points, which lie on the straight line.
We wrote down the equation of the straight line with the help of the data defining the straight line; the following is obtained:
THEOREM: In the planar Cartesian coordinate system the equation of a straight line is a linear equation in two variables in the form of
\latex{ Ax + By + C = 0 },
in which at least one of \latex{ A } and \latex{ B } is different from \latex{ 0 } (\latex{ A^2 + B^2\gt0 }).
The converse of the previous theorem also holds:
In the case of fixed values \latex{ A }, \latex{ B } and \latex{ C }, if at least one of \latex{ A } and \latex{ B } is not equal to \latex{ 0 } (\latex{ A^2 + B^2\gt0 }), the equation above generates exactly one straight line. \latex{\vec{n}(A;B)}, is a normal vector, \latex{\vec{v}(B;-A)} is a direction vector, and (if \latex{B\neq0}) \latex{m=-\frac{A}{B} } is the gradient of this straight line.

Exercises
{{exercise_number}}. Give the equation of the straight lines passing through the origin and with a direction vector
- \latex{\vec{v}(1;1) };
- \latex{\vec{v}(2;3) };
- \latex{\vec{v}(-1;4) };
- \latex{\vec{v}(5;-7) };
- \latex{\vec{v}(-8;-2) };
- \latex{\vec{v}(1;\sqrt{5} ) }.
{{exercise_number}}. Give the equation of the straight line passing through the point \latex{ P_0 } and with the direction vector \latex{\vec{v}}, if
- \latex{P_0(0;1),\vec{v}(2;1) };
- \latex{P_0(3;-2),\vec{v}(-2;5) };
- \latex{P_0(-4;8),\vec{v}(-7;-2) };
{{exercise_number}}. Give the equation of the straight lines passing through the origin and with the angle of inclination
- \latex{30°};
- \latex{45°};
- \latex{60°};
- \latex{90°};
- \latex{-45°};
- \latex{-60°}.
{{exercise_number}}. Give the equation of the straight line passing through the point \latex{ P_0 } and with the gradient \latex{ m }, if
- \latex{P_0 (1;0), m=1 };
- \latex{P_0 (-1;5), m=3 };
- \latex{P_0 (4;-7), m=-2 }.
{{exercise_number}}. Give the equation of the straight line defined by the points \latex{ P_1 } and \latex{ P_2 }, if
- \latex{P_1(0;0),P_2(3;1)};
- \latex{P_1(2;-5),P_2(-4;8)};
- \latex{P_1(-1;7),P_2(-3;-5)}.
{{exercise_number}}. Give the equation of the straight line passing through the origin and perpendicular to the straight line with the equation \latex{ y = –2x + 1 }.
{{exercise_number}}. Give the equation of the straight line passing through the point \latex{ P_0 }(\latex{ 5 }; \latex{ –2 }), which
- is parallel with;
- has an included angle of a right angle
with the straight line with the equation \latex{ 2x – 3y + 6 = 0 }.
{{exercise_number}}. For which real values of the parameter a will the straight lines with the equations \latex{ x + ay = 18 } and \latex{ax + 4y = -7} be parallel?
{{exercise_number}}. For which real values of the parameter \latex{ p } will the straight lines with the equations \latex{ px – 3y = 5 } and \latex{x + 4y = -10} be perpendicular to each other?
{{exercise_number}}. Are the points \latex{ A }(\latex{ 7 }; \latex{ 6 }), \latex{ B }(\latex{ 3 }; \latex{ –4 }), \latex{ C }(\latex{ 1 }; \latex{ –9 }) collinear?
{{exercise_number}}. Calculate the area of the triangle bounded by the coordinate axes and the straight line with the equation \latex{5x + 6y – 30 = 0.}
{{exercise_number}}. The midpoints of the sides of a triangle are \latex{ P }(\latex{ –2 }; \latex{ 3 }), \latex{ Q }(\latex{ 2 }; \latex{ –1 }), \latex{ R }(\latex{ 4 }; \latex{ 6 }). Give the equation of the straight lines of the sides and the perpendicular bisectors of the sides of the triangle.
{{exercise_number}}. The vertices of a triangle are \latex{ A }(\latex{ 3 }; \latex{ 1 }), \latex{ B }(\latex{ –1 }; \latex{ 5 }), \latex{ C }(\latex{ –4 }; \latex{ –2 }). Give the equation of the straight lines of the sides and the medians of the triangle.
{{exercise_number}}. Two vertices of a triangle are \latex{ A }(\latex{ 2 }; \latex{ 5 }), \latex{ B }(\latex{ 6 }; \latex{ –2 }), its orthocentre is the origin. Give the equation of the straight lines containing the altitudes and the straight lines of the sides.




