# 2D Perp Dot Product

On the two dimensional plane, we can define the perp product or outer product or exterior product of two vectors $$\mathbf{a}$$ and $$\mathbf{b}$$ by replacing $$\mathbf{a}$$ with it’s perp vector $$\mathbf{a}^\perp$$. The perp dot product is denoted by $$\perp$$ and is given by

$\mathbf{a}\perp\mathbf{b}=\mathbf{a}^\perp\cdot\mathbf{b} = a_xb_y-a_yb_x = \left|\begin{array}{rl}a_x&a_y\\b_x&b_y\end{array}\right|$

## Properties

$\mathbf{a}\perp\mathbf{b} = |\mathbf{a}| |\mathbf{b}|\sin\theta$

With $$\theta$$ being the angle between vectors $$\mathbf{a}$$ and $$\mathbf{b}$$. When $$|\mathbf{a}|=|\mathbf{b}|=1$$, then $$\sin\theta=\hat{\mathbf{a}}\perp\hat{\mathbf{b}}$$

Nilpotent

$\mathbf{a}\perp\mathbf{a}=0$

Scalar Association

$(\alpha\mathbf{a})\perp(\beta\mathbf{b})=(\alpha\beta)(\mathbf{a}\perp\mathbf{b})$

Antisymmetric

$\mathbf{a}\perp\mathbf{b} =-(\mathbf{b}\perp\mathbf{a})$

$\mathbf{a}\perp(\mathbf{b}+\mathbf{c}) = (\mathbf{a}\perp\mathbf{b})+(\mathbf{a}\perp\mathbf{c})$

Lagrange Identity

$(\mathbf{a}\perp\mathbf{b})^2+(\mathbf{a}\cdot\mathbf{b})^2=|\mathbf{a}|^2|\mathbf{b}|^2$

## 2D Cross Product

Calculating the cross product of two-dimensional vectors, embedded into the 3D space with z-components zero yields

$\mathbf{a}\times\mathbf{b} = \left|\begin{array}{ccc}\hat{\mathbf{x}} & \hat{\mathbf{y}} & \hat{\mathbf{z}}\\ a_x & a_y & 0\\ b_x & b_y & 0\end{array}\right|= \left|\begin{array}{cc}a_x & a_y\\ b_x & b_y\end{array}\right|\hat{\mathbf{z}} = (a_xb_y - a_yb_x)\hat{\mathbf{z}} = (\mathbf{a}\perp\mathbf{b})\hat{\mathbf{z}}$

With $$\hat{\mathbf{x}}, \hat{\mathbf{y}}$$ and $$\hat{\mathbf{z}}$$ being the orthonormal basis, the result suggests that the perp-product is the 2D version of the 3D cross-product. While the cross product gives a normal to two vectors, the perp-product gives a normal to one vector.

The fundamental property of the cross-product and perp-product support this finding:

$\begin{array}{rll} \mathbf{a}\perp\mathbf{b} &= |\mathbf{a}| |\mathbf{b}|\sin\theta&\text{ (2D case)}\\ |\mathbf{a}\times\mathbf{b}|&=|\mathbf{a}||\mathbf{b}|\sin\theta&\text{ (3D case)} \end{array}$

Which stems from the Lagrange identity:

$\begin{array}{rll} (\mathbf{a}\perp\mathbf{b})^2+(\mathbf{a}\cdot\mathbf{b})^2&=|\mathbf{a}|^2|\mathbf{b}|^2&\text{ (2D case)}\\ |\mathbf{a}\times\mathbf{b}|^2 + (\mathbf{a}\cdot\mathbf{b})^2& = |\mathbf{a}|^2|\mathbf{b}|^2&\text{ (3D case)}\\ \end{array}$

## Applications

### Area of a parallelogram

To compute the (signed) area of a parallelogram spanned by the vectors $$\mathbf{a}$$ and $$\mathbf{b}$$, the perp product can be used, as one interpretation is exactly the area of the parallelogram:

$\begin{array}{rl} \text{area}(\text{▱}\mathbf{a}\mathbf{b}) &= bh\\ &= |\mathbf{a}||\mathbf{b}|\sin\theta \\ &= \mathbf{a}\perp\mathbf{b} \end{array}$

### Area of a triangle

To compute the (signed) area of a triangle given its vertices $$P_1, P_2$$ and $$P_3$$, we can form the vectors $$\mathbf{a}=P_2-P_1$$ an $$\mathbf{b}=P_3-P_1$$. Since a triangle is half of a parallelogram, we get the area of the triangle $$\Delta P_1P_2P_3$$ as

$\text{area}(\Delta P_1P_2P_3) = \frac{1}{2}(\mathbf{a}\perp\mathbf{b})$

Which is a much more compact formula over the calculation using the determinant:

$\text{area}(\Delta P_1P_2P_3) = \frac{1}{2}\left|\begin{array}{ccc}P_1^x & P_1^y & 1\\ P_2^x & P_2^y & 1\\ P_3^x & P_3^y & 1\\\end{array}\right|$

The signed area of the solution is positive when the vertices $$P_1, P_2$$ and $$P_3$$ are oriented counterclockwise and negative when oriented clockwise. This way the sign can be used for testing the orientation of a triangle.

### Is point on left or right side of a line?

The perp product can be used to test if a point $$P_3$$ is on the left or right of a line formed by the points $$P_1$$ and $$P_2$$. The area is positive when the point is on the left of line $$P_1P_2$$ and on the right when the area is negative. The area is 0 when the point is on the line.

$$\mathbf{a}=P_2-P_1$$ an $$\mathbf{b}=P_3-P_1$$ gives

$\begin{array}{rl} \mathbf{a}\perp\mathbf{b}=0&\Leftrightarrow\mathbf{a}\text{ and }\mathbf{b}\text{ are collinear, i.e } |\theta|=\text{0° or 180°}\\ \mathbf{a}\perp\mathbf{b}>0&\Leftrightarrow P_3\text{ is on left of } P_1P_2\text{, i.e. }0<\theta<180^\circ\\ \mathbf{a}\perp\mathbf{b}<0&\Leftrightarrow P_3\text{ is on right of } P_1P_2\text{, i.e. }-180^\circ<\theta<0\\ \end{array}$

Since the three points form a triangle, $$|\theta|\leq 180^\circ$$.

### Shortest direction from one vector to the other

The perp product indicates the shortest rotation to get from $$\mathbf{a}$$ to $$\mathbf{b}$$. That is

$\mathbf{a}\perp\mathbf{b}>0 \Leftrightarrow \text{ direction is counter-clockwise}$

« Back to Book Overview