# finding out if two vectors are perpendicular or parallel

I'm not sure if I quite get this. For example,

(1, -1) and (-3, 3)

take the cross product, you will end up with -3 + (-3)

This doesn't equal 0, so it's not perpendicular. So that leaves me with it being parallel. When are two vectors parallel?

• You mean dot product, not cross product. – user26486 Jun 13 '15 at 17:29
• I think did you mean the "dot product". – Mann Jun 13 '15 at 17:29
• Vectors $(a_1,a_2)$ and $(b_1,b_2)$ are parallel iff $\frac{a_1}{b_1}=\frac{a_2}{b_2}$ – user26486 Jun 13 '15 at 17:31
• @user26486 Thanks! I really liked your comment. To clarify, is it because a vector is parallel if the ratio of one vector is equal to the ratio of another vector? – user71207 Jan 24 at 12:36
• @user26486 would expressing it as $\frac{a_1}{a_2}=\frac{b_1}{b_2}$ also be appropriate? – user71207 Jan 24 at 12:37

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

• In OP's problem, you get $$\ \cos^{-1} \left( \frac{-6}{ \ \sqrt{2} \ \cdot \ 3 \sqrt{2}} \ \right) \ = \ \cos^{-1} (-1) \ = \ 180º \ \ ,$$ so you may want to mention the case of anti-parallelism. (Some folks do use "parallel" to refer to any vectors that are collinear.) – colormegone Jun 13 '15 at 19:39
• @RecklessReckoner Thanks – E.H.E Jun 13 '15 at 19:53
• @colormegone: Please don't confuse (°, U+00B0: DEGREE SIGN) and (º, U+00BA: MASCULINE ORDINAL INDICATOR)! – Andreas Rejbrand Feb 24 '19 at 14:35
• Amir Naseri's answer is much much faster to use. – user3210986 Feb 10 '20 at 22:51

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$$.

• excellent for numerical stability (no need to worry about float comparison with square root) – hLk May 13 '20 at 2:15
• Great answer. To elaborate the derivation: If you write the two vectors as columns of a 2x2 matrix then if they’re parallel the determinant will be zero giving exactly the equation above: $x_1 y_2 - x_2 y_1=0$ – Adi Shavit Mar 25 at 22:01

Two vectors are parallel when they are scalar multiples of each other. In other words, if you can multiply one vector by a constant and end up with the other vector.

The rough reason for this is that multiplying by a scalar doesn't rotate the vector at all (it can stretch or flip the vector, but it doesn't change the direction).

They are parallel if and only if they are different by a factor i.e. (1,3) and (-2,-6). The dot product will be 0 for perpendicular vectors i.e. they cross at exactly 90 degrees.

When you calculate the dot product and your answer is non-zero it just means the two vectors are not perpendicular.