finding out if two vectors are perpendicular or parallel

Solution 1:

Two vectors $v_1=(x_1,y_1)$ and $v_2=(x_2,y_2)$ are parallel iff $x_1 \, y_2 = x_2 \, y_1$.

Solution 2:

You can find the angle between the two vectors $$\theta=\cos^{-1}(\frac{v_1.v_2}{|v_1||v_2|})$$ if $\theta=0$or $180$ the two vectors are parallel

if $\theta=90$ the two vetors are perpendicular