In R2, vectors orthogonal to (x,y) are trivially (y,-x). and (-y,x). Just normalize these if you want them unit length.
But since you seem more interested in using projections, which is good to know in a more general setting, here's a second approach:
Begin with the familiar projection formula
P(x,y)_(-3,1) = ((x,y)•(-3,1)/10) (-3,1)
This formula defines a mapping from R2 into R2. The mapping is further a linear transformation.
Apply this transformation to the standard ordered basis vectors [1,0] and [0,1] and you'll get the matrix of the transformation:
9/10 -3/10
-3/10 1/10
In this particular case, the transformation matrix would more commonly be referred to as a projection matrix, for obvious reasons.
Now note that the column space of a matrix is the orthogonal complement of the null space of its transpose. The column space of the matrix above is the space spanned by the vector [-3,1] because the matrix projects R2 onto the vector [-3,1]. So the null space of the transposed matrix with give a basis for everything orthogonal to [-3,1].
Reduce the transpose to RREF:
1 -1/3
0 0
which implies the null space has basis {[1,3]}. Now just normalize the basis vectors.
In a larger setting (R3 for instance), the orthogonal complement of a given set of vectors might have larger dimension, so that writing all the unit-length orthogonal vectors can only be done using a spanning set.
Sarah G.
Thank you, Tim! That really helped. Is it also alright to use the formula v-Proj(v onto u) to solve this (provided we are given vector v)? I've tried to solve similar questions that way and ended up with a different answer. Not sure why this may be.03/20/20