How can I find a normal vector of a 2D line?

Ian McLeod picture Ian McLeod · May 7, 2013 · Viewed 34.6k times · Source

I have a line with point a, (6, 12) and point b (45, 18).

To describe this line using vectors, the equation is L = [6, 12] +t [39, 6]

How would I go about finding the normal to this line?

Answer

Janus Troelsen picture Janus Troelsen · May 7, 2013

From the Math StackExchange How do I calculate the normal vector of a line segment?:

if we define dx=x2-x1 and dy=y2-y1, then the normals are (-dy, dx) and (dy, -dx).