Perpendicular straight lines

Two straight lines r and s are perpendicular if and only if the angle between them is of 90. This is equivalent to the fact that the cosine of the angle is equal to 0 (cos(r,s)^=0) and so that the scalar product of its director vectors is equal to 0.

If we have the straight lines Ax+By+C=0 and Ax+By+C=0,the director vectors of the above mentioned straight lines are u=(B,A) and v=(B,A).

Therefore, if in coordinates we impose that the scalar product of two vectors is 0 we have: uv=0u1v1+u2v2=0B(B)+AA=0 BB+AA=0AA=B·BAB=BA

Therefore we already have a way of verifying if two vectors, and therefore two straight lines, are perpendicular to its components.

If we remember as well that m1=AB and m2=AB are the slopes of r and s, then the perpendicularity condition is equivalent to: m1=1m2

Let's remember finally that if we have a vector v=(v1,v2), a w perpendicular to v is w=(v2,v1).

Example

Find the equation of the perpendicular straight line to r:y=2x5 that crosses point A=(1,2)

The given straight line has slope m=2. Therefore we want a straight line with slope m=12.

This way, using the equation slope-point we will have that the straight line that we are looking for is: y2=12(x1)