Line (Geometry)

Line (Geometry)

The word "line" is open to many different interpretations, as in:

"That horse is descended from a great line of thoroughbreds." or

"Toe the line, or else!"

The concept of "line" in geometry is so basic that a definition may not be necessary. It might be better to say that a definition may not be possible (or adequate.)

Here are some possible definitions:

A line has length but no breadth. This "line" could not be seen under the most powerful microscope.

A line is the shortest possible distance between two fixed points. In astronomy the shortest possible distance between two fixed points might be curved. Some wit might argue that there is no such thing as a fixed point. After all every point on the surface of the earth is always moving.

A line is the locus of a point that moves from one fixed point to a second fixed point so that the distance traveled is the minimum possible. With current technology the minimum possible distance between New York City and Rome follows the curvature of the earth.

The word "point" has been mentioned but not defined. Can we define a point?

If you draw a "line" on a piece of paper and then crumple the paper, what does this do to the line?

In this page the "line" is described in the context of Cartesian geometry in exactly two dimensions.

Line in Cartesian Geometry

Figure 1. Cartesian plane illustrating many different lines.

How many lines do you see in Figure 1? The answer takes us into a mixture of philosophy and geometry.

One answer might be: "None. I see many images, each with the appearance of a rectangle and each containing a line such as ${\displaystyle y=2x+1}$  or ${\displaystyle x=-2}$ ."

"You can't see the whole line ${\displaystyle x=-2}$ . At best all you can see is a segment of the line between ${\displaystyle y=-5,\ y=5.}$ "

"Are the limits ${\displaystyle 5,-5}$  included or excluded?"

"Do you see the red line?"

"I see a red image with the appearance of a rectangle (or trapezoid, I can't be sure), probably representing the line ${\displaystyle y={\frac {1}{2}}x+1}$ , but it could represent the line ${\displaystyle y=0.49999999999x+1.000000000001}$ ."

A second answer might be: "Too many for the current discussion. After all, the character ${\displaystyle -4}$  contains 5 lines."

Let's go back to the original question: "How many lines do you see in Figure 1?"

While I see many more than 3, it seems that there are 3 of interest to this discussion and I answer: "Three."

"Describe them."

"A red line with equation ${\displaystyle y=0.5x+1}$ , a blue line with equation ${\displaystyle y=0.5x-1}$  and a green line with equation ${\displaystyle y=2x+1.}$ "

Despite the possibility of endless limitations and diversions such as those mentioned above, we accept this answer as satisfactory for the current discussion.

The line defined.

In figure 1, the blue line may be defined as just that: "the blue line." However, if we are to answer profound questions about the blue line, such as "How far is the blue line from the red?" or "Where do the blue and green lines intersect?" we need to define the blue line in algebraic terms.

The blue line is the line that passes through points ${\displaystyle (-2,-2),(0,-1),(2,0)}$  and it has equation ${\displaystyle y=f(x)=Ax^{2}+Bx+C}$ .

Calculate the values of ${\displaystyle A,B,C}$ :

${\displaystyle -2=A(-2)^{2}+B(-2)+C;\ 4A-2B+C=-2}$

${\displaystyle -1=A(0)^{2}+B(0)+C;\ C=-1}$

${\displaystyle 0=A(2)^{2}+B(2)+C;\ 4A+2B+C=0}$

${\displaystyle 4A-2B+(-1)=-2;\ 4A-2B=-1\ \dots \ (1)}$

${\displaystyle 4A+2B+(-1)=0;\ 4A+2B=1\ \dots \ (2)}$

${\displaystyle (1)+(2),\ A=0.}$

${\displaystyle (2)-(1),\ 4B=2;\ B={\frac {1}{2}}}$

and the equation of the blue line becomes: ${\displaystyle y=(0)x^{2}+({\frac {1}{2}})x+(-1)={\frac {1}{2}}x-1}$ . This equation has the form ${\displaystyle y=mx+g}$  where:

${\displaystyle m=}$  slope of blue line ${\displaystyle ={\frac {1}{2}}}$  and ${\displaystyle g=}$ the ${\displaystyle y\ intercept=-1}$ , the value of ${\displaystyle y}$  at the point ${\displaystyle (0,-1)}$  where the line and the ${\displaystyle y\ axis}$  intersect.

The red and green lines both intersect the ${\displaystyle y\ axis\ (x=0)}$  at the point ${\displaystyle (0,1)}$ . The ${\displaystyle y}$  intercept is ${\displaystyle 1}$ .

The red line has equation ${\displaystyle y=m_{1}x+1.}$  The green line has equation ${\displaystyle y=m_{2}x+1.}$

Slope of line

Figure 2. Slope of line illustrated.
When ${\displaystyle x}$  increases by ${\displaystyle 2}$  units, ${\displaystyle y}$  increases by ${\displaystyle 3}$  units.
Slope of oblique line ${\displaystyle =m={\frac {3}{2}}.}$
When ${\displaystyle x}$  decreases by ${\displaystyle 4}$  units, ${\displaystyle y}$  decreases by ${\displaystyle 6}$  units.
Slope of oblique line ${\displaystyle =m={\frac {-6}{-4}}={\frac {3}{2}}.}$

See Figure 2. The oblique line passes through points ${\displaystyle (x_{1},y_{1})=(-2,-4),\ (x_{2},y_{2})=(0,-1).}$

${\displaystyle m={\frac {y_{2}-y_{1}}{x_{2}-x_{1}}}={\frac {-1-(-4)}{0-(-2)}}={\frac {3}{2}}.}$  The oblique line has equation ${\displaystyle y={\frac {3}{2}}x+g}$  and it passes through the point ${\displaystyle (-2,-4).\ g=y-{\frac {3}{2}}x=-4-{\frac {3}{2}}(-2)=-4+3=-1.}$  The ${\displaystyle y}$  intercept is ${\displaystyle -1}$  and:

Oblique line has equation ${\displaystyle y={\frac {3}{2}}x-1.}$

Back to Figure 1. By inspection, ${\displaystyle m_{1}={\frac {1}{2}}}$  and the red line has equation ${\displaystyle y={\frac {1}{2}}x+1,\ m_{2}=2}$  and the green line has equation ${\displaystyle y=2x+1.}$

Parallel lines

Figure 3. Parallel lines in the Cartesian plane.
The 3 colored lines all have slope ${\displaystyle {\frac {1}{2}}}$ .
Each colored line has equation: ${\displaystyle y={\frac {1}{2}}x+g.}$
The 3 colored lines are parallel.

See Figure 3. The three colored lines are parallel because they all have the same slope ${\displaystyle ({\frac {1}{2}}).}$

Remember that the lines ${\displaystyle x=-4;\ x=-3;\ \dots \ x=4}$  are all parallel, as are the lines ${\displaystyle y=-4;\ y=-3;\ \dots \ y=4.}$

Lines with same ${\displaystyle y}$  intercept

Figure 4. Lines with same ${\displaystyle y}$  intercept.
The 3 colored lines all pass through point ${\displaystyle (0,1)}$ .
They have the same ${\displaystyle y}$  intercept.
Each colored line has equation: ${\displaystyle y=mx+1.}$

See Figure 4. The colored lines represent the family of lines that pass through the point ${\displaystyle (0,1)}$ . There is one exception. The line ${\displaystyle x=0}$  passes through the point ${\displaystyle (0,1)}$  but it cannot be represented by the equation ${\displaystyle y=mx+1.}$

Note the red line. As ${\displaystyle x}$  increases, ${\displaystyle y}$  decreases, and the line goes down from left to right. Slope of the line is ${\displaystyle {\frac {-1}{5}}}$  and line has equation ${\displaystyle y=-{\frac {1}{5}}x+1.}$

Go to top of section "Line in Cartesian Geometry."

Go to top of page ["Line (Geometry)."]

Line as locus of point

Figure 1. Line as locus of point equidistant from 2 fixed points.
Any point on line ${\displaystyle JP}$  is equidistant from points ${\displaystyle G,H.}$
${\displaystyle PG=PH.\ JG=JH.}$

In this section the line is defined as the locus of a point that is always equidistant from two fixed points. In Figure 1 the two fixed points are ${\displaystyle G,H}$  and the length ${\displaystyle GH}$  is non-zero. By definition length ${\displaystyle PG}$  = length ${\displaystyle PH.}$

Let points ${\displaystyle P,G,H}$  have coordinates ${\displaystyle (x,y),(s,t),(u,v).}$

Length ${\displaystyle PG={\sqrt {(x-s)^{2}+(y-t)^{2}}}}$

Length ${\displaystyle PH={\sqrt {(x-u)^{2}+(y-v)^{2}}}}$

${\displaystyle PG=PH.}$  Therefore:

${\displaystyle {\sqrt {(x-s)^{2}+(y-t)^{2}}}={\sqrt {(x-u)^{2}+(y-v)^{2}}}}$

${\displaystyle (x-s)^{2}+(y-t)^{2}=(x-u)^{2}+(y-v)^{2}}$

${\displaystyle (x-s)^{2}+(y-t)^{2}-(\ (x-u)^{2}+(y-v)^{2}\ )=0}$

Expand and the result is:

${\displaystyle 2(u-s)x+2(v-t)y+ss+tt-uu-vv=0}$

This equation has the form:${\displaystyle Ax+By+C=0}$  where:

${\displaystyle A=2(u-s);\ B=2(v-t);\ C=s^{2}+t^{2}-u^{2}-v^{2}.}$

In Figure 1 the line through points ${\displaystyle JP}$  has equation ${\displaystyle 5x-12y+15=0.}$

If defined as the locus of a point equidistant from points ${\displaystyle (s,t)=(2,-12),\ (u,v)=(-8,12),}$  the calculation of ${\displaystyle A,B,C}$  produces the equation ${\displaystyle -20x+48y-60=0.}$

If defined as the locus of a point equidistant from points ${\displaystyle (s,t)=(-1,29),\ (u,v)=(19,-19),}$  the calculation of ${\displaystyle A,B,C}$  produces the equation ${\displaystyle 40x-96y+120=0.}$

Distance from point to line

Length ${\displaystyle GH={\sqrt {(u-s)^{2}+(v-t)^{2}}}={\sqrt {({\frac {A}{2}})^{2}+({\frac {B}{2}})^{2}}}={\frac {1}{2}}{\sqrt {A^{2}+B^{2}}}}$ .

Length ${\displaystyle GH}$  is non-zero. Therefore, at least one of ${\displaystyle A,B}$  must be non-zero.

Length ${\displaystyle GJ={\frac {1}{4}}{\sqrt {A^{2}+B^{2}}}=}$  distance from point ${\displaystyle G}$  to line.

Consider the expression ${\displaystyle Ax+By+C}$  and substitute ${\displaystyle (u,v)}$  for ${\displaystyle (x,y).}$

We show that ${\displaystyle Au+Bv+C={\frac {A^{2}+B^{2}}{4}}}$  or ${\displaystyle 4(Au+Bv+C)=A^{2}+B^{2}.}$

If you make the substitutions and expand, you will see that the equality is valid.

Therefore ${\displaystyle {\frac {Au+Bv+C}{\sqrt {A^{2}+B^{2}}}}={\frac {\sqrt {A^{2}+B^{2}}}{4}}=}$  distance from point ${\displaystyle H}$  to line.

Similarly we can show that ${\displaystyle {\frac {As+Bt+C}{\sqrt {A^{2}+B^{2}}}}=-{\frac {1}{4}}{\sqrt {A^{2}+B^{2}}}=}$  distance from point ${\displaystyle G}$  to line.

If the equation of the line has form: ${\displaystyle {\frac {Ax+By+C}{\sqrt {A^{2}+B^{2}}}}=0}$  then

${\displaystyle {\frac {A}{\sqrt {A^{2}+B^{2}}}}x+{\frac {B}{\sqrt {A^{2}+B^{2}}}}y+{\frac {C}{\sqrt {A^{2}+B^{2}}}}=0}$

${\displaystyle (}$  coefficient of ${\displaystyle x)^{2}+(}$  coefficient of ${\displaystyle y)^{2}}$  ${\displaystyle ={\frac {A^{2}}{A^{2}+B^{2}}}+{\frac {B^{2}}{A^{2}+B^{2}}}={\frac {A^{2}+B^{2}}{A^{2}+B^{2}}}=1.}$

If the equation of the line ${\displaystyle Ax+By+C=0}$  has ${\displaystyle A^{2}+B^{2}=1,}$

the distance from point ${\displaystyle (s,t)}$  to the line is ${\displaystyle As+Bt+C,}$

the distance from point ${\displaystyle (u,v)}$  to the line is ${\displaystyle Au+Bv+C,}$  and ${\displaystyle As+Bt+C=-(Au+Bv+C).}$

Length ${\displaystyle GJ}$  and length ${\displaystyle HJ}$  have the same absolute value with opposite signs.

Use of multiplier K

Consider the equation ${\displaystyle {\frac {Au+Bv+C}{\sqrt {A^{2}+B^{2}}}}={\frac {\sqrt {A^{2}+B^{2}}}{4}}.}$  If ${\displaystyle (A^{2}+B^{2}==1),}$  this doesn't make sense.

To make sense of the relationship introduce a multiplier ${\displaystyle K.\ A,B,C}$  become ${\displaystyle KA,KB,KC}$  and the relationship is:

${\displaystyle {\frac {KAu+KBv+KC}{\sqrt {(KA)^{2}+(KB)^{2}}}}={\frac {\sqrt {(KA)^{2}+(KB)^{2}}}{4}}}$

${\displaystyle {\frac {K(Au+Bv+C)}{K{\sqrt {(A)^{2}+(B)^{2}}}}}={\frac {K{\sqrt {(A)^{2}+(B)^{2}}}}{4}}}$

If ${\displaystyle (A^{2}+B^{2}==1),\ Au+Bv+C={\frac {K}{4}}.}$

Consider the line ${\displaystyle {\frac {3}{5}}x+{\frac {4}{5}}y+4=0}$  and the point ${\displaystyle (7,-4).}$

${\displaystyle {\frac {3}{5}}(7)+{\frac {4}{5}}(-4)+4=5={\frac {K}{4}}.\ K=20.}$

If the equation of the line is expressed as ${\displaystyle 20({\frac {3}{5}}x+{\frac {4}{5}}y+4)=12x+16y+80=0,}$

the equation makes sense, but the ${\displaystyle LHS}$  doesn't change.

${\displaystyle LHS={\frac {12(7)+16(-4)+80}{\sqrt {12^{2}+16^{2}}}}={\frac {84-64+80}{20}}={\frac {100}{20}}=5;\ RHS={\frac {20}{4}}=5.}$

${\displaystyle \ LHS=RHS=5,}$  the distance from point ${\displaystyle (7,-4)}$  to the line as calculated above with equation ${\displaystyle {\frac {3}{5}}x+{\frac {4}{5}}y+4=0.}$

Calculation of the equation of the line equidistant from points ${\displaystyle (7,-4),(1,-12)}$  initially produces: ${\displaystyle 12x+16y+80=0.}$  Calculation of the equation of the line equidistant from points ${\displaystyle (10,0),(-2,-16)}$  initially produces: ${\displaystyle 24x+32y+160=0.}$

Go to top of this section "Line as locus of point."

Go to top of first section "Line in Cartesian Geometry."

Go to top of page ["Line (Geometry)."]

Normal form of line

Figure 1. Graph illustrating normal form of straight line.
${\displaystyle \angle XON=}$  ω.
${\displaystyle x\ \cos }$  ω ${\displaystyle +\ y\ \sin }$  ω ${\displaystyle -\ p=0.}$
At point ${\displaystyle N}$ ${\displaystyle :\ -12(-{\frac {3}{5}})+16({\frac {4}{5}})=20=p.}$

See Figure 1. The green line through point ${\displaystyle N}$  has equation ${\displaystyle y={\frac {3}{4}}x+25}$  or ${\displaystyle -{\frac {3}{5}}x+{\frac {4}{5}}y-20=0.}$

The normal ${\displaystyle ON}$  to the line from the origin has length ${\displaystyle p=20.}$

Let ${\displaystyle \angle XON=}$  ω${\displaystyle .\ \cos }$  ω ${\displaystyle ={\frac {-3}{5}}.\ \sin }$  ω ${\displaystyle ={\frac {4}{5}}.}$

The normal ${\displaystyle ON}$  to the line is in the quadrant where cosine ${\displaystyle (-{\frac {3}{5}})}$  is negative and sine ${\displaystyle ({\frac {4}{5}})}$  is positive.

The normal form of the equation is ${\displaystyle x\ \cos }$  ω ${\displaystyle +\ y\ \sin }$  ω ${\displaystyle -\ p=0}$  or ${\displaystyle x(-{\frac {3}{5}})+y({\frac {4}{5}})-20=0.}$

This puts the origin on the negative side of the line.

Directed distance from line to origin ${\displaystyle =NO=-p=-20.}$  Directed distance from origin to line ${\displaystyle =ON=p=20.}$

Components of the normal form

Figure 2. Composition of normal form with point ${\displaystyle P}$  on line.
${\displaystyle OD=x\ \cos }$  ω; ${\displaystyle DN=y\ \sin }$  ω.
${\displaystyle OD+DN=ON=p.}$

See Figure 2. This example shows line ${\displaystyle {\frac {3}{5}}x+{\frac {4}{5}}y-20=0}$  with point ${\displaystyle P}$  on the line.

The normal to the line is in the quadrant where cosine ${\displaystyle (0.6)}$  is positive and sine ${\displaystyle (0.8)}$  is positive.

${\displaystyle \angle XON=}$  ω ${\displaystyle =\ \angle EXP.}$

${\displaystyle \cos }$  ω ${\displaystyle ={\frac {3}{5}};\ \sin }$  ω ${\displaystyle ={\frac {4}{5}}.\ ON}$  is the normal with length ${\displaystyle p=20.}$  Point ${\displaystyle P}$  has coordinates ${\displaystyle (20,10).}$

${\displaystyle OX=x=20.\ {\frac {OD}{OX}}=\cos }$  ω ${\displaystyle ={\frac {OD}{x}};\ OD=x\ \cos }$  ω ${\displaystyle =20({\frac {3}{5}})=12.}$

${\displaystyle XP=y=10.\ {\frac {EP}{XP}}=\sin }$  ω ${\displaystyle ={\frac {EP}{y}};\ EP=y\ \sin }$  ω ${\displaystyle =10({\frac {4}{5}})=8.}$

${\displaystyle DN=EP=8.}$

${\displaystyle OD+DN=12+8=20=p.}$  The point ${\displaystyle P}$  is on the line.

Figure 3. Composition of normal form with point ${\displaystyle P}$  not on line.
${\displaystyle OD=x\ \cos }$  ω; ${\displaystyle DP_{1}=y\ \sin }$  ω.
${\displaystyle OP_{1}=OD+DP_{1}=10.5.}$
Points ${\displaystyle P,P_{1}}$  are ${\displaystyle -9.5}$  from green line through ${\displaystyle N.}$

See Figure 3. This example shows line ${\displaystyle {\frac {3}{5}}x-{\frac {4}{5}}y-20=0}$  with point ${\displaystyle P}$  not on the line.

The normal to the line is in the quadrant where cosine ${\displaystyle (0.6)}$  is positive and sine ${\displaystyle (-0.8)}$  is negative.

${\displaystyle \angle XON=}$  ω.

${\displaystyle \cos }$  ω ${\displaystyle ={\frac {3}{5}};\ \sin }$  ω ${\displaystyle =-{\frac {4}{5}}.\ ON}$  is the normal with length ${\displaystyle p=20.}$  Point ${\displaystyle P}$  has coordinates ${\displaystyle (27.5,7.5).}$

${\displaystyle OX=x=27.5.\ {\frac {OD}{OX}}=\cos }$  ω ${\displaystyle ={\frac {OD}{x}};\ OD=x\ \cos }$  ω ${\displaystyle =27.5({\frac {3}{5}})=16.5.}$

${\displaystyle DP_{1}=XE=y\ \sin }$  ω ${\displaystyle =(7.5)(-{\frac {4}{5}})=-6.}$  The negative value for ${\displaystyle DP_{1}}$  establishes direction towards the origin.

${\displaystyle OP_{1}=OD+DP_{1}=16.5+(-6)=10.5.}$  The points ${\displaystyle P,P_{1}}$  are ${\displaystyle 10.5-20=-9.5}$  from the line indicating ${\displaystyle 9.5}$  units toward the origin.

Normal form in practice

Figure 4. Three lines in normal form.

See Figure 4. The green line has equation ${\displaystyle -{\frac {3}{5}}x+{\frac {4}{5}}y-20=0}$  and point ${\displaystyle C\ (-20,10)}$  is on the line.

The brown line has equation ${\displaystyle -{\frac {3}{5}}x+{\frac {4}{5}}y-10=0}$  and point ${\displaystyle D\ (6,17)}$  is on the line.

The brown and green lines are in the quadrant where cosine ${\displaystyle (-{\frac {3}{5}})}$  is negative and sine ${\displaystyle ({\frac {4}{5}})}$  is positive.

Distance from brown line to origin ${\displaystyle =-{\frac {3}{5}}(0)+{\frac {4}{5}}(0)-10=-10.}$

Distance from green line to origin ${\displaystyle =-20.}$

Distance from green line to point ${\displaystyle D\ (6,17)}$  ${\displaystyle =-{\frac {3}{5}}(6)+{\frac {4}{5}}(17)-20=-{\frac {18}{5}}+{\frac {68}{5}}-20={\frac {50}{5}}-20=-10,}$  toward the origin.

Distance from brown line to point ${\displaystyle C\ (-20,10)=-{\frac {3}{5}}(-20)+{\frac {4}{5}}(10)-10=12+8-10=10,}$  away from the origin.

Distance from green line to brown line ${\displaystyle =-20-(-10)=-10,}$  toward the origin.

Distance from brown line to green line ${\displaystyle =-10-(-20)=10,}$  away from the origin.

The purple line has equation ${\displaystyle {\frac {3}{5}}x-{\frac {4}{5}}y-10=0}$  and point ${\displaystyle E\ (6,-8)}$  is on the line. The purple line is in the quadrant where cosine ${\displaystyle ({\frac {3}{5}})}$  is positive and sine ${\displaystyle (-{\frac {4}{5}})}$  is negative. The purple and brown lines are parallel, but in opposite quadrants.

Distance from brown line to point ${\displaystyle E\ (6,-8)=-{\frac {3}{5}}(6)+{\frac {4}{5}}(-8)-10=-{\frac {18}{5}}-{\frac {32}{5}}-10=-{\frac {50}{5}}-10=-20,}$  toward the origin.

Distance from purple line to point ${\displaystyle D\ (6,17)={\frac {3}{5}}(6)-{\frac {4}{5}}(17)-10={\frac {18}{5}}-{\frac {68}{5}}-10=-{\frac {50}{5}}-10=-20,}$  toward the origin.

When calculating distance between brown and purple lines, it is important to see that they are in opposite quadrants. If direction is not important, you can say that the brown line has equation ${\displaystyle {\frac {3}{5}}x-{\frac {4}{5}}y+10=0,}$  and the distance between them is ${\displaystyle 10-(-10)=20.}$

Go to top of this section "Normal form of line."

Go to top of first section "Line in Cartesian Geometry."

Go to top of page ["Line (Geometry)."]

Direction Numbers

Figure 1. Direction numbers.
${\displaystyle [A_{1},B_{1}]=[15,9].}$
${\displaystyle [A_{2},B_{2}]=[-45,-27].}$
Both sets of direction numbers are equivalent to ${\displaystyle [5,3].}$

See Figure 1.

The red line has ${\displaystyle x}$  intercept ${\displaystyle (-15,0)}$  and ${\displaystyle y}$  intercept ${\displaystyle (0,9).}$  Slope of red line ${\displaystyle ={\frac {9-0}{0-(-15)}}={\frac {9}{15}}={\frac {3}{5}}.}$

Red line has equation ${\displaystyle y={\frac {3}{5}}x+9.}$  When ${\displaystyle x}$  increases by ${\displaystyle 1,\ y}$  increases by ${\displaystyle {\frac {3}{5}}.}$  The line has ${\displaystyle direction\ numbers\ [A,B]=[1,{\frac {3}{5}}]}$  where ${\displaystyle A}$  represents a change in ${\displaystyle x}$  and ${\displaystyle B}$  represents a corresponding change in ${\displaystyle y.}$

This section shows that the line may be defined using known points and ${\displaystyle direction\ numbers.}$

Consider the points ${\displaystyle Q:(5,12),\ R:(20,21).}$  The value of ${\displaystyle x}$  at ${\displaystyle R}$  is the value of ${\displaystyle x}$  at ${\displaystyle Q\ +\ (20-5=15).}$  The change in ${\displaystyle x}$  between ${\displaystyle Q,R}$  is represented by arrow ${\displaystyle A_{1}}$  with length ${\displaystyle 15.}$  The value of ${\displaystyle y}$  at ${\displaystyle R}$  is the value of ${\displaystyle y}$  at ${\displaystyle Q\ +\ (21-12=9).}$  The change in ${\displaystyle y}$  between ${\displaystyle Q,R}$  is represented by arrow ${\displaystyle B_{1}}$  with length ${\displaystyle 9.}$

${\displaystyle A_{1},B_{1}}$  are the direction numbers of the red line at point ${\displaystyle Q.}$

The red line passes through point ${\displaystyle Q}$  with direction numbers ${\displaystyle [A_{1},B_{1}]=[15,9].}$

Consider the points ${\displaystyle R:(20,21),\ P:(-25,-6).\ A_{2}=x_{P}-x_{R}=-25-20=-45;\ B_{2}=y_{P}-y_{R}=-6-21=-27.}$

The red line passes through point ${\displaystyle R}$  with direction numbers ${\displaystyle [A_{2},B_{2}]=[-45,-27].}$

The direction numbers ${\displaystyle [15,9],[-45,-27]}$  for the red line are consistent because they represent a ratio, the slope of the line.

Given the point ${\displaystyle Q:(5,12)}$  and direction numbers ${\displaystyle [A_{1},B_{1}]=[15,9],}$  the red line can be defined as ${\displaystyle (5,12),[15,9]}$  and the equation of the red line is

${\displaystyle {\frac {y-12}{x-5}}={\frac {9}{15}}={\frac {3}{5}};\ 5(y-12)=3(x-5);\ 5y-60=3x-15;\ 3x-5y+45=0.}$

Given the point ${\displaystyle P:(-25,-6)}$  and direction numbers ${\displaystyle [A_{2},B_{2}]=[-45,-27],}$  the red line can be defined as ${\displaystyle (-25,-6),[-45,-27]}$  and the equation of the red line is

${\displaystyle {\frac {y-(-6)}{x-(-25)}}={\frac {-27}{-45}}={\frac {3}{5}};\ 5(y+6)=3(x+25);\ 5y+30=3x+75;\ 3x-5y+45=0,}$  the same as that calculated above.

For convenience, both sets of direction numbers ${\displaystyle [15,9],[-45,-27]}$  can be expressed as ${\displaystyle [5,3].}$

The equation of the red line is given as: ${\displaystyle y={\frac {3}{5}}x+9,}$  hence direction numbers ${\displaystyle [A_{3},B_{3}]=[1,{\frac {3}{5}}]=[5,3].}$

Direction numbers are valid only if the distance between the two points of reference is non-zero. Therefore, at least one of ${\displaystyle [A,B]}$  must be non-zero.

Using direction numbers

1. Format of any point.

Given a line defined as ${\displaystyle (x_{1},y_{1}),[A_{1},B_{1}]}$  any point on the line has format: ${\displaystyle (x_{1}+KA_{1},\ y_{1}+KB_{1}).}$  For example, if the red line in Figure 1 is defined as ${\displaystyle (5,12),[5,3],}$  any point on the line is ${\displaystyle (5+5K,12+3K).}$  If ${\displaystyle (K==-6),}$  the point is ${\displaystyle (-25,-6)}$  or point ${\displaystyle P.}$

2. Normal to the line.

Refer to the section "Line as locus of a point" above. If the line has equation ${\displaystyle Ax+By+C=0,}$  the normal to the line has direction numbers ${\displaystyle [A,B].}$

3. Point at specified distance.

Given a line defined as ${\displaystyle (x_{1},y_{1}),[A_{1},B_{1}]}$  calculate the two points on the line at distance ${\displaystyle d}$  from ${\displaystyle (x_{1},y_{1}).}$

Let one point at distance ${\displaystyle d}$  from ${\displaystyle (x_{1},y_{1})}$  have coordinates ${\displaystyle (x_{1}+KA_{1},y_{1}+KB_{1}).}$

Then ${\displaystyle d={\sqrt {(x_{1}+KA_{1}-x_{1})^{2}+(y_{1}+KB_{1}-y_{1})^{2}}}={\sqrt {(KA_{1})^{2}+(KB_{1})^{2}}}=\pm K{\sqrt {A_{1}^{2}+B_{1}^{2}}}}$

${\displaystyle K={\frac {\pm d}{\sqrt {A_{1}^{2}+B_{1}^{2}}}}.}$

For example, given a line defined as ${\displaystyle (-15,0),[5,3]}$  calculate the two points on the line at distance ${\displaystyle d=3{\sqrt {34}}}$  from ${\displaystyle (-15,0).}$

${\displaystyle K={\frac {\pm 3{\sqrt {34}}}{\sqrt {5^{2}+3^{2}}}}={\frac {\pm 3{\sqrt {34}}}{\sqrt {34}}}=\pm 3.}$

The points are: ${\displaystyle (-15+3(5),0+3(3)),\ (-15-3(5),0-3(3))}$  or ${\displaystyle (0,9),\ (-30,-9).}$

4. Point at intersection of two lines.

Let one line have equation ${\displaystyle Ax+By+C=0}$  and let the other be defined as ${\displaystyle (x_{1},y_{1}),[A_{1},B_{1}].}$

Any point on the second line has format ${\displaystyle (x_{1}+KA_{1},\ y_{1}+KB_{1}).}$  The point ${\displaystyle (x_{1}+KA_{1},\ y_{1}+KB_{1})}$  satisfies the first equation. Therefore:

${\displaystyle A(x_{1}+KA_{1})+B(y_{1}+KB_{1})+C=0}$

${\displaystyle \ Ax_{1}+AKA_{1}+By_{1}+BKB_{1}+C=0}$

${\displaystyle \ K(AA_{1}+BB_{1})=-(Ax_{1}+By_{1}+C)}$

${\displaystyle K={\frac {-(Ax_{1}+By_{1}+C)}{AA_{1}+BB_{1}}}.}$

If ${\displaystyle (AA_{1}+BB_{1}==0),}$  the lines are parallel.

5. Angle between two lines.

Figure 2. Angle of intersection using direction numbers.
Line ${\displaystyle OP}$  has direction numbers ${\displaystyle [A_{1},B_{1}].}$
Line ${\displaystyle OQ}$  has direction numbers ${\displaystyle [A_{2},B_{2}].}$

See Figure 2.

Line ${\displaystyle OP}$  has direction numbers ${\displaystyle [A_{1},B_{1}].}$

Line ${\displaystyle OQ}$  has direction numbers ${\displaystyle [A_{2},B_{2}].}$

The aim is to calculate the angle between the two lines, ${\displaystyle \angle \alpha =\angle POQ.}$

${\displaystyle OP={\sqrt {A_{1}^{2}+B_{1}^{2}}}}$

${\displaystyle OQ={\sqrt {A_{2}^{2}+B_{2}^{2}}}}$

${\displaystyle PQ={\sqrt {(A_{1}-A_{2})^{2}+(B_{1}-B_{2})^{2}}}}$

Using the cosine rule ${\displaystyle a^{2}=b^{2}+c^{2}-2bc\cos A,}$

${\displaystyle PQ^{2}=OP^{2}+OQ^{2}-2(OP)(OQ)\cos \alpha }$

${\displaystyle 2(OP)(OQ)\cos \alpha =OP^{2}+OQ^{2}-PQ^{2}=A_{1}^{2}+B_{1}^{2}+A_{2}^{2}+B_{2}^{2}-(A_{1}^{2}-2A_{1}A_{2}+A_{1}^{2}+B_{1}^{2}-2B_{1}B_{2}+B_{2}^{2})}$

${\displaystyle \cos \alpha ={\frac {2(A_{1}A_{2}+B_{1}B_{2})}{2(OP)(OQ)}}={\frac {A_{1}A_{2}+B_{1}B_{2}}{{\sqrt {A_{1}^{2}+B_{1}^{2}}}{\sqrt {A_{2}^{2}+B_{2}^{2}}}}}}$

If ${\displaystyle A_{1}A_{2}+B_{1}B_{2}==0,\ \cos \alpha =0}$  and the lines are perpendicular.

if ${\displaystyle (B_{1}A_{2}==A_{1}B_{2})\ B_{1}={\frac {A_{1}B_{2}}{A_{2}}}}$ ,

${\displaystyle \cos \alpha ={\frac {A_{1}A_{2}+({\frac {A_{1}B_{2}}{A_{2}}})B_{2}}{{\sqrt {A_{1}^{2}+({\frac {A_{1}B_{2}}{A_{2}}})^{2}}}{\sqrt {A_{2}^{2}+B_{2}^{2}}}}}}$  ${\displaystyle ={\frac {\frac {A_{1}A_{2}A_{2}+A_{1}B_{2}B_{2}}{A_{2}}}{{\sqrt {\frac {A_{1}^{2}A_{2}^{2}+A_{1}^{2}B_{2}^{2}}{A_{2}^{2}}}}{\sqrt {A_{2}^{2}+B_{2}^{2}}}}}}$  ${\displaystyle ={\frac {A_{1}A_{2}A_{2}+A_{1}B_{2}B_{2}}{{\sqrt {A_{1}^{2}(A_{2}^{2}+B_{2}^{2})}}{\sqrt {A_{2}^{2}+B_{2}^{2}}}}}}$  ${\displaystyle ={\frac {A_{1}(A_{2}^{2}+B_{2}^{2})}{\pm A_{1}{\sqrt {A_{2}^{2}+B_{2}^{2}}}{\sqrt {A_{2}^{2}+B_{2}^{2}}}}}}$  ${\displaystyle ={\frac {\pm A_{1}(A_{2}^{2}+B_{2}^{2})}{A_{1}(A_{2}^{2}+B_{2}^{2})}}}$  ${\displaystyle =\pm 1,}$  ${\displaystyle \alpha =0}$ ° or ${\displaystyle \alpha =180}$ ° and the lines are parallel.

Go to top of this section "Direction Numbers."

Go to top of first section "Line in Cartesian Geometry."

Go to top of page ["Line (Geometry)."]

Direction Cosines

Let the line ${\displaystyle OQ}$  have direction numbers ${\displaystyle [A,B]=[{\frac {A_{2}}{\sqrt {A_{2}^{2}+B_{2}^{2}}}},{\frac {B_{2}}{\sqrt {A_{2}^{2}+B_{2}^{2}}}}].}$

The value ${\displaystyle A={\frac {A_{2}}{\sqrt {A_{2}^{2}+B_{2}^{2}}}}={\frac {A_{2}}{OQ}}=\cos \angle QOX.}$

The value ${\displaystyle B={\frac {B_{2}}{\sqrt {A_{2}^{2}+B_{2}^{2}}}}={\frac {B_{2}}{OQ}}=\cos \angle QOY.}$

${\displaystyle A^{2}+B^{2}=1}$ .

Figure 1. Angle of intersection using direction cosines.
${\displaystyle OP=OQ=1.\ A_{1}^{2}+B_{1}^{2}=A_{2}^{2}+B_{2}^{2}=1.}$
All values ${\displaystyle [A_{1},B_{1}],\ [A_{2},B_{2}]}$  are direction cosines.
${\displaystyle \cos \alpha =A_{1}A_{2}+B_{1}B_{2}.}$

When a set of direction numbers ${\displaystyle [A,B]}$  has ${\displaystyle A^{2}+B^{2}=1,}$  the direction numbers are direction cosines. In Figure 1 ${\displaystyle OP=OQ=1.\ \alpha =\angle POQ.}$  All values ${\displaystyle A_{1},B_{1},A_{2},B_{2}}$  are direction cosines. From 5 above, ${\displaystyle \cos \alpha =A_{1}A_{2}+B_{1}B_{2}.}$  This statement is equivalent to:

${\displaystyle \cos(\angle POX-\angle QOX)}$  ${\displaystyle =\cos \angle POX\cos \angle QOX}$  ${\displaystyle +\sin \angle POX\sin \angle QOX}$  or

${\displaystyle \cos(\beta -\delta )=\cos \beta \cos \delta +\sin \beta \sin \delta .}$

For example, two lines have direction numbers ${\displaystyle [1,1],\ [{\sqrt {3}},1].}$  Calculate the angle between them.

Convert to direction cosines: ${\displaystyle [{\frac {\sqrt {2}}{2}},{\frac {\sqrt {2}}{2}}],\ [{\frac {\sqrt {3}}{2}},{\frac {1}{2}}].}$

${\displaystyle \cos \alpha =A_{1}A_{2}+B_{1}B_{2}={\frac {\sqrt {6}}{4}}+{\frac {\sqrt {2}}{4}}=\cos 15}$ °.

If ${\displaystyle |\cos \alpha |==1,\ \alpha =0}$ ° or ${\displaystyle 180}$ °, and the lines are parallel.

If ${\displaystyle \cos \alpha ==0,\ \alpha =90}$ ° or ${\displaystyle 270}$ °, and the lines are perpendicular.

1. ${\displaystyle \cos(2\alpha )}$  using direction cosines

Figure 2. Cos(2α) using direction cosines.
${\displaystyle \angle POX=\angle QOX=\alpha .}$
${\displaystyle \angle POQ=2\angle POX=2\alpha .}$
${\displaystyle \cos \angle POQ=\cos(2\alpha )=2A^{2}-1.}$

In Figure 2 line ${\displaystyle OP}$  has direction numbers ${\displaystyle [A,B],}$  line ${\displaystyle OQ}$  has direction numbers ${\displaystyle [A,-B]}$  and ${\displaystyle OP=OQ=1.}$  The values ${\displaystyle A,B}$  are direction cosines.

${\displaystyle \angle POX=\angle QOX;}$  ${\displaystyle \angle POQ=2\angle POX.}$

${\displaystyle \cos \angle POQ}$  ${\displaystyle =AA+B(-B)}$  ${\displaystyle =AA-BB}$  ${\displaystyle =AA-(1-AA)}$  ${\displaystyle =2AA-1.}$

This statement is equivalent to:

${\displaystyle \cos(2\alpha )=2\cos ^{2}(\alpha )-1}$  or ${\displaystyle \cos({\frac {\alpha }{2}})=\pm {\sqrt {\frac {\cos(\alpha )+1}{2}}}.}$

2. ${\displaystyle \cos(3\alpha )}$  using direction cosines

Figure 3. cos(3α) using direction cosines.
${\displaystyle OP=OQ=OR=1.}$
All values ${\displaystyle [A_{1},B_{1}],\ [A,B]}$  are direction cosines
${\displaystyle \cos(3\alpha )=4A^{3}-3A.}$

See Figure 3.

Lines ${\displaystyle OP,OQ,OR}$  are defined as ${\displaystyle (0,0),[A_{1},B_{1}];}$  ${\displaystyle (0,0),[A,B];}$  ${\displaystyle (0,0),[A,-B]}$  respectively.

${\displaystyle OP=OQ=OR=1.}$

${\displaystyle \angle POX=2\angle QOX,}$  therefore: ${\displaystyle A_{1}=2AA-1}$

${\displaystyle \sin(2\alpha )=B_{1}}$  ${\displaystyle ={\sqrt {1-A_{1}^{2}}}}$  ${\displaystyle ={\sqrt {1-(2AA-1)^{2}}}}$  ${\displaystyle ={\sqrt {1-(4AAAA-4AA+1)}}}$  ${\displaystyle ={\sqrt {4AA-4AAAA}}}$  ${\displaystyle =2A{\sqrt {1-AA}}=2AB}$

${\displaystyle \sin(2\alpha )=2\sin \alpha \cos \alpha .}$

${\displaystyle \cos(3\alpha )=\cos \angle POR}$  ${\displaystyle =A_{1}A+B_{1}(-B)}$  ${\displaystyle =(2AA-1)A+2AB(-B)}$  ${\displaystyle =2AAA-A-2A(BB)}$  ${\displaystyle =2AAA-A-2A(1-AA)}$  ${\displaystyle =2AAA-A-2A+2AAA}$  ${\displaystyle =4A^{3}-3A.}$

${\displaystyle \cos(3\alpha )=4\cos ^{3}\alpha -3\cos \alpha .}$

3. ${\displaystyle \sin(\alpha -\beta )}$  using direction cosines

Figure 4. sin(α-β) using direction cosines.
${\displaystyle OP=OQ=1.}$
All values ${\displaystyle [A_{1},B_{1}],\ [A_{2},B_{2}]}$  are direction cosines
${\displaystyle \sin(\alpha -\beta )=PR=A_{2}B_{1}-B_{2}A_{1}.}$

See Figure 4.

Lines ${\displaystyle OP,OQ}$  are defined as ${\displaystyle (0,0),[A_{1},B_{1}];}$  ${\displaystyle (0,0),[A_{2},B_{2}]}$  respectively.

${\displaystyle OP=OQ=1.}$

${\displaystyle \angle POX=\alpha ;}$  ${\displaystyle \angle QOX=\beta ;}$  ${\displaystyle \angle POQ=\alpha -\beta .}$

Line ${\displaystyle OQ}$  has equation ${\displaystyle A_{2}y-B_{2}x=0.}$

Point ${\displaystyle P}$  has coordinates ${\displaystyle (A_{1},B_{1}).}$

Length ${\displaystyle PR=A_{2}B_{1}-B_{2}A_{1}}$  ${\displaystyle =\sin(\alpha -\beta )}$  ${\displaystyle =\sin \alpha \cos \beta -\cos \alpha \sin \beta .}$

4. Bisect angle between lines using direction cosines

Figure 5. Bisect an angle using direction cosines.
Line ${\displaystyle OQ}$  bisects ${\displaystyle \angle POR.}$
Line ${\displaystyle OQ}$  has direction numbers ${\displaystyle [B_{2}-B_{1},A_{1}-A_{2}].}$

See Figure 5. The aim is to produce line ${\displaystyle OQ,}$  the bisector of ${\displaystyle \angle POR.}$

Lines ${\displaystyle OP,OR}$  are defined as ${\displaystyle (0,0),[A_{1},B_{1}]}$  and ${\displaystyle (0,0),[A_{2},B_{2}]}$  respectively.

Ensure that all values ${\displaystyle A_{1},B_{1},A_{2},B_{2}}$  are direction cosines. At least one of ${\displaystyle A_{1},B_{1}}$  and one of ${\displaystyle A_{2},B_{2}}$  are non-zero.

Let line ${\displaystyle OQ}$  have direction numbers ${\displaystyle [A,B].}$

${\displaystyle \angle POQ=\angle QOR.}$

${\displaystyle A_{1}A+B_{1}B=A_{2}A+B_{2}B.}$

${\displaystyle B_{1}B-B_{2}B=A_{2}A-A_{1}A.}$

${\displaystyle B(B_{1}-B_{2})=A(A_{2}-A_{1}).}$

Slope of line ${\displaystyle OQ={\frac {B}{A}}={\frac {A_{2}-A_{1}}{B_{1}-B_{2}}}.}$

Let line ${\displaystyle OQ}$  have direction numbers ${\displaystyle [A,B]=[B_{1}-B_{2},\ A_{2}-A_{1}].}$

if ${\displaystyle A\ ==\ 0\ :}$  ${\displaystyle \ \#\ B_{1}}$  equals ${\displaystyle B_{2}.}$

${\displaystyle \ \ \ \ \ \ \ \ }$ if ${\displaystyle B\ ==\ 0\ :}$  ${\displaystyle \ \#\ A_{1}}$  equals ${\displaystyle A_{2}.}$

${\displaystyle \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \#}$  Both lines are parallel and in same direction.

${\displaystyle \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \#}$  Three lines ${\displaystyle OP,\ OQ,\ OR}$  are colinear.

${\displaystyle \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [A,\ B]\ =\ [A_{1},\ B_{1}]}$

${\displaystyle \ \ \ \ \ \ \ \ }$ else : ${\displaystyle \ \#\ A_{1}\ }$ equals${\displaystyle \ -A_{2}.}$

${\displaystyle \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [A,\ B]\ =\ [0,\ 1]\ \#}$  The ${\displaystyle Y}$  axis.

elif${\displaystyle \ B\ ==\ 0\ :}$  ${\displaystyle \ \#\ A_{1}\ }$ equals${\displaystyle \ A_{2}.\ B_{1}\ }$ equals${\displaystyle \ -B_{2}.}$

${\displaystyle \ \ \ \ \ \ \ \ [A,\ B]\ =\ [1,\ 0]\ \#}$  The ${\displaystyle X}$  axis.

elif${\displaystyle \ B_{2}\ ==\ -B_{1}\ :}$  ${\displaystyle \ \#\ A_{2}\ }$ equals${\displaystyle \ -A_{1}.}$

${\displaystyle \ \ \ \ \ \ \ \ \#}$  The lines are parallel and in opposite directions.

${\displaystyle \ \ \ \ \ \ \ \#\ [A,\ B]\ =\ [B_{1}-(-B_{1}),\ -A_{1}-A_{1}]\ =\ [2B_{1},\ -2A_{1}]}$

${\displaystyle \ \ \ \ \ \ \ \ [A,\ B]\ =\ [B_{1},\ -A_{1}]\ \#}$  The normal to line ${\displaystyle OP}$  or line ${\displaystyle OR.}$

else :

${\displaystyle \ \ \ \ \ \ \ \ root\ =\ {\sqrt {A^{2}+B^{2}}}}$

${\displaystyle \ \ \ \ \ \ \ \ A\ =\ {\frac {A}{root}};\ B\ =\ {\frac {B}{root}}}$

${\displaystyle \cos \angle QOX=A;}$  ${\displaystyle \sin \angle QOX=B.}$

5. ${\displaystyle \sin(\alpha +\beta )}$  using direction cosines.

Figure 6. sin(α+β) using direction cosines.
${\displaystyle OP=OR=1.}$
${\displaystyle \cos \alpha =A_{1};\ \sin \alpha =B_{1}.}$
${\displaystyle \cos \beta =A_{2};\ \sin \beta =B_{2}.}$
${\displaystyle \cos(\alpha +\beta )=A_{1}A_{2}-B_{1}B_{2}.}$
${\displaystyle \sin(\alpha +\beta )=B_{1}A_{2}+A_{1}B_{2}.}$

See Figure 6.

${\displaystyle OP=OR=1.}$

Point ${\displaystyle Q}$  has coordinates ${\displaystyle (A_{1}A_{2},B_{1}A_{2}).}$

Line ${\displaystyle QP}$  is defined as ${\displaystyle (A_{1}A_{2},B_{1}A_{2}),[-B_{1},A_{1}].}$  Length ${\displaystyle QP=B_{2}.}$

Point ${\displaystyle P}$  has coordinates ${\displaystyle (x=A_{1}A_{2}+B_{2}(-B_{1}),y=B_{1}A_{2}+B_{2}A_{1}).}$

${\displaystyle \cos(\alpha +\beta )=x=\cos \alpha \cos \beta -\sin \alpha \sin \beta .}$

${\displaystyle \sin(\alpha +\beta )=y=\sin \alpha \cos \beta +\cos \alpha \sin \beta .}$

Go to top of this section "Direction Cosines."

Go to top of first section "Line in Cartesian Geometry."

Go to top of page ["Line (Geometry)."]

Intercept form of Line

Figure 1. Intercept form of line.
Intercepts are ${\displaystyle (-24,0),\ (0,16).}$
Green line has equation ${\displaystyle {\frac {x}{-24}}+{\frac {y}{16}}=1.}$

The general equation of the straight line is: ${\displaystyle Ax+By+C=0}$  where at least one of ${\displaystyle A,B}$  is non-zero.

The intercept form of the line requires that all of ${\displaystyle A,B,C}$  be non-zero.

${\displaystyle Ax+By+C=0}$

${\displaystyle Ax+By=-C}$

${\displaystyle {\frac {A}{-C}}x+{\frac {B}{-C}}y=1}$

${\displaystyle {\frac {x}{-C/A}}+{\frac {y}{-C/B}}=1}$

${\displaystyle Ax+By+C=0}$

If ${\displaystyle (y==0)\ x=-{\frac {C}{A}}.}$

If ${\displaystyle (x==0)\ y=-{\frac {C}{B}}.}$

Let ${\displaystyle a=-{\frac {C}{A}},\ b=-{\frac {C}{B}}.}$  The line passes through the points ${\displaystyle (a,0),(0,b)}$  where ${\displaystyle a}$  is the ${\displaystyle x}$  intercept and ${\displaystyle b}$  is the ${\displaystyle y}$  intercept.

The equation ${\displaystyle {\frac {x}{-C/A}}+{\frac {y}{-C/B}}=1}$  becomes ${\displaystyle {\frac {x}{a}}+{\frac {y}{b}}=1,}$  the intercept form of the equation.

See Figure 1. In this example ${\displaystyle a=-24,\ b=16.}$

The green line has equation ${\displaystyle {\frac {x}{-24}}+{\frac {y}{16}}=1.}$

Go to top of this section "Intercept form of Line."

Go to top of first section "Line in Cartesian Geometry."

Go to top of page ["Line (Geometry)."]

Angle of Intersection

Figure 1. Intersection of two Lines.
Given lines ${\displaystyle OJ,OK}$  calculate ${\displaystyle \angle JOK=\angle JOX-\angle KOX.}$

See Figure 1.

Given line ${\displaystyle OJ}$  with equation ${\displaystyle Ax+By+C=0}$  in which at least 1 of ${\displaystyle A,B}$  is non-zero and line ${\displaystyle OK}$  with equation ${\displaystyle Dx+Ey+F=0}$  in which at least 1 of ${\displaystyle D,E}$  is non-zero, the aim is to calculate ${\displaystyle \angle JOK.}$

Let line ${\displaystyle OJ}$  have slope ${\displaystyle m_{1}=-{\frac {A}{B}}}$  and

Let line ${\displaystyle OK}$  have slope ${\displaystyle m_{2}=-{\frac {D}{E}}.}$

Using ${\displaystyle \tan(A-B)={\frac {\tan(A)-\tan(B)}{1+\tan(A)\tan(B)}},}$

${\displaystyle \tan(\angle JOK)={\frac {m_{1}-m_{2}}{1+m_{1}m_{2}}}={\frac {BD-AE}{BE+AD}}}$  which can never have the value ${\displaystyle {\frac {0}{0}}.}$

If ${\displaystyle (BD-AE==0),\ \tan(\angle JOK)=0,\ \angle JOK=0}$  and the two lines are parallel. Also:

${\displaystyle \ \ \ \ \ \ \ \ \ \ BD=AE;\ {\frac {D}{E}}={\frac {A}{B}};\ m_{1}=m_{2}.}$

If ${\displaystyle (BE+AD==0),\ \angle JOK=90}$ ° and the two lines are perpendicular. Also:

${\displaystyle \ \ \ \ \ \ \ \ \ \ }$ If ${\displaystyle (BE==AD),\ BE=AD=0}$  and each line is parallel to an axis, else:

${\displaystyle \ \ \ \ \ \ \ \ \ \ AD=-BE;\ {\frac {AD}{BE}}=-1;\ m_{1}m_{2}={\frac {AD}{BE}}.}$  If ${\displaystyle BE}$  is non-zero and ${\displaystyle m_{1}m_{2}==-1,}$  the lines are perpendicular.

Go to top of this section "Angle of Intersection."

Go to top of first section "Line in Cartesian Geometry."

Go to top of page ["Line (Geometry)."]