6
$\begingroup$

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

$\endgroup$
6
$\begingroup$

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

$\endgroup$
  • 1
    $\begingroup$ I understand that but we have not covered the cross product yet in my class. Is there another way to do it other than trial and error? $\endgroup$ – Ol' Reliable Sep 23 '13 at 2:20
  • $\begingroup$ Sorry, I was unaware of that but what you are doing also works you can solve this system using elimination. The system will actually have infinitely many solutions since you have more unknowns than equations. $\endgroup$ – RDizzl3 Sep 23 '13 at 2:24
3
$\begingroup$

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

$\endgroup$
1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ This question was asked over three years ago haha. $\endgroup$ – Harnoor Lal Feb 24 '17 at 15:21
  • 1
    $\begingroup$ @HarnoorLal I didn't realize that answering would bump the question up. Anyway, plenty of people still seem to have interest in it. $\endgroup$ – Dole Feb 24 '17 at 15:23
1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ Though OP has not specifically stated, I think the OP want's an analytic answer $\endgroup$ – Shailesh Apr 27 '17 at 6:29
0
$\begingroup$

$(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)$

$\endgroup$
  • 1
    $\begingroup$ Please try to format your posts, as a sample, I edited your post. $\endgroup$ – jgon Nov 7 '15 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.