# How do you derive a normal vector from the equation of a line?

I've seen that to find a normal vector to a line such as $3x+4y-1=0$ people take the coefficients and say $(3,4)$ is a normal vector?

Why does this work? How are the coefficients related to the normal?

• @ZacharySelk I think its a plane in 3 dimensions. Although normal vector will be <3,4,0> right? Jan 8, 2018 at 4:18
• @prog_SAHIL They said it's a line but if it was a plane you would be correct.
– user223391
Jan 8, 2018 at 4:21
• @ZacharySelk I've corrected it
– K.M.
Jan 8, 2018 at 4:22
• The coefficients, not the constant term though, form a normal vector. Jan 8, 2018 at 4:28
• Trivially. No pun intended. Jan 8, 2018 at 10:45

Two vectors $a,b$ are normal iff $a\cdot b=a_1b_1+...+a_2b_2=0$.

If you have a vector, $(x,y)$ and you want to find vectors that are normal to it you want to find a vector $(a,b)$ such that $ax+by=0$. So a normal vector to the line $3x+4y=0$ is simply $(3,4)$.

If you have a constant on the right side, it just moves the line up or down. It doesn't change anything else. So a normal vector will still be $(3,4)$.

• The normal vector is not unique, so you might want to call this "a normal vector"? Jan 8, 2018 at 4:29
• @max_zorn sure.
– user223391
Jan 8, 2018 at 4:30
• sorry I don't know If I'm being retarded but I don't get how (3,4) is a normal vector to the line 3x+4y=0
– K.M.
Jan 8, 2018 at 4:35
• @K.M. the vector $(3,4)$ is orthogonal to any vector $(x,y)$ which is on that line because $$(3,4)\cdot (x,y)=3x+4y=0$$
– Dave
Jan 8, 2018 at 5:20
• @K.M. To be more specific, $(3,4)$ is normal to any vector pointing along the line $3x + 4y + c = 0$ for any constant $c$. If $(x_1, y_1)$ and $(x_2, y_2)$ are two points on the line, then $(x_2 - x_1, y_2 - y_1)$ is a vector pointing along the line. Subtracting $3x_1 + 4y_1 + c = 0$ from $3x_2 + 4y_1 + c = 0$, you get $$3(x_2 - x_1) + 4(y_2 - y_1) = 0$$which tells you that $(3,4)$ is normal to the vector $(x_2 - x_1, y_2 - y_1)$. Jan 8, 2018 at 14:39

If the line equation is $$ax+by+c=0$$

then, the normal vector is $\vec{n}=\left(\begin{array}{c}a \\ b\end{array}\right)$, and the direction vector is $\vec{v}=\left(\begin{array}{c}-b \\ a\end{array}\right)$

Demonstration:

First, we begin by showing that $\vec{n}=\left(\begin{array}{c}a \\ b\end{array}\right)$

It is easy to see that if $a=(x_a,y_a)$, $b=(x_b,y_b)$ are two points from the given line then, $$\vec{u}=\left(\begin{array}{c}x_b-x_a \\ y_b-y_a \end{array}\right)$$ is a direction vector of the line.

then the scalar product of $n$ et $u$ must be $0$ to say that $n$ is indeed a normal vector. $$\vec{n}\cdot \vec{u}=a(x_b-x_a)+b(y_b-y_a)=ax_b-ax_a+by_b-by_a=c-c=0$$

Then to show that $\vec{v}=\left(\begin{array}{c}-b \\ a\end{array}\right)$ is a direction vector for the line all we have to do is to calculate the scalar product of $\vec{n}$ and $\vec{v}$. $$\vec{n}\cdot \vec{v}=-ab+ab=0$$ So the vector $\vec{v}$ is orthogonal to the vector $\vec{n}$ which is a normal vector, hence $\vec{v}$ is a direction vector.

• Good answer. Maybe it is not the best idea to use the same variable name for the coefficients and points on the line. This might confuse. Jan 8, 2018 at 8:14
• thanks you for the remark, i hope it is less confusing now. Jan 8, 2018 at 11:14

A vector parallel to the line is obtained by joining two points, say

$$\vec p=(x_1,y_1)-(x_0,y_0).$$

Let $\vec n:=(3,4)$. Then by the equation of the line ($3x+4y=1$),

$$\vec n\cdot\vec p=(3x_1+4y_1)-(3x_0+4y_0)=1-1=0$$

which shows that $\vec n\perp\vec p$.

Two lines are perpendicular if their slopes are opposite reciprocal. The slope of your line is $-3/4$ so you are looking for a line with slope of $4/3$. If you let $x=3t$, $y=4t$ the slope will be 4/3 and you are done.

• whats t here? putting 3t inplace of x and 4t in place of y doesnt make sense (3t+4t-1=0 is 7t-1=0)
– A.B
Sep 19, 2020 at 19:03

$$3x+4y=0,$$ or $$\vec n\cdot\vec p=0.$$
Completely analogous to the case of a plane. .. $ax+by+cz=d$ has normal vector $(a,b,c)$... this is because the dot product $(x-x_0, y-y_0, z-z_0)\cdot (a,b,c)=0$, where $d=ax_0+by_0+cz_0$, for any point $(x_0, y_0, z_0)$ on the plane. ..