## Problem on finding a perpendicular vector

Using a cross product, find a vector in 2d that is 90 degrees counterclockwise from $\langle a, b\rangle$.
• ## Solution

Recall that
Because we are looking for a vector perpendicular to $\langle a,b\rangle$, we include $\langle a,b,0 \rangle$ as one of the vectors of the cross product.
Because we are looking for a vector that is in the 2d plane, we want to make sure the vector is perpendicular to $\langle 0,0,1\rangle$.
Thus, our candidate vector is $\langle a, b, 0\rangle \times \langle 0, 0, 1\rangle$.
We now check whether this vector is 90 degrees clockwise or counterclockwise from $\langle 1, 2 \rangle$.
Recall the right hand rule:
The right hand rule tells us that the cross product $\langle a, b, 0\rangle \times \langle 0, 0, 1\rangle$ is in the clockwise direction from $\langle a,b\rangle$.
To get the vector in the counterclockwise direction we take the cross product with $\langle 0, 0, -1 \rangle$ instead.
Hence, the 2d vector that is 90 degrees counterclockwise from $\langle a, b\rangle$ is $\langle -b, a \rangle$.