✖

Normal vector of a line

The normal vector of a line p is a vector that is perpendicular to the line p, and its coordinates come from the general equation of the line.

Motivation

We have a line p that passes through the points A(0, 1), B(2, 5). The line is the graph of the function y = 2x + 1, so the general equation of the line is −2x + y − 1 = 0. The picture:

The line p

The general equation has the form ax + by + c = 0, so for the equation −2x + y − 1 = 0 we have a = −2, b = 1, c = −1. What is the geometric meaning of the parameters a, b? Just for fun, let’s draw the vector u→=(a,b) in the picture, that is, the vector u→=(−2,1):

The line p with the vector \vec{\mathbf{u}} = \left(-2, 1\right)

It is quite clear that this vector is perpendicular to the line p. This is no coincidence: for any general equation of a line ax + by + c = 0, the vector (a, b) is perpendicular to the line. We call such a vector a normal vector of the line p.

Properties of the normal vector

From the properties of the scalar product (dot product) of vectors we know that the scalar product of two vectors is zero exactly when the vectors are perpendicular. The direction vector of the line p is parallel to p, so any direction vector of p is perpendicular to the normal vector. If we work out the direction vector from the line segment AB→, we get the vector

v→=B−A=(2,5)−(0,1)=(2,4)

Drawn in the picture:

The normal vector \vec{\mathbf{u}} is perpendicular to the direction vector \vec{\mathbf{v}}

If we play with the scalar product of two vectors a little, which as a reminder is defined as

(u1,u2)⋅(v1,v2)=u1⋅v1+u2⋅v2,

we find that for real numbers a, b, the scalar product of the vectors (a, b) and (−b, a), and of the vectors (a, b) and (b, −a), always comes out as zero:

(a,b)⋅(−b,a)=a⋅(−b)+b⋅a=0(a,b)⋅(b,−a)=a⋅b−b⋅a=0

Now let’s return to the line p given by the general equation ax + by + c = 0 and to the normal vector (a, b), which is perpendicular to the line. But wait! By the property above, the vectors (−b, a) and (b, −a) have zero scalar product with the normal vector, so the vectors (−b, a) and (b, −a) must be perpendicular to the normal vector! And because the normal vector is perpendicular to the line, a vector perpendicular to the normal vector must be parallel to the original line p! Brilliant!

We can draw the vectors v→1=(−b,a) and v→2=(b,−a) in the picture. The line has the general equation −2x + y − 1 = 0, so after substituting we get the green vectors v→1=(−1,−2) and v→2=(1,2):

Two new direction vectors \vec{\mathbf{v}}_1, \vec{\mathbf{v}}_2

Finding the general equation of a line from a normal vector and a point

We already know that we can find the general equation of a line fairly easily from the parametric equations. If we know a normal vector n→, we can also find the general equation easily. So let’s take a point A(5, 13) that the line p passes through and its normal vector n→=(4,−6). The line p has a general equation ax + by + c = 0, and from the definition of the normal vector we can immediately find the coefficients a, b: they equal the coordinates of the normal vector, a = 4, b = −6. The general equation of the line has the form

4x−6y+c=0

We still have to work out the coefficient c. This equation of the line p must hold for all the points on p. This means that if we substitute the coordinates of a point on p for x, y, the equation must be true. It is enough to substitute the point A, which the line p certainly passes through. The point A has coordinates A(5, 13), so we substitute x = 5, y = 13 into the equation 4x − 6y + c = 0:

4⋅5−6⋅13+c=020−78+c=0c=78−20c=58

The complete general equation of the line p is therefore

4x−6y+58=0.

Two direction vectors of the line p are u→1=(6,4) and u→2=(−6,−4).

The line, its green direction vectors \vec{\mathbf{u}}_1, \vec{\mathbf{u}}_2 and the blue normal vector \vec{\mathbf{n}}

Chapters: Parametric equations of a line, General equation of a line, Normal vector of a line, Slope-intercept form of a line, Equation of a line in 3D