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
edit
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
y
=
2
x
+
1
{\displaystyle y=2x+1}
or
x
=
−
2
{\displaystyle x=-2}
."
"You can't see the whole line
x
=
−
2
{\displaystyle x=-2}
. At best all you can see is a segment of the line between
y
=
−
5
,
y
=
5.
{\displaystyle y=-5,\ y=5.}
"
"Are the limits
5
,
−
5
{\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
y
=
1
2
x
+
1
{\displaystyle y={\frac {1}{2}}x+1}
,
but it could represent the line
y
=
0.49999999999
x
+
1.000000000001
{\displaystyle y=0.49999999999x+1.000000000001}
."
A second answer might be: "Too many for the current discussion. After all, the character
−
4
{\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
y
=
0.5
x
+
1
{\displaystyle y=0.5x+1}
, a blue line with equation
y
=
0.5
x
−
1
{\displaystyle y=0.5x-1}
and a green line with equation
y
=
2
x
+
1.
{\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
(
−
2
,
−
2
)
,
(
0
,
−
1
)
,
(
2
,
0
)
{\displaystyle (-2,-2),(0,-1),(2,0)}
and it has equation
y
=
f
(
x
)
=
A
x
2
+
B
x
+
C
{\displaystyle y=f(x)=Ax^{2}+Bx+C}
.
Calculate the values of
A
,
B
,
C
{\displaystyle A,B,C}
:
−
2
=
A
(
−
2
)
2
+
B
(
−
2
)
+
C
;
4
A
−
2
B
+
C
=
−
2
{\displaystyle -2=A(-2)^{2}+B(-2)+C;\ 4A-2B+C=-2}
−
1
=
A
(
0
)
2
+
B
(
0
)
+
C
;
C
=
−
1
{\displaystyle -1=A(0)^{2}+B(0)+C;\ C=-1}
0
=
A
(
2
)
2
+
B
(
2
)
+
C
;
4
A
+
2
B
+
C
=
0
{\displaystyle 0=A(2)^{2}+B(2)+C;\ 4A+2B+C=0}
4
A
−
2
B
+
(
−
1
)
=
−
2
;
4
A
−
2
B
=
−
1
…
(
1
)
{\displaystyle 4A-2B+(-1)=-2;\ 4A-2B=-1\ \dots \ (1)}
4
A
+
2
B
+
(
−
1
)
=
0
;
4
A
+
2
B
=
1
…
(
2
)
{\displaystyle 4A+2B+(-1)=0;\ 4A+2B=1\ \dots \ (2)}
(
1
)
+
(
2
)
,
A
=
0.
{\displaystyle (1)+(2),\ A=0.}
(
2
)
−
(
1
)
,
4
B
=
2
;
B
=
1
2
{\displaystyle (2)-(1),\ 4B=2;\ B={\frac {1}{2}}}
and the equation of the blue line becomes:
y
=
(
0
)
x
2
+
(
1
2
)
x
+
(
−
1
)
=
1
2
x
−
1
{\displaystyle y=(0)x^{2}+({\frac {1}{2}})x+(-1)={\frac {1}{2}}x-1}
. This equation has the form
y
=
m
x
+
g
{\displaystyle y=mx+g}
where:
m
=
{\displaystyle m=}
slope of blue line
=
1
2
{\displaystyle ={\frac {1}{2}}}
and
g
=
{\displaystyle g=}
the
y
i
n
t
e
r
c
e
p
t
=
−
1
{\displaystyle y\ intercept=-1}
, the value of
y
{\displaystyle y}
at the point
(
0
,
−
1
)
{\displaystyle (0,-1)}
where the line and the
y
a
x
i
s
{\displaystyle y\ axis}
intersect.
The red and green lines both intersect the
y
a
x
i
s
(
x
=
0
)
{\displaystyle y\ axis\ (x=0)}
at the point
(
0
,
1
)
{\displaystyle (0,1)}
. The
y
{\displaystyle y}
intercept is
1
{\displaystyle 1}
.
The red line has equation
y
=
m
1
x
+
1.
{\displaystyle y=m_{1}x+1.}
The green line has equation
y
=
m
2
x
+
1.
{\displaystyle y=m_{2}x+1.}
Slope of line
Figure 2. Slope of line illustrated. When
x
{\displaystyle x}
increases by
2
{\displaystyle 2}
units,
y
{\displaystyle y}
increases by
3
{\displaystyle 3}
units. Slope of oblique line
=
m
=
3
2
.
{\displaystyle =m={\frac {3}{2}}.}
When
x
{\displaystyle x}
decreases by
4
{\displaystyle 4}
units,
y
{\displaystyle y}
decreases by
6
{\displaystyle 6}
units. Slope of oblique line
=
m
=
−
6
−
4
=
3
2
.
{\displaystyle =m={\frac {-6}{-4}}={\frac {3}{2}}.}
{\displaystyle }
See Figure 2. The oblique line passes through points
(
x
1
,
y
1
)
=
(
−
2
,
−
4
)
,
(
x
2
,
y
2
)
=
(
0
,
−
1
)
.
{\displaystyle (x_{1},y_{1})=(-2,-4),\ (x_{2},y_{2})=(0,-1).}
m
=
y
2
−
y
1
x
2
−
x
1
=
−
1
−
(
−
4
)
0
−
(
−
2
)
=
3
2
.
{\displaystyle m={\frac {y_{2}-y_{1}}{x_{2}-x_{1}}}={\frac {-1-(-4)}{0-(-2)}}={\frac {3}{2}}.}
The oblique line has equation
y
=
3
2
x
+
g
{\displaystyle y={\frac {3}{2}}x+g}
and it passes through the point
(
−
2
,
−
4
)
.
g
=
y
−
3
2
x
=
−
4
−
3
2
(
−
2
)
=
−
4
+
3
=
−
1.
{\displaystyle (-2,-4).\ g=y-{\frac {3}{2}}x=-4-{\frac {3}{2}}(-2)=-4+3=-1.}
The
y
{\displaystyle y}
intercept is
−
1
{\displaystyle -1}
and:
Oblique line has equation
y
=
3
2
x
−
1.
{\displaystyle y={\frac {3}{2}}x-1.}
Back to Figure 1. By inspection,
m
1
=
1
2
{\displaystyle m_{1}={\frac {1}{2}}}
and the red line has equation
y
=
1
2
x
+
1
,
m
2
=
2
{\displaystyle y={\frac {1}{2}}x+1,\ m_{2}=2}
and
the green line has equation
y
=
2
x
+
1.
{\displaystyle y=2x+1.}
Parallel lines
Figure 3. Parallel lines in the Cartesian plane. The 3 colored lines all have slope
1
2
{\displaystyle {\frac {1}{2}}}
. Each colored line has equation:
y
=
1
2
x
+
g
.
{\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
(
1
2
)
.
{\displaystyle ({\frac {1}{2}}).}
Remember that the lines
x
=
−
4
;
x
=
−
3
;
…
x
=
4
{\displaystyle x=-4;\ x=-3;\ \dots \ x=4}
are all parallel, as are the lines
y
=
−
4
;
y
=
−
3
;
…
y
=
4.
{\displaystyle y=-4;\ y=-3;\ \dots \ y=4.}
Lines with same
y
{\displaystyle y}
intercept
Figure 4. Lines with same
y
{\displaystyle y}
intercept. The 3 colored lines all pass through point
(
0
,
1
)
{\displaystyle (0,1)}
. They have the same
y
{\displaystyle y}
intercept. Each colored line has equation:
y
=
m
x
+
1.
{\displaystyle y=mx+1.}
See Figure 4. The colored lines represent the family of lines that pass through the point
(
0
,
1
)
{\displaystyle (0,1)}
. There is one exception. The line
x
=
0
{\displaystyle x=0}
passes through the point
(
0
,
1
)
{\displaystyle (0,1)}
but it cannot be represented by the equation
y
=
m
x
+
1.
{\displaystyle y=mx+1.}
Note the red line. As
x
{\displaystyle x}
increases,
y
{\displaystyle y}
decreases, and the line goes down from left to right. Slope of the line is
−
1
5
{\displaystyle {\frac {-1}{5}}}
and line has equation
y
=
−
1
5
x
+
1.
{\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
edit
Figure 1. Line as locus of point equidistant from 2 fixed points. Any point on line
J
P
{\displaystyle JP}
is equidistant from points
G
,
H
.
{\displaystyle G,H.}
P
G
=
P
H
.
J
G
=
J
H
.
{\displaystyle PG=PH.\ JG=JH.}
{\displaystyle }
{\displaystyle }
{\displaystyle }
{\displaystyle }
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
G
,
H
{\displaystyle G,H}
and the length
G
H
{\displaystyle GH}
is non-zero. By definition length
P
G
{\displaystyle PG}
= length
P
H
.
{\displaystyle PH.}
Let points
P
,
G
,
H
{\displaystyle P,G,H}
have coordinates
(
x
,
y
)
,
(
s
,
t
)
,
(
u
,
v
)
.
{\displaystyle (x,y),(s,t),(u,v).}
Length
P
G
=
(
x
−
s
)
2
+
(
y
−
t
)
2
{\displaystyle PG={\sqrt {(x-s)^{2}+(y-t)^{2}}}}
Length
P
H
=
(
x
−
u
)
2
+
(
y
−
v
)
2
{\displaystyle PH={\sqrt {(x-u)^{2}+(y-v)^{2}}}}
P
G
=
P
H
.
{\displaystyle PG=PH.}
Therefore:
(
x
−
s
)
2
+
(
y
−
t
)
2
=
(
x
−
u
)
2
+
(
y
−
v
)
2
{\displaystyle {\sqrt {(x-s)^{2}+(y-t)^{2}}}={\sqrt {(x-u)^{2}+(y-v)^{2}}}}
(
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}}
(
x
−
s
)
2
+
(
y
−
t
)
2
−
(
(
x
−
u
)
2
+
(
y
−
v
)
2
)
=
0
{\displaystyle (x-s)^{2}+(y-t)^{2}-(\ (x-u)^{2}+(y-v)^{2}\ )=0}
Expand and the result is:
2
(
u
−
s
)
x
+
2
(
v
−
t
)
y
+
s
s
+
t
t
−
u
u
−
v
v
=
0
{\displaystyle 2(u-s)x+2(v-t)y+ss+tt-uu-vv=0}
This equation has the form:
A
x
+
B
y
+
C
=
0
{\displaystyle Ax+By+C=0}
where:
A
=
2
(
u
−
s
)
;
B
=
2
(
v
−
t
)
;
C
=
s
2
+
t
2
−
u
2
−
v
2
.
{\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
J
P
{\displaystyle JP}
has equation
5
x
−
12
y
+
15
=
0.
{\displaystyle 5x-12y+15=0.}
If defined as the locus of a point equidistant from points
(
s
,
t
)
=
(
2
,
−
12
)
,
(
u
,
v
)
=
(
−
8
,
12
)
,
{\displaystyle (s,t)=(2,-12),\ (u,v)=(-8,12),}
the calculation of
A
,
B
,
C
{\displaystyle A,B,C}
produces
the equation
−
20
x
+
48
y
−
60
=
0.
{\displaystyle -20x+48y-60=0.}
If defined as the locus of a point equidistant from points
(
s
,
t
)
=
(
−
1
,
29
)
,
(
u
,
v
)
=
(
19
,
−
19
)
,
{\displaystyle (s,t)=(-1,29),\ (u,v)=(19,-19),}
the calculation of
A
,
B
,
C
{\displaystyle A,B,C}
produces
the equation
40
x
−
96
y
+
120
=
0.
{\displaystyle 40x-96y+120=0.}
Distance from point to line
Length
G
H
=
(
u
−
s
)
2
+
(
v
−
t
)
2
=
(
A
2
)
2
+
(
B
2
)
2
=
1
2
A
2
+
B
2
{\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
G
H
{\displaystyle GH}
is non-zero. Therefore, at least one of
A
,
B
{\displaystyle A,B}
must be non-zero.
Length
G
J
=
1
4
A
2
+
B
2
=
{\displaystyle GJ={\frac {1}{4}}{\sqrt {A^{2}+B^{2}}}=}
distance from point
G
{\displaystyle G}
to line.
Consider the expression
A
x
+
B
y
+
C
{\displaystyle Ax+By+C}
and substitute
(
u
,
v
)
{\displaystyle (u,v)}
for
(
x
,
y
)
.
{\displaystyle (x,y).}
We show that
A
u
+
B
v
+
C
=
A
2
+
B
2
4
{\displaystyle Au+Bv+C={\frac {A^{2}+B^{2}}{4}}}
or
4
(
A
u
+
B
v
+
C
)
=
A
2
+
B
2
.
{\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
A
u
+
B
v
+
C
A
2
+
B
2
=
A
2
+
B
2
4
=
{\displaystyle {\frac {Au+Bv+C}{\sqrt {A^{2}+B^{2}}}}={\frac {\sqrt {A^{2}+B^{2}}}{4}}=}
distance from point
H
{\displaystyle H}
to line.
Similarly we can show that
A
s
+
B
t
+
C
A
2
+
B
2
=
−
1
4
A
2
+
B
2
=
{\displaystyle {\frac {As+Bt+C}{\sqrt {A^{2}+B^{2}}}}=-{\frac {1}{4}}{\sqrt {A^{2}+B^{2}}}=}
distance from point
G
{\displaystyle G}
to line.
If the equation of the line has form:
A
x
+
B
y
+
C
A
2
+
B
2
=
0
{\displaystyle {\frac {Ax+By+C}{\sqrt {A^{2}+B^{2}}}}=0}
then
A
A
2
+
B
2
x
+
B
A
2
+
B
2
y
+
C
A
2
+
B
2
=
0
{\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
x
)
2
+
(
{\displaystyle x)^{2}+(}
coefficient of
y
)
2
{\displaystyle y)^{2}}
=
A
2
A
2
+
B
2
+
B
2
A
2
+
B
2
=
A
2
+
B
2
A
2
+
B
2
=
1.
{\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
A
x
+
B
y
+
C
=
0
{\displaystyle Ax+By+C=0}
has
A
2
+
B
2
=
1
,
{\displaystyle A^{2}+B^{2}=1,}
the distance from point
(
s
,
t
)
{\displaystyle (s,t)}
to the line is
A
s
+
B
t
+
C
,
{\displaystyle As+Bt+C,}
the distance from point
(
u
,
v
)
{\displaystyle (u,v)}
to the line is
A
u
+
B
v
+
C
,
{\displaystyle Au+Bv+C,}
and
A
s
+
B
t
+
C
=
−
(
A
u
+
B
v
+
C
)
.
{\displaystyle As+Bt+C=-(Au+Bv+C).}
Length
G
J
{\displaystyle GJ}
and length
H
J
{\displaystyle HJ}
have the same absolute value with opposite signs.
Use of multiplier K
Consider the equation
A
u
+
B
v
+
C
A
2
+
B
2
=
A
2
+
B
2
4
.
{\displaystyle {\frac {Au+Bv+C}{\sqrt {A^{2}+B^{2}}}}={\frac {\sqrt {A^{2}+B^{2}}}{4}}.}
If
(
A
2
+
B
2
==
1
)
,
{\displaystyle (A^{2}+B^{2}==1),}
this doesn't make sense.
To make sense of the relationship introduce a multiplier
K
.
A
,
B
,
C
{\displaystyle K.\ A,B,C}
become
K
A
,
K
B
,
K
C
{\displaystyle KA,KB,KC}
and the relationship is:
K
A
u
+
K
B
v
+
K
C
(
K
A
)
2
+
(
K
B
)
2
=
(
K
A
)
2
+
(
K
B
)
2
4
{\displaystyle {\frac {KAu+KBv+KC}{\sqrt {(KA)^{2}+(KB)^{2}}}}={\frac {\sqrt {(KA)^{2}+(KB)^{2}}}{4}}}
K
(
A
u
+
B
v
+
C
)
K
(
A
)
2
+
(
B
)
2
=
K
(
A
)
2
+
(
B
)
2
4
{\displaystyle {\frac {K(Au+Bv+C)}{K{\sqrt {(A)^{2}+(B)^{2}}}}}={\frac {K{\sqrt {(A)^{2}+(B)^{2}}}}{4}}}
If
(
A
2
+
B
2
==
1
)
,
A
u
+
B
v
+
C
=
K
4
.
{\displaystyle (A^{2}+B^{2}==1),\ Au+Bv+C={\frac {K}{4}}.}
Consider the line
3
5
x
+
4
5
y
+
4
=
0
{\displaystyle {\frac {3}{5}}x+{\frac {4}{5}}y+4=0}
and the point
(
7
,
−
4
)
.
{\displaystyle (7,-4).}
3
5
(
7
)
+
4
5
(
−
4
)
+
4
=
5
=
K
4
.
K
=
20.
{\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
20
(
3
5
x
+
4
5
y
+
4
)
=
12
x
+
16
y
+
80
=
0
,
{\displaystyle 20({\frac {3}{5}}x+{\frac {4}{5}}y+4)=12x+16y+80=0,}
the equation makes sense, but the
L
H
S
{\displaystyle LHS}
doesn't change.
L
H
S
=
12
(
7
)
+
16
(
−
4
)
+
80
12
2
+
16
2
=
84
−
64
+
80
20
=
100
20
=
5
;
R
H
S
=
20
4
=
5.
{\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.}
L
H
S
=
R
H
S
=
5
,
{\displaystyle \ LHS=RHS=5,}
the distance from point
(
7
,
−
4
)
{\displaystyle (7,-4)}
to the line as calculated above
with equation
3
5
x
+
4
5
y
+
4
=
0.
{\displaystyle {\frac {3}{5}}x+{\frac {4}{5}}y+4=0.}
Calculation of the equation of the line equidistant from points
(
7
,
−
4
)
,
(
1
,
−
12
)
{\displaystyle (7,-4),(1,-12)}
initially produces:
12
x
+
16
y
+
80
=
0.
{\displaystyle 12x+16y+80=0.}
Calculation of the equation of the line equidistant from points
(
10
,
0
)
,
(
−
2
,
−
16
)
{\displaystyle (10,0),(-2,-16)}
initially produces:
24
x
+
32
y
+
160
=
0.
{\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)." ]
Figure 1. Graph illustrating normal form of straight line.
∠
X
O
N
=
{\displaystyle \angle XON=}
ω.
x
cos
{\displaystyle x\ \cos }
ω
+
y
sin
{\displaystyle +\ y\ \sin }
ω
−
p
=
0.
{\displaystyle -\ p=0.}
At point
N
{\displaystyle N}
:
−
12
(
−
3
5
)
+
16
(
4
5
)
=
20
=
p
.
{\displaystyle :\ -12(-{\frac {3}{5}})+16({\frac {4}{5}})=20=p.}
See Figure 1. The green line through point
N
{\displaystyle N}
has equation
y
=
3
4
x
+
25
{\displaystyle y={\frac {3}{4}}x+25}
or
−
3
5
x
+
4
5
y
−
20
=
0.
{\displaystyle -{\frac {3}{5}}x+{\frac {4}{5}}y-20=0.}
The normal
O
N
{\displaystyle ON}
to the line from the origin has length
p
=
20.
{\displaystyle p=20.}
Let
∠
X
O
N
=
{\displaystyle \angle XON=}
ω
.
cos
{\displaystyle .\ \cos }
ω
=
−
3
5
.
sin
{\displaystyle ={\frac {-3}{5}}.\ \sin }
ω
=
4
5
.
{\displaystyle ={\frac {4}{5}}.}
The normal
O
N
{\displaystyle ON}
to the line is in the quadrant where cosine
(
−
3
5
)
{\displaystyle (-{\frac {3}{5}})}
is negative and sine
(
4
5
)
{\displaystyle ({\frac {4}{5}})}
is positive.
The normal form of the equation is
x
cos
{\displaystyle x\ \cos }
ω
+
y
sin
{\displaystyle +\ y\ \sin }
ω
−
p
=
0
{\displaystyle -\ p=0}
or
x
(
−
3
5
)
+
y
(
4
5
)
−
20
=
0.
{\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
=
N
O
=
−
p
=
−
20.
{\displaystyle =NO=-p=-20.}
Directed distance from origin to line
=
O
N
=
p
=
20.
{\displaystyle =ON=p=20.}
Components of the normal form
Figure 2. Composition of normal form with point
P
{\displaystyle P}
on line.
O
D
=
x
cos
{\displaystyle OD=x\ \cos }
ω;
D
N
=
y
sin
{\displaystyle DN=y\ \sin }
ω.
O
D
+
D
N
=
O
N
=
p
.
{\displaystyle OD+DN=ON=p.}
{\displaystyle }
{\displaystyle }
{\displaystyle }
See Figure 2. This example shows line
3
5
x
+
4
5
y
−
20
=
0
{\displaystyle {\frac {3}{5}}x+{\frac {4}{5}}y-20=0}
with point
P
{\displaystyle P}
on the line.
The normal to the line is in the quadrant where cosine
(
0.6
)
{\displaystyle (0.6)}
is positive and sine
(
0.8
)
{\displaystyle (0.8)}
is positive.
∠
X
O
N
=
{\displaystyle \angle XON=}
ω
=
∠
E
X
P
.
{\displaystyle =\ \angle EXP.}
cos
{\displaystyle \cos }
ω
=
3
5
;
sin
{\displaystyle ={\frac {3}{5}};\ \sin }
ω
=
4
5
.
O
N
{\displaystyle ={\frac {4}{5}}.\ ON}
is the normal with length
p
=
20.
{\displaystyle p=20.}
Point
P
{\displaystyle P}
has coordinates
(
20
,
10
)
.
{\displaystyle (20,10).}
O
X
=
x
=
20.
O
D
O
X
=
cos
{\displaystyle OX=x=20.\ {\frac {OD}{OX}}=\cos }
ω
=
O
D
x
;
O
D
=
x
cos
{\displaystyle ={\frac {OD}{x}};\ OD=x\ \cos }
ω
=
20
(
3
5
)
=
12.
{\displaystyle =20({\frac {3}{5}})=12.}
X
P
=
y
=
10.
E
P
X
P
=
sin
{\displaystyle XP=y=10.\ {\frac {EP}{XP}}=\sin }
ω
=
E
P
y
;
E
P
=
y
sin
{\displaystyle ={\frac {EP}{y}};\ EP=y\ \sin }
ω
=
10
(
4
5
)
=
8.
{\displaystyle =10({\frac {4}{5}})=8.}
D
N
=
E
P
=
8.
{\displaystyle DN=EP=8.}
O
D
+
D
N
=
12
+
8
=
20
=
p
.
{\displaystyle OD+DN=12+8=20=p.}
The point
P
{\displaystyle P}
is on the line.
Figure 3. Composition of normal form with point
P
{\displaystyle P}
not on line.
O
D
=
x
cos
{\displaystyle OD=x\ \cos }
ω;
D
P
1
=
y
sin
{\displaystyle DP_{1}=y\ \sin }
ω.
O
P
1
=
O
D
+
D
P
1
=
10.5.
{\displaystyle OP_{1}=OD+DP_{1}=10.5.}
Points
P
,
P
1
{\displaystyle P,P_{1}}
are
−
9.5
{\displaystyle -9.5}
from green line through
N
.
{\displaystyle N.}
See Figure 3. This example shows line
3
5
x
−
4
5
y
−
20
=
0
{\displaystyle {\frac {3}{5}}x-{\frac {4}{5}}y-20=0}
with point
P
{\displaystyle P}
not on the line.
The normal to the line is in the quadrant where cosine
(
0.6
)
{\displaystyle (0.6)}
is positive and sine
(
−
0.8
)
{\displaystyle (-0.8)}
is negative.
{\displaystyle }
{\displaystyle }
{\displaystyle }
∠
X
O
N
=
{\displaystyle \angle XON=}
ω.
cos
{\displaystyle \cos }
ω
=
3
5
;
sin
{\displaystyle ={\frac {3}{5}};\ \sin }
ω
=
−
4
5
.
O
N
{\displaystyle =-{\frac {4}{5}}.\ ON}
is the normal with length
p
=
20.
{\displaystyle p=20.}
Point
P
{\displaystyle P}
has coordinates
(
27.5
,
7.5
)
.
{\displaystyle (27.5,7.5).}
O
X
=
x
=
27.5.
O
D
O
X
=
cos
{\displaystyle OX=x=27.5.\ {\frac {OD}{OX}}=\cos }
ω
=
O
D
x
;
O
D
=
x
cos
{\displaystyle ={\frac {OD}{x}};\ OD=x\ \cos }
ω
=
27.5
(
3
5
)
=
16.5.
{\displaystyle =27.5({\frac {3}{5}})=16.5.}
D
P
1
=
X
E
=
y
sin
{\displaystyle DP_{1}=XE=y\ \sin }
ω
=
(
7.5
)
(
−
4
5
)
=
−
6.
{\displaystyle =(7.5)(-{\frac {4}{5}})=-6.}
The negative value for
D
P
1
{\displaystyle DP_{1}}
establishes direction towards the origin.
O
P
1
=
O
D
+
D
P
1
=
16.5
+
(
−
6
)
=
10.5.
{\displaystyle OP_{1}=OD+DP_{1}=16.5+(-6)=10.5.}
The points
P
,
P
1
{\displaystyle P,P_{1}}
are
10.5
−
20
=
−
9.5
{\displaystyle 10.5-20=-9.5}
from the line indicating
9.5
{\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
−
3
5
x
+
4
5
y
−
20
=
0
{\displaystyle -{\frac {3}{5}}x+{\frac {4}{5}}y-20=0}
and point
C
(
−
20
,
10
)
{\displaystyle C\ (-20,10)}
is on the line.
The brown line has equation
−
3
5
x
+
4
5
y
−
10
=
0
{\displaystyle -{\frac {3}{5}}x+{\frac {4}{5}}y-10=0}
and point
D
(
6
,
17
)
{\displaystyle D\ (6,17)}
is on the line.
The brown and green lines are in the quadrant where cosine
(
−
3
5
)
{\displaystyle (-{\frac {3}{5}})}
is negative and sine
(
4
5
)
{\displaystyle ({\frac {4}{5}})}
is positive.
Distance from brown line to origin
=
−
3
5
(
0
)
+
4
5
(
0
)
−
10
=
−
10.
{\displaystyle =-{\frac {3}{5}}(0)+{\frac {4}{5}}(0)-10=-10.}
Distance from green line to origin
=
−
20.
{\displaystyle =-20.}
Distance from green line to point
D
(
6
,
17
)
{\displaystyle D\ (6,17)}
=
−
3
5
(
6
)
+
4
5
(
17
)
−
20
=
−
18
5
+
68
5
−
20
=
50
5
−
20
=
−
10
,
{\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
C
(
−
20
,
10
)
=
−
3
5
(
−
20
)
+
4
5
(
10
)
−
10
=
12
+
8
−
10
=
10
,
{\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
=
−
20
−
(
−
10
)
=
−
10
,
{\displaystyle =-20-(-10)=-10,}
toward the origin.
Distance from brown line to green line
=
−
10
−
(
−
20
)
=
10
,
{\displaystyle =-10-(-20)=10,}
away from the origin.
The purple line has equation
3
5
x
−
4
5
y
−
10
=
0
{\displaystyle {\frac {3}{5}}x-{\frac {4}{5}}y-10=0}
and point
E
(
6
,
−
8
)
{\displaystyle E\ (6,-8)}
is on the line.
The purple line is in the quadrant where cosine
(
3
5
)
{\displaystyle ({\frac {3}{5}})}
is positive and sine
(
−
4
5
)
{\displaystyle (-{\frac {4}{5}})}
is negative.
The purple and brown lines are parallel, but in opposite quadrants.
Distance from brown line to point
E
(
6
,
−
8
)
=
−
3
5
(
6
)
+
4
5
(
−
8
)
−
10
=
−
18
5
−
32
5
−
10
=
−
50
5
−
10
=
−
20
,
{\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
D
(
6
,
17
)
=
3
5
(
6
)
−
4
5
(
17
)
−
10
=
18
5
−
68
5
−
10
=
−
50
5
−
10
=
−
20
,
{\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
3
5
x
−
4
5
y
+
10
=
0
,
{\displaystyle {\frac {3}{5}}x-{\frac {4}{5}}y+10=0,}
and the distance between them is
10
−
(
−
10
)
=
20.
{\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)." ]
Figure 1. Direction numbers.
[
A
1
,
B
1
]
=
[
15
,
9
]
.
{\displaystyle [A_{1},B_{1}]=[15,9].}
[
A
2
,
B
2
]
=
[
−
45
,
−
27
]
.
{\displaystyle [A_{2},B_{2}]=[-45,-27].}
Both sets of direction numbers are equivalent to
[
5
,
3
]
.
{\displaystyle [5,3].}
See Figure 1.
The red line has
x
{\displaystyle x}
intercept
(
−
15
,
0
)
{\displaystyle (-15,0)}
and
y
{\displaystyle y}
intercept
(
0
,
9
)
.
{\displaystyle (0,9).}
Slope of red line
=
9
−
0
0
−
(
−
15
)
=
9
15
=
3
5
.
{\displaystyle ={\frac {9-0}{0-(-15)}}={\frac {9}{15}}={\frac {3}{5}}.}
Red line has equation
y
=
3
5
x
+
9.
{\displaystyle y={\frac {3}{5}}x+9.}
When
x
{\displaystyle x}
increases by
1
,
y
{\displaystyle 1,\ y}
increases by
3
5
.
{\displaystyle {\frac {3}{5}}.}
The line has
d
i
r
e
c
t
i
o
n
n
u
m
b
e
r
s
[
A
,
B
]
=
[
1
,
3
5
]
{\displaystyle direction\ numbers\ [A,B]=[1,{\frac {3}{5}}]}
where
A
{\displaystyle A}
represents a change in
x
{\displaystyle x}
and
B
{\displaystyle B}
represents a corresponding change in
y
.
{\displaystyle y.}
{\displaystyle }
This section shows that the line may be defined using known
points and
d
i
r
e
c
t
i
o
n
n
u
m
b
e
r
s
.
{\displaystyle direction\ numbers.}
Consider the points
Q
:
(
5
,
12
)
,
R
:
(
20
,
21
)
.
{\displaystyle Q:(5,12),\ R:(20,21).}
The value of
x
{\displaystyle x}
at
R
{\displaystyle R}
is the value of
x
{\displaystyle x}
at
Q
+
(
20
−
5
=
15
)
.
{\displaystyle Q\ +\ (20-5=15).}
The change in
x
{\displaystyle x}
between
Q
,
R
{\displaystyle Q,R}
is represented by arrow
A
1
{\displaystyle A_{1}}
with length
15.
{\displaystyle 15.}
The value of
y
{\displaystyle y}
at
R
{\displaystyle R}
is the value of
y
{\displaystyle y}
at
Q
+
(
21
−
12
=
9
)
.
{\displaystyle Q\ +\ (21-12=9).}
The change in
y
{\displaystyle y}
between
Q
,
R
{\displaystyle Q,R}
is represented by arrow
B
1
{\displaystyle B_{1}}
with length
9.
{\displaystyle 9.}
A
1
,
B
1
{\displaystyle A_{1},B_{1}}
are the direction numbers of the red line at point
Q
.
{\displaystyle Q.}
The red line passes through point
Q
{\displaystyle Q}
with direction numbers
[
A
1
,
B
1
]
=
[
15
,
9
]
.
{\displaystyle [A_{1},B_{1}]=[15,9].}
Consider the points
R
:
(
20
,
21
)
,
P
:
(
−
25
,
−
6
)
.
A
2
=
x
P
−
x
R
=
−
25
−
20
=
−
45
;
B
2
=
y
P
−
y
R
=
−
6
−
21
=
−
27.
{\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
R
{\displaystyle R}
with direction numbers
[
A
2
,
B
2
]
=
[
−
45
,
−
27
]
.
{\displaystyle [A_{2},B_{2}]=[-45,-27].}
The direction numbers
[
15
,
9
]
,
[
−
45
,
−
27
]
{\displaystyle [15,9],[-45,-27]}
for the red line are consistent because they represent a ratio, the slope of the line.
Given the point
Q
:
(
5
,
12
)
{\displaystyle Q:(5,12)}
and direction numbers
[
A
1
,
B
1
]
=
[
15
,
9
]
,
{\displaystyle [A_{1},B_{1}]=[15,9],}
the red line can be defined
as
(
5
,
12
)
,
[
15
,
9
]
{\displaystyle (5,12),[15,9]}
and the equation of the red line is
y
−
12
x
−
5
=
9
15
=
3
5
;
5
(
y
−
12
)
=
3
(
x
−
5
)
;
5
y
−
60
=
3
x
−
15
;
3
x
−
5
y
+
45
=
0.
{\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
P
:
(
−
25
,
−
6
)
{\displaystyle P:(-25,-6)}
and direction numbers
[
A
2
,
B
2
]
=
[
−
45
,
−
27
]
,
{\displaystyle [A_{2},B_{2}]=[-45,-27],}
the red line can be defined
as
(
−
25
,
−
6
)
,
[
−
45
,
−
27
]
{\displaystyle (-25,-6),[-45,-27]}
and the equation of the red line is
y
−
(
−
6
)
x
−
(
−
25
)
=
−
27
−
45
=
3
5
;
5
(
y
+
6
)
=
3
(
x
+
25
)
;
5
y
+
30
=
3
x
+
75
;
3
x
−
5
y
+
45
=
0
,
{\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
[
15
,
9
]
,
[
−
45
,
−
27
]
{\displaystyle [15,9],[-45,-27]}
can be expressed as
[
5
,
3
]
.
{\displaystyle [5,3].}
The equation of the red line is given as:
y
=
3
5
x
+
9
,
{\displaystyle y={\frac {3}{5}}x+9,}
hence direction numbers
[
A
3
,
B
3
]
=
[
1
,
3
5
]
=
[
5
,
3
]
.
{\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
[
A
,
B
]
{\displaystyle [A,B]}
must be non-zero.
Using direction numbers
1. Format of any point.
Given a line defined as
(
x
1
,
y
1
)
,
[
A
1
,
B
1
]
{\displaystyle (x_{1},y_{1}),[A_{1},B_{1}]}
any point on the line has format:
(
x
1
+
K
A
1
,
y
1
+
K
B
1
)
.
{\displaystyle (x_{1}+KA_{1},\ y_{1}+KB_{1}).}
For example, if the red line in Figure 1 is defined as
(
5
,
12
)
,
[
5
,
3
]
,
{\displaystyle (5,12),[5,3],}
any point on the line is
(
5
+
5
K
,
12
+
3
K
)
.
{\displaystyle (5+5K,12+3K).}
If
(
K
==
−
6
)
,
{\displaystyle (K==-6),}
the point is
(
−
25
,
−
6
)
{\displaystyle (-25,-6)}
or point
P
.
{\displaystyle P.}
2. Normal to the line.
Refer to the section "Line as locus of a point" above. If the line has equation
A
x
+
B
y
+
C
=
0
,
{\displaystyle Ax+By+C=0,}
the
normal to the line has direction numbers
[
A
,
B
]
.
{\displaystyle [A,B].}
3. Point at specified distance.
Given a line defined as
(
x
1
,
y
1
)
,
[
A
1
,
B
1
]
{\displaystyle (x_{1},y_{1}),[A_{1},B_{1}]}
calculate the two points on the line at distance
d
{\displaystyle d}
from
(
x
1
,
y
1
)
.
{\displaystyle (x_{1},y_{1}).}
Let one point at distance
d
{\displaystyle d}
from
(
x
1
,
y
1
)
{\displaystyle (x_{1},y_{1})}
have coordinates
(
x
1
+
K
A
1
,
y
1
+
K
B
1
)
.
{\displaystyle (x_{1}+KA_{1},y_{1}+KB_{1}).}
Then
d
=
(
x
1
+
K
A
1
−
x
1
)
2
+
(
y
1
+
K
B
1
−
y
1
)
2
=
(
K
A
1
)
2
+
(
K
B
1
)
2
=
±
K
A
1
2
+
B
1
2
{\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}}}}
K
=
±
d
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
(
−
15
,
0
)
,
[
5
,
3
]
{\displaystyle (-15,0),[5,3]}
calculate the two points on the line at
distance
d
=
3
34
{\displaystyle d=3{\sqrt {34}}}
from
(
−
15
,
0
)
.
{\displaystyle (-15,0).}
K
=
±
3
34
5
2
+
3
2
=
±
3
34
34
=
±
3.
{\displaystyle K={\frac {\pm 3{\sqrt {34}}}{\sqrt {5^{2}+3^{2}}}}={\frac {\pm 3{\sqrt {34}}}{\sqrt {34}}}=\pm 3.}
The points are:
(
−
15
+
3
(
5
)
,
0
+
3
(
3
)
)
,
(
−
15
−
3
(
5
)
,
0
−
3
(
3
)
)
{\displaystyle (-15+3(5),0+3(3)),\ (-15-3(5),0-3(3))}
or
(
0
,
9
)
,
(
−
30
,
−
9
)
.
{\displaystyle (0,9),\ (-30,-9).}
4. Point at intersection of two lines.
Let one line have equation
A
x
+
B
y
+
C
=
0
{\displaystyle Ax+By+C=0}
and let the other be defined as
(
x
1
,
y
1
)
,
[
A
1
,
B
1
]
.
{\displaystyle (x_{1},y_{1}),[A_{1},B_{1}].}
Any point on the second line has format
(
x
1
+
K
A
1
,
y
1
+
K
B
1
)
.
{\displaystyle (x_{1}+KA_{1},\ y_{1}+KB_{1}).}
The point
(
x
1
+
K
A
1
,
y
1
+
K
B
1
)
{\displaystyle (x_{1}+KA_{1},\ y_{1}+KB_{1})}
satisfies the first equation. Therefore:
A
(
x
1
+
K
A
1
)
+
B
(
y
1
+
K
B
1
)
+
C
=
0
{\displaystyle A(x_{1}+KA_{1})+B(y_{1}+KB_{1})+C=0}
A
x
1
+
A
K
A
1
+
B
y
1
+
B
K
B
1
+
C
=
0
{\displaystyle \ Ax_{1}+AKA_{1}+By_{1}+BKB_{1}+C=0}
K
(
A
A
1
+
B
B
1
)
=
−
(
A
x
1
+
B
y
1
+
C
)
{\displaystyle \ K(AA_{1}+BB_{1})=-(Ax_{1}+By_{1}+C)}
K
=
−
(
A
x
1
+
B
y
1
+
C
)
A
A
1
+
B
B
1
.
{\displaystyle K={\frac {-(Ax_{1}+By_{1}+C)}{AA_{1}+BB_{1}}}.}
If
(
A
A
1
+
B
B
1
==
0
)
,
{\displaystyle (AA_{1}+BB_{1}==0),}
the lines are parallel.
5. Angle between two lines.
Figure 2. Angle of intersection using direction numbers. Line
O
P
{\displaystyle OP}
has direction numbers
[
A
1
,
B
1
]
.
{\displaystyle [A_{1},B_{1}].}
Line
O
Q
{\displaystyle OQ}
has direction numbers
[
A
2
,
B
2
]
.
{\displaystyle [A_{2},B_{2}].}
See Figure 2.
Line
O
P
{\displaystyle OP}
has direction numbers
[
A
1
,
B
1
]
.
{\displaystyle [A_{1},B_{1}].}
Line
O
Q
{\displaystyle OQ}
has direction numbers
[
A
2
,
B
2
]
.
{\displaystyle [A_{2},B_{2}].}
The aim is to calculate the angle between the two lines,
∠
α
=
∠
P
O
Q
.
{\displaystyle \angle \alpha =\angle POQ.}
O
P
=
A
1
2
+
B
1
2
{\displaystyle OP={\sqrt {A_{1}^{2}+B_{1}^{2}}}}
O
Q
=
A
2
2
+
B
2
2
{\displaystyle OQ={\sqrt {A_{2}^{2}+B_{2}^{2}}}}
P
Q
=
(
A
1
−
A
2
)
2
+
(
B
1
−
B
2
)
2
{\displaystyle PQ={\sqrt {(A_{1}-A_{2})^{2}+(B_{1}-B_{2})^{2}}}}
Using the cosine rule
a
2
=
b
2
+
c
2
−
2
b
c
cos
A
,
{\displaystyle a^{2}=b^{2}+c^{2}-2bc\cos A,}
P
Q
2
=
O
P
2
+
O
Q
2
−
2
(
O
P
)
(
O
Q
)
cos
α
{\displaystyle PQ^{2}=OP^{2}+OQ^{2}-2(OP)(OQ)\cos \alpha }
2
(
O
P
)
(
O
Q
)
cos
α
=
O
P
2
+
O
Q
2
−
P
Q
2
=
A
1
2
+
B
1
2
+
A
2
2
+
B
2
2
−
(
A
1
2
−
2
A
1
A
2
+
A
1
2
+
B
1
2
−
2
B
1
B
2
+
B
2
2
)
{\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})}
cos
α
=
2
(
A
1
A
2
+
B
1
B
2
)
2
(
O
P
)
(
O
Q
)
=
A
1
A
2
+
B
1
B
2
A
1
2
+
B
1
2
A
2
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
A
1
A
2
+
B
1
B
2
==
0
,
cos
α
=
0
{\displaystyle A_{1}A_{2}+B_{1}B_{2}==0,\ \cos \alpha =0}
and the lines are perpendicular.
if
(
B
1
A
2
==
A
1
B
2
)
B
1
=
A
1
B
2
A
2
{\displaystyle (B_{1}A_{2}==A_{1}B_{2})\ B_{1}={\frac {A_{1}B_{2}}{A_{2}}}}
,
cos
α
=
A
1
A
2
+
(
A
1
B
2
A
2
)
B
2
A
1
2
+
(
A
1
B
2
A
2
)
2
A
2
2
+
B
2
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}}}}}}
=
A
1
A
2
A
2
+
A
1
B
2
B
2
A
2
A
1
2
A
2
2
+
A
1
2
B
2
2
A
2
2
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}}}}}}
=
A
1
A
2
A
2
+
A
1
B
2
B
2
A
1
2
(
A
2
2
+
B
2
2
)
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}}}}}}
=
A
1
(
A
2
2
+
B
2
2
)
±
A
1
A
2
2
+
B
2
2
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}}}}}}
=
±
A
1
(
A
2
2
+
B
2
2
)
A
1
(
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})}}}
=
±
1
,
{\displaystyle =\pm 1,}
α
=
0
{\displaystyle \alpha =0}
° or
α
=
180
{\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)." ]
Let the line
O
Q
{\displaystyle OQ}
have direction numbers
[
A
,
B
]
=
[
A
2
A
2
2
+
B
2
2
,
B
2
A
2
2
+
B
2
2
]
.
{\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
A
=
A
2
A
2
2
+
B
2
2
=
A
2
O
Q
=
cos
∠
Q
O
X
.
{\displaystyle A={\frac {A_{2}}{\sqrt {A_{2}^{2}+B_{2}^{2}}}}={\frac {A_{2}}{OQ}}=\cos \angle QOX.}
The value
B
=
B
2
A
2
2
+
B
2
2
=
B
2
O
Q
=
cos
∠
Q
O
Y
.
{\displaystyle B={\frac {B_{2}}{\sqrt {A_{2}^{2}+B_{2}^{2}}}}={\frac {B_{2}}{OQ}}=\cos \angle QOY.}
A
2
+
B
2
=
1
{\displaystyle A^{2}+B^{2}=1}
.
Figure 1. Angle of intersection using direction cosines.
O
P
=
O
Q
=
1.
A
1
2
+
B
1
2
=
A
2
2
+
B
2
2
=
1.
{\displaystyle OP=OQ=1.\ A_{1}^{2}+B_{1}^{2}=A_{2}^{2}+B_{2}^{2}=1.}
All values
[
A
1
,
B
1
]
,
[
A
2
,
B
2
]
{\displaystyle [A_{1},B_{1}],\ [A_{2},B_{2}]}
are direction cosines.
cos
α
=
A
1
A
2
+
B
1
B
2
.
{\displaystyle \cos \alpha =A_{1}A_{2}+B_{1}B_{2}.}
When a set of direction numbers
[
A
,
B
]
{\displaystyle [A,B]}
has
A
2
+
B
2
=
1
,
{\displaystyle A^{2}+B^{2}=1,}
the direction numbers are direction cosines.
In Figure 1
O
P
=
O
Q
=
1.
α
=
∠
P
O
Q
.
{\displaystyle OP=OQ=1.\ \alpha =\angle POQ.}
All values
A
1
,
B
1
,
A
2
,
B
2
{\displaystyle A_{1},B_{1},A_{2},B_{2}}
are direction
cosines. From 5 above,
cos
α
=
A
1
A
2
+
B
1
B
2
.
{\displaystyle \cos \alpha =A_{1}A_{2}+B_{1}B_{2}.}
This statement is equivalent to:
cos
(
∠
P
O
X
−
∠
Q
O
X
)
{\displaystyle \cos(\angle POX-\angle QOX)}
=
cos
∠
P
O
X
cos
∠
Q
O
X
{\displaystyle =\cos \angle POX\cos \angle QOX}
+
sin
∠
P
O
X
sin
∠
Q
O
X
{\displaystyle +\sin \angle POX\sin \angle QOX}
or
cos
(
β
−
δ
)
=
cos
β
cos
δ
+
sin
β
sin
δ
.
{\displaystyle \cos(\beta -\delta )=\cos \beta \cos \delta +\sin \beta \sin \delta .}
For example, two lines have direction numbers
[
1
,
1
]
,
[
3
,
1
]
.
{\displaystyle [1,1],\ [{\sqrt {3}},1].}
Calculate the angle between them.
Convert to direction cosines:
[
2
2
,
2
2
]
,
[
3
2
,
1
2
]
.
{\displaystyle [{\frac {\sqrt {2}}{2}},{\frac {\sqrt {2}}{2}}],\ [{\frac {\sqrt {3}}{2}},{\frac {1}{2}}].}
cos
α
=
A
1
A
2
+
B
1
B
2
=
6
4
+
2
4
=
cos
15
{\displaystyle \cos \alpha =A_{1}A_{2}+B_{1}B_{2}={\frac {\sqrt {6}}{4}}+{\frac {\sqrt {2}}{4}}=\cos 15}
°.
If
|
cos
α
|
==
1
,
α
=
0
{\displaystyle |\cos \alpha |==1,\ \alpha =0}
° or
180
{\displaystyle 180}
°, and the lines are parallel.
If
cos
α
==
0
,
α
=
90
{\displaystyle \cos \alpha ==0,\ \alpha =90}
° or
270
{\displaystyle 270}
°, and the lines are perpendicular.
1.
cos
(
2
α
)
{\displaystyle \cos(2\alpha )}
using direction cosines
Figure 2. Cos(2α) using direction cosines.
∠
P
O
X
=
∠
Q
O
X
=
α
.
{\displaystyle \angle POX=\angle QOX=\alpha .}
∠
P
O
Q
=
2
∠
P
O
X
=
2
α
.
{\displaystyle \angle POQ=2\angle POX=2\alpha .}
cos
∠
P
O
Q
=
cos
(
2
α
)
=
2
A
2
−
1.
{\displaystyle \cos \angle POQ=\cos(2\alpha )=2A^{2}-1.}
In Figure 2 line
O
P
{\displaystyle OP}
has direction numbers
[
A
,
B
]
,
{\displaystyle [A,B],}
line
O
Q
{\displaystyle OQ}
has direction numbers
[
A
,
−
B
]
{\displaystyle [A,-B]}
and
O
P
=
O
Q
=
1.
{\displaystyle OP=OQ=1.}
The values
A
,
B
{\displaystyle A,B}
are direction cosines.
∠
P
O
X
=
∠
Q
O
X
;
{\displaystyle \angle POX=\angle QOX;}
∠
P
O
Q
=
2
∠
P
O
X
.
{\displaystyle \angle POQ=2\angle POX.}
cos
∠
P
O
Q
{\displaystyle \cos \angle POQ}
=
A
A
+
B
(
−
B
)
{\displaystyle =AA+B(-B)}
=
A
A
−
B
B
{\displaystyle =AA-BB}
=
A
A
−
(
1
−
A
A
)
{\displaystyle =AA-(1-AA)}
=
2
A
A
−
1.
{\displaystyle =2AA-1.}
This statement is equivalent to:
cos
(
2
α
)
=
2
cos
2
(
α
)
−
1
{\displaystyle \cos(2\alpha )=2\cos ^{2}(\alpha )-1}
or
cos
(
α
2
)
=
±
cos
(
α
)
+
1
2
.
{\displaystyle \cos({\frac {\alpha }{2}})=\pm {\sqrt {\frac {\cos(\alpha )+1}{2}}}.}
2.
cos
(
3
α
)
{\displaystyle \cos(3\alpha )}
using direction cosines
Figure 3. cos(3α) using direction cosines.
O
P
=
O
Q
=
O
R
=
1.
{\displaystyle OP=OQ=OR=1.}
All values
[
A
1
,
B
1
]
,
[
A
,
B
]
{\displaystyle [A_{1},B_{1}],\ [A,B]}
are direction cosines
cos
(
3
α
)
=
4
A
3
−
3
A
.
{\displaystyle \cos(3\alpha )=4A^{3}-3A.}
See Figure 3.
Lines
O
P
,
O
Q
,
O
R
{\displaystyle OP,OQ,OR}
are defined as
(
0
,
0
)
,
[
A
1
,
B
1
]
;
{\displaystyle (0,0),[A_{1},B_{1}];}
(
0
,
0
)
,
[
A
,
B
]
;
{\displaystyle (0,0),[A,B];}
(
0
,
0
)
,
[
A
,
−
B
]
{\displaystyle (0,0),[A,-B]}
respectively.
O
P
=
O
Q
=
O
R
=
1.
{\displaystyle OP=OQ=OR=1.}
∠
P
O
X
=
2
∠
Q
O
X
,
{\displaystyle \angle POX=2\angle QOX,}
therefore:
A
1
=
2
A
A
−
1
{\displaystyle A_{1}=2AA-1}
sin
(
2
α
)
=
B
1
{\displaystyle \sin(2\alpha )=B_{1}}
=
1
−
A
1
2
{\displaystyle ={\sqrt {1-A_{1}^{2}}}}
=
1
−
(
2
A
A
−
1
)
2
{\displaystyle ={\sqrt {1-(2AA-1)^{2}}}}
=
1
−
(
4
A
A
A
A
−
4
A
A
+
1
)
{\displaystyle ={\sqrt {1-(4AAAA-4AA+1)}}}
=
4
A
A
−
4
A
A
A
A
{\displaystyle ={\sqrt {4AA-4AAAA}}}
=
2
A
1
−
A
A
=
2
A
B
{\displaystyle =2A{\sqrt {1-AA}}=2AB}
sin
(
2
α
)
=
2
sin
α
cos
α
.
{\displaystyle \sin(2\alpha )=2\sin \alpha \cos \alpha .}
cos
(
3
α
)
=
cos
∠
P
O
R
{\displaystyle \cos(3\alpha )=\cos \angle POR}
=
A
1
A
+
B
1
(
−
B
)
{\displaystyle =A_{1}A+B_{1}(-B)}
=
(
2
A
A
−
1
)
A
+
2
A
B
(
−
B
)
{\displaystyle =(2AA-1)A+2AB(-B)}
=
2
A
A
A
−
A
−
2
A
(
B
B
)
{\displaystyle =2AAA-A-2A(BB)}
=
2
A
A
A
−
A
−
2
A
(
1
−
A
A
)
{\displaystyle =2AAA-A-2A(1-AA)}
=
2
A
A
A
−
A
−
2
A
+
2
A
A
A
{\displaystyle =2AAA-A-2A+2AAA}
=
4
A
3
−
3
A
.
{\displaystyle =4A^{3}-3A.}
cos
(
3
α
)
=
4
cos
3
α
−
3
cos
α
.
{\displaystyle \cos(3\alpha )=4\cos ^{3}\alpha -3\cos \alpha .}
3.
sin
(
α
−
β
)
{\displaystyle \sin(\alpha -\beta )}
using direction cosines
Figure 4. sin(α-β) using direction cosines.
O
P
=
O
Q
=
1.
{\displaystyle OP=OQ=1.}
All values
[
A
1
,
B
1
]
,
[
A
2
,
B
2
]
{\displaystyle [A_{1},B_{1}],\ [A_{2},B_{2}]}
are direction cosines
sin
(
α
−
β
)
=
P
R
=
A
2
B
1
−
B
2
A
1
.
{\displaystyle \sin(\alpha -\beta )=PR=A_{2}B_{1}-B_{2}A_{1}.}
See Figure 4.
Lines
O
P
,
O
Q
{\displaystyle OP,OQ}
are defined as
(
0
,
0
)
,
[
A
1
,
B
1
]
;
{\displaystyle (0,0),[A_{1},B_{1}];}
(
0
,
0
)
,
[
A
2
,
B
2
]
{\displaystyle (0,0),[A_{2},B_{2}]}
respectively.
O
P
=
O
Q
=
1.
{\displaystyle OP=OQ=1.}
∠
P
O
X
=
α
;
{\displaystyle \angle POX=\alpha ;}
∠
Q
O
X
=
β
;
{\displaystyle \angle QOX=\beta ;}
∠
P
O
Q
=
α
−
β
.
{\displaystyle \angle POQ=\alpha -\beta .}
Line
O
Q
{\displaystyle OQ}
has equation
A
2
y
−
B
2
x
=
0.
{\displaystyle A_{2}y-B_{2}x=0.}
Point
P
{\displaystyle P}
has coordinates
(
A
1
,
B
1
)
.
{\displaystyle (A_{1},B_{1}).}
Length
P
R
=
A
2
B
1
−
B
2
A
1
{\displaystyle PR=A_{2}B_{1}-B_{2}A_{1}}
=
sin
(
α
−
β
)
{\displaystyle =\sin(\alpha -\beta )}
=
sin
α
cos
β
−
cos
α
sin
β
.
{\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
O
Q
{\displaystyle OQ}
bisects
∠
P
O
R
.
{\displaystyle \angle POR.}
Line
O
Q
{\displaystyle OQ}
has direction numbers
[
B
2
−
B
1
,
A
1
−
A
2
]
.
{\displaystyle [B_{2}-B_{1},A_{1}-A_{2}].}
See Figure 5.
The aim is to produce line
O
Q
,
{\displaystyle OQ,}
the bisector of
∠
P
O
R
.
{\displaystyle \angle POR.}
Lines
O
P
,
O
R
{\displaystyle OP,OR}
are defined as
(
0
,
0
)
,
[
A
1
,
B
1
]
{\displaystyle (0,0),[A_{1},B_{1}]}
and
(
0
,
0
)
,
[
A
2
,
B
2
]
{\displaystyle (0,0),[A_{2},B_{2}]}
respectively.
Ensure that all values
A
1
,
B
1
,
A
2
,
B
2
{\displaystyle A_{1},B_{1},A_{2},B_{2}}
are direction cosines.
At least one of
A
1
,
B
1
{\displaystyle A_{1},B_{1}}
and one of
A
2
,
B
2
{\displaystyle A_{2},B_{2}}
are non-zero.
Let line
O
Q
{\displaystyle OQ}
have direction numbers
[
A
,
B
]
.
{\displaystyle [A,B].}
∠
P
O
Q
=
∠
Q
O
R
.
{\displaystyle \angle POQ=\angle QOR.}
A
1
A
+
B
1
B
=
A
2
A
+
B
2
B
.
{\displaystyle A_{1}A+B_{1}B=A_{2}A+B_{2}B.}
B
1
B
−
B
2
B
=
A
2
A
−
A
1
A
.
{\displaystyle B_{1}B-B_{2}B=A_{2}A-A_{1}A.}
B
(
B
1
−
B
2
)
=
A
(
A
2
−
A
1
)
.
{\displaystyle B(B_{1}-B_{2})=A(A_{2}-A_{1}).}
Slope of line
O
Q
=
B
A
=
A
2
−
A
1
B
1
−
B
2
.
{\displaystyle OQ={\frac {B}{A}}={\frac {A_{2}-A_{1}}{B_{1}-B_{2}}}.}
Let line
O
Q
{\displaystyle OQ}
have direction numbers
[
A
,
B
]
=
[
B
1
−
B
2
,
A
2
−
A
1
]
.
{\displaystyle [A,B]=[B_{1}-B_{2},\ A_{2}-A_{1}].}
if
A
==
0
:
{\displaystyle A\ ==\ 0\ :}
#
B
1
{\displaystyle \ \#\ B_{1}}
equals
B
2
.
{\displaystyle B_{2}.}
{\displaystyle \ \ \ \ \ \ \ \ }
if
B
==
0
:
{\displaystyle B\ ==\ 0\ :}
#
A
1
{\displaystyle \ \#\ A_{1}}
equals
A
2
.
{\displaystyle A_{2}.}
#
{\displaystyle \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \#}
Both lines are parallel and in same direction.
#
{\displaystyle \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \#}
Three lines
O
P
,
O
Q
,
O
R
{\displaystyle OP,\ OQ,\ OR}
are colinear.
[
A
,
B
]
=
[
A
1
,
B
1
]
{\displaystyle \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [A,\ B]\ =\ [A_{1},\ B_{1}]}
{\displaystyle \ \ \ \ \ \ \ \ }
else :
#
A
1
{\displaystyle \ \#\ A_{1}\ }
equals
−
A
2
.
{\displaystyle \ -A_{2}.}
[
A
,
B
]
=
[
0
,
1
]
#
{\displaystyle \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ [A,\ B]\ =\ [0,\ 1]\ \#}
The
Y
{\displaystyle Y}
axis.
elif
B
==
0
:
{\displaystyle \ B\ ==\ 0\ :}
#
A
1
{\displaystyle \ \#\ A_{1}\ }
equals
A
2
.
B
1
{\displaystyle \ A_{2}.\ B_{1}\ }
equals
−
B
2
.
{\displaystyle \ -B_{2}.}
[
A
,
B
]
=
[
1
,
0
]
#
{\displaystyle \ \ \ \ \ \ \ \ [A,\ B]\ =\ [1,\ 0]\ \#}
The
X
{\displaystyle X}
axis.
elif
B
2
==
−
B
1
:
{\displaystyle \ B_{2}\ ==\ -B_{1}\ :}
#
A
2
{\displaystyle \ \#\ A_{2}\ }
equals
−
A
1
.
{\displaystyle \ -A_{1}.}
#
{\displaystyle \ \ \ \ \ \ \ \ \#}
The lines are parallel and in opposite directions.
#
[
A
,
B
]
=
[
B
1
−
(
−
B
1
)
,
−
A
1
−
A
1
]
=
[
2
B
1
,
−
2
A
1
]
{\displaystyle \ \ \ \ \ \ \ \#\ [A,\ B]\ =\ [B_{1}-(-B_{1}),\ -A_{1}-A_{1}]\ =\ [2B_{1},\ -2A_{1}]}
[
A
,
B
]
=
[
B
1
,
−
A
1
]
#
{\displaystyle \ \ \ \ \ \ \ \ [A,\ B]\ =\ [B_{1},\ -A_{1}]\ \#}
The normal to line
O
P
{\displaystyle OP}
or line
O
R
.
{\displaystyle OR.}
else :
{\displaystyle }
r
o
o
t
=
A
2
+
B
2
{\displaystyle \ \ \ \ \ \ \ \ root\ =\ {\sqrt {A^{2}+B^{2}}}}
A
=
A
r
o
o
t
;
B
=
B
r
o
o
t
{\displaystyle \ \ \ \ \ \ \ \ A\ =\ {\frac {A}{root}};\ B\ =\ {\frac {B}{root}}}
cos
∠
Q
O
X
=
A
;
{\displaystyle \cos \angle QOX=A;}
sin
∠
Q
O
X
=
B
.
{\displaystyle \sin \angle QOX=B.}
5.
sin
(
α
+
β
)
{\displaystyle \sin(\alpha +\beta )}
using direction cosines.
Figure 6. sin(α+β) using direction cosines.
O
P
=
O
R
=
1.
{\displaystyle OP=OR=1.}
cos
α
=
A
1
;
sin
α
=
B
1
.
{\displaystyle \cos \alpha =A_{1};\ \sin \alpha =B_{1}.}
cos
β
=
A
2
;
sin
β
=
B
2
.
{\displaystyle \cos \beta =A_{2};\ \sin \beta =B_{2}.}
cos
(
α
+
β
)
=
A
1
A
2
−
B
1
B
2
.
{\displaystyle \cos(\alpha +\beta )=A_{1}A_{2}-B_{1}B_{2}.}
sin
(
α
+
β
)
=
B
1
A
2
+
A
1
B
2
.
{\displaystyle \sin(\alpha +\beta )=B_{1}A_{2}+A_{1}B_{2}.}
See Figure 6.
O
P
=
O
R
=
1.
{\displaystyle OP=OR=1.}
Point
Q
{\displaystyle Q}
has coordinates
(
A
1
A
2
,
B
1
A
2
)
.
{\displaystyle (A_{1}A_{2},B_{1}A_{2}).}
Line
Q
P
{\displaystyle QP}
is defined as
(
A
1
A
2
,
B
1
A
2
)
,
[
−
B
1
,
A
1
]
.
{\displaystyle (A_{1}A_{2},B_{1}A_{2}),[-B_{1},A_{1}].}
Length
Q
P
=
B
2
.
{\displaystyle QP=B_{2}.}
Point
P
{\displaystyle P}
has coordinates
(
x
=
A
1
A
2
+
B
2
(
−
B
1
)
,
y
=
B
1
A
2
+
B
2
A
1
)
.
{\displaystyle (x=A_{1}A_{2}+B_{2}(-B_{1}),y=B_{1}A_{2}+B_{2}A_{1}).}
cos
(
α
+
β
)
=
x
=
cos
α
cos
β
−
sin
α
sin
β
.
{\displaystyle \cos(\alpha +\beta )=x=\cos \alpha \cos \beta -\sin \alpha \sin \beta .}
sin
(
α
+
β
)
=
y
=
sin
α
cos
β
+
cos
α
sin
β
.
{\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)." ]
Figure 1. Intercept form of line. Intercepts are
(
−
24
,
0
)
,
(
0
,
16
)
.
{\displaystyle (-24,0),\ (0,16).}
Green line has equation
x
−
24
+
y
16
=
1.
{\displaystyle {\frac {x}{-24}}+{\frac {y}{16}}=1.}
The general equation of the straight line is:
A
x
+
B
y
+
C
=
0
{\displaystyle Ax+By+C=0}
where at least one of
A
,
B
{\displaystyle A,B}
is non-zero.
The intercept form of the line requires that all of
A
,
B
,
C
{\displaystyle A,B,C}
be non-zero.
A
x
+
B
y
+
C
=
0
{\displaystyle Ax+By+C=0}
A
x
+
B
y
=
−
C
{\displaystyle Ax+By=-C}
A
−
C
x
+
B
−
C
y
=
1
{\displaystyle {\frac {A}{-C}}x+{\frac {B}{-C}}y=1}
x
−
C
/
A
+
y
−
C
/
B
=
1
{\displaystyle {\frac {x}{-C/A}}+{\frac {y}{-C/B}}=1}
A
x
+
B
y
+
C
=
0
{\displaystyle Ax+By+C=0}
If
(
y
==
0
)
x
=
−
C
A
.
{\displaystyle (y==0)\ x=-{\frac {C}{A}}.}
If
(
x
==
0
)
y
=
−
C
B
.
{\displaystyle (x==0)\ y=-{\frac {C}{B}}.}
Let
a
=
−
C
A
,
b
=
−
C
B
.
{\displaystyle a=-{\frac {C}{A}},\ b=-{\frac {C}{B}}.}
The line passes through the points
(
a
,
0
)
,
(
0
,
b
)
{\displaystyle (a,0),(0,b)}
where
a
{\displaystyle a}
is the
x
{\displaystyle x}
intercept and
b
{\displaystyle b}
is the
y
{\displaystyle y}
intercept.
The equation
x
−
C
/
A
+
y
−
C
/
B
=
1
{\displaystyle {\frac {x}{-C/A}}+{\frac {y}{-C/B}}=1}
becomes
x
a
+
y
b
=
1
,
{\displaystyle {\frac {x}{a}}+{\frac {y}{b}}=1,}
the
intercept form of the equation.
See Figure 1. In this example
a
=
−
24
,
b
=
16.
{\displaystyle a=-24,\ b=16.}
The green line has equation
x
−
24
+
y
16
=
1.
{\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
edit
Figure 1. Intersection of two Lines. Given lines
O
J
,
O
K
{\displaystyle OJ,OK}
calculate
∠
J
O
K
=
∠
J
O
X
−
∠
K
O
X
.
{\displaystyle \angle JOK=\angle JOX-\angle KOX.}
See Figure 1.
Given line
O
J
{\displaystyle OJ}
with equation
A
x
+
B
y
+
C
=
0
{\displaystyle Ax+By+C=0}
in which at least 1 of
A
,
B
{\displaystyle A,B}
is non-zero
and line
O
K
{\displaystyle OK}
with equation
D
x
+
E
y
+
F
=
0
{\displaystyle Dx+Ey+F=0}
in which at least 1 of
D
,
E
{\displaystyle D,E}
is non-zero, the aim is to calculate
∠
J
O
K
.
{\displaystyle \angle JOK.}
Let line
O
J
{\displaystyle OJ}
have slope
m
1
=
−
A
B
{\displaystyle m_{1}=-{\frac {A}{B}}}
and
Let line
O
K
{\displaystyle OK}
have slope
m
2
=
−
D
E
.
{\displaystyle m_{2}=-{\frac {D}{E}}.}
Using
tan
(
A
−
B
)
=
tan
(
A
)
−
tan
(
B
)
1
+
tan
(
A
)
tan
(
B
)
,
{\displaystyle \tan(A-B)={\frac {\tan(A)-\tan(B)}{1+\tan(A)\tan(B)}},}
tan
(
∠
J
O
K
)
=
m
1
−
m
2
1
+
m
1
m
2
=
B
D
−
A
E
B
E
+
A
D
{\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
0
0
.
{\displaystyle {\frac {0}{0}}.}
If
(
B
D
−
A
E
==
0
)
,
tan
(
∠
J
O
K
)
=
0
,
∠
J
O
K
=
0
{\displaystyle (BD-AE==0),\ \tan(\angle JOK)=0,\ \angle JOK=0}
and the two lines are parallel. Also:
B
D
=
A
E
;
D
E
=
A
B
;
m
1
=
m
2
.
{\displaystyle \ \ \ \ \ \ \ \ \ \ BD=AE;\ {\frac {D}{E}}={\frac {A}{B}};\ m_{1}=m_{2}.}
If
(
B
E
+
A
D
==
0
)
,
∠
J
O
K
=
90
{\displaystyle (BE+AD==0),\ \angle JOK=90}
° and the two lines are perpendicular. Also:
{\displaystyle \ \ \ \ \ \ \ \ \ \ }
If
(
B
E
==
A
D
)
,
B
E
=
A
D
=
0
{\displaystyle (BE==AD),\ BE=AD=0}
and each line is parallel to an axis, else:
A
D
=
−
B
E
;
A
D
B
E
=
−
1
;
m
1
m
2
=
A
D
B
E
.
{\displaystyle \ \ \ \ \ \ \ \ \ \ AD=-BE;\ {\frac {AD}{BE}}=-1;\ m_{1}m_{2}={\frac {AD}{BE}}.}
If
B
E
{\displaystyle BE}
is non-zero and
m
1
m
2
==
−
1
,
{\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)." ]