There are a few misunderstanding:
A vector has no location : a perpendicular vector is nowhere in space, it is just a direction
To determine a normal vector, the usual way is to use a cross product, not a dot product (although you can still get away with dot products with some algebra, like generating a random vector and removing its tangential component)
You may want to create a line segment that originates from p3 and which is perpendicular to p2-p1 : in that case, since you mention that you are already able to generate a normal vector (let's call it V) then drawing such a line would consist in putting a vertex at p3 and another vertex at p3+a*V where "a" is any positive value that will determine the length of your segment