Find the vectors that are perpendicular to two lines Let $y=mx+b$ and $y=m'x+c$ be the equations of two lines in the plane. Write down vectors perpendicular to these lines. Show that these vectors are perpendicular to each other if and only if $mm'=-1$
I don't know how to find these vectors. The answer key states that these two vectors are $(-m, 1)$ and $(-m', 1)$.
From this, I can easily conclude that these two vectors are perpendicular when their dot products equals zero. that means $(-m, 1) \cdot (-m', 1)=mm'+1=0,$ thus $mm'=-1$
But how do you find these vectors to begin with?
 A: Here is how you may find the vector $(-m,1)$.
Observe that $(0,b)$ and $(1,m+b)$ are the two points on the given line $y=mx+b$. They also represent two vectors $\vec{A}(0,b)$ and  $\vec{B}(1,m+b)$, respectively, and their difference represents a vector parallel to the line $y=mx+b$, i.e.
$$\vec{B}(1,m+b)-\vec{A}(0,b)=\vec{AB}(1,m)$$
That is, the coordinates of the vector parallel to the line is just the coefficients of $y$ and $x$ in the line equation. 
Similarly, given that the line $-my=x$ is perpendicular to $y=mx+b$, the vector parallel to $-my= x$, or perpendicular to $y=mx+b$ is $\vec{AB}_{\perp}(-m,1)$.
The other vector $(-m',1)$ can be deduced likewise.
A: Observe that $y=mx+b$ is equivalent to $-mx+y=b$, i.e. $(-m)\cdot x+1\cdot y=b$, that is, it consists of exactly those points $p=(x,y)$, which satisfy
$$(-m, 1)\cdot p=b$$
This line is parallel to $(-m, 1)\cdot p=0$, which is the perpendicular line at the origin to vector $(-m, 1)$. 
A: Here's a geometrically motivated explanation.
Let $(x_1,mx_1+c)$ and $(x_2,mx_2+c)$ be the coordinates of two different points $A$ and $B$ on the line $y=mx+c$. Consider any vector $v$ that starts at the origin, has the endpoint $(a,b)$ and is perpendicular to the same line.
Then $B-A=(x_2-x_1,m(x_2-x_1))$ should be perpendicular to $v$, i.e. $v.(B-A)=0$, or
$$(x_2-x_1)a+m(x_2-x_1)b=0
\\\implies a+mb=0\implies a=-mb$$
So any vector that starts at the origin and has as an endpoint of the form $(-mb,b)$ will be perpendicular to the given line. You could generalize this even further and say that any vector with starting point $(p_1,q_1)$ and endpoint $(p_2,q_2)$ such that $p_2-p_1=-m(q_2-q_1)$ is perpendicular to the line $y=mx+b$.
