Determining a perpendicular vector to two given vectors. I am given two vectors:
u = [0, 2, 1]
v = [1, -1, 3]

I need to find a vector that is perpendicular to both vectors u and v.
So far, this is what I have:
let n = [x, y, z]
eqn 1: 0x + 2y + z = 0
eqn 2: x - y + 3z = 0

I have to use matrices to find the other vector since this is
a systems of eqns question.

[0 2  1 | 0]     ...
[1 -1 3 | 0]  ~  ...

I don't know what to do next...
 A: Note that your system of equations has an infinite number of solutions. So, to help narrow things down, let's introduce an extra constraint. Assume that $y = 1$ [NOTE: Any other value would also work!]. Then from the first equation, we have:
$$2(1) + z = 0 \iff z = -2$$
Substitution into the second equation yields:
$$x - (1) + 3(-2) = 0 \iff x = 7$$
So we may choose $n = (7,1,-2).$
A: You can also use the fact that dot product of vectors equals zero if they are perpendicular. Let u and v be as in the question and z be the perpendicular vector, we have system of two equations:
$$u * z=0$$
$$v * z=0$$
Solving for example for $z_1$ and $z_2$ wolfram alpha gives:
$$z_1 = \frac{z_3(u_3v_2-u_2v_3)}{u_2v_1-u_1v_2}$$
$$z_2 = \frac{z_3(u_3v_1-u_1v_3)}{u_1v_2-u_2v_1}$$
And $z_3$ can be chosen freely. This method works for higher dimensional vectors as well.
A: You can simply use the cross product. 
$$u\times v = \begin{vmatrix} i & j & k \\ u_1 & u_2 & u_3 \\ v_1 & v_2 & v_3 \end{vmatrix} = (u_2v_3-v_2u_3)i-(u_1v_3-v_1u_3)j+(u_1v_2-v_1u_2)k.$$ Where $i,j,k$ are the components of your perpendicular vector $u\times v$. 
A: you can use null(n) in Matlab.
for example n=[1 0 0 -1]
answer is:
     0         0    0.7071
1.0000         0         0
     0    1.0000         0
     0         0    0.7071

Each of the columns are orthogonal.
A: $(0,2,1) \times (1,-1,3)$, that is, take the cross product of the two vectors:
$(2\cdot 3+1, 1-0, 0-2) = (7,1,-2)$
