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

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)$.


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.


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$.