Vector Math Question

We have a vector A, which has the components a[sub]1[/sub]i + b[sub]1[/sub]j + c[sub]1[/sub]k and another vector B, which is perpindicular to A and has the components a[sub]2[/sub]i + b[sub]2[/sub]j + c[sub]2[/sub]k.

How can you find the components of the vectors (I think there would be two) that are also perpindicular to A and are angle θ (that’s theta if your browser doesn’t show it) away from B. The size of the vector doesn’t matter (not for my purposes anyway), just the angle.

It’s not entirely clear from your statement, but I’m assuming that ? is an angle measured from the plane defined by A and B. (I’m also finding your nomenclature a bit clunky; for clarity, I’ve made A=a[sub]1[/sub]i + a[sub]2[/sub]j + a[sub]3[/sub]k and so forth, so I don’t have to bend my brain trying to remember which vector component b[sub]3[/sub] belongs to.)

Conceptually, the easist way to do it would be to transform A into a coordinate system defined by A and B, figure the components (sin(?) and cos(?) to the appropriate vector components), and transform the results into the global coordinate system. (Alternatively, you could just figure the unit vectors of your angle vectors, transform them into the global, and then dot multiply your B vector.)

There’s probably a more clever way of doing this in a single step, but it’s been a while since I’ve had any use for 3D vector math, and the only way I can think of doing it results in having to resolve the components of a cross product and then having to back solve to find the angle vectors.

Stranger

The cross-product of two vectors, call them C and D, is perpendicular to both C and D and its length is the magnitude of C multiplied by the magnitude of D multiplied by the sine of the angle between them.

Your vector A is the cross-product and your vector B is one of the original two vectors (C). If you restrict the length of the other original vector (D) to be, for example, one (a unit vector), you have everything you need to solve.

Let’s call the vector you’re looking for C. We know that A is perpendicular to C, and the angle between B and C is theta. (Like Stranger, I’m using the naming convention A=(a[sub]1[/sub], a[sub]2[/sub], a[sub]3[/sub]) because it’s better.)

So, we know that the dot products of C with A and B are:
A dot C = a[sub]1[/sub]c[sub]1[/sub] +a[sub]2[/sub]c[sub]2[/sub] + a[sub]3[/sub]c[sub]3[/sub] = 0
B dot C = b[sub]1[/sub]c[sub]1[/sub] +b[sub]2[/sub]c[sub]2[/sub] + b[sub]3[/sub]c[sub]3[/sub] = BCcos(theta)

Since the magnitude of C is arbitrary, just set it to 1. Once we plug in all the values for A, B, and theta, we have two sets of equations for three variables. We just need one more equation, which we can get from taking the cross product of B and C:

B x C = BCsin(theta)

Plug in all your values and solve for the three unknowns using basic linear algebra.

Thank you much.

:: showers Giraffe, zut, and Stranger with praise ::

You read the textbook. This is the beginning of college classes across most of the USA, and this is straight out of the beginning of a multivariable calculus course. SDMB is not your homework help. Go to an office hour.

Wow. You nailed it. I am in multivariable calculus.

But this isn’t homework. Obviously, I can offer no proof of that beyond my honest word. I hope you trust me. If not… oh well.

I didn’t ask a teacher because we didn’t deal with this directly in class, and it seemed kind of silly to ask him about an idle curiosity. If this weren’t just an idle curiosity, I probably would have sat down and figured it out for myself.

But wait, is that last equation really linear? The left side should be the magnitude of B x C, which is gonna involve squaring stuff.

If the OP had been a homework problem, this would be the appropriate answer, but it’s ungracious to assume so.

As someone who has taught multivariable calculus for a number of years, and just finished teaching the chapter about vectors and dot products and cross products and such, I had to think about the OP’s problem for awhile. I tried working this out for a particular A, B, and theta, and I still haven’t come up with an answer, nor am I even sure whether this is because there’s something simple I’m missing or whether it really is a toughie. I don’t recall any “more clever way of doing this in a single step” that a textbook might have presented, and the method I came up with (essentially along Giraffe’s lines) has gotten messy and I don’t have time to keep working on it right now.

No, it’s not silly to ask the teacher. Why wouldn’t you?

God forbid a student actually ask his instructor anything. He might actually learn something, and we surely can’t have that.

Is it any wonder I hate undergraduates the way IT professionals hate computers?

Youv’e got your third equation right there – you don’t need to worry about BxC.
I.E. c[sub]1[/sub][sup]2[/sup] + c[sub]2[/sub][sup]2[/sup] + c[sub]3[/sub][sup]2[/sup] = 1;
From there you solve quadratically for the two sets of c’s that correspond to the two unit vectors you’re looking for.

That’s not a linear equation.

Stranger

Mathochist, your comments are out of line for GQ. Please refrain.

Thanks.

-xash
General Questions Moderator

I agree that you’re better off not using the cross-product equation. The components of the cross-product are things like (b[sub]2[/sub]c[sub]3[/sub]-b[sub]3[/sub]c[sub]2[/sub]), so the magnitude squared will contain terms like c[sub]2[/sub][sup]2[/sup] or c[sub]2[/sub]c[sub]3[/sub].

Here’s what you can do: start with the two dot product equations. Solve the first equation for c[sub]1[/sub] in terms of c[sub]2[/sub] and c[sub]3[/sub]. Then you can eliminate c[sub]1[/sub] from the second equation and solve for c[sub]2[/sub] in terms of c[sub]3[/sub]. Then eliminate c[sub]2[/sub] in your expression for c[sub]1[/sub], leaving an expression for c[sub]1[/sub] in terms of c[sub]3[/sub].

So, you’re left with expressions for both c[sub]1[/sub] and c[sub]2[/sub] in terms of c[sub]3[/sub] alone (i.e., c[sub]3[/sub] is the only unknown).

Then, use c[sub]1[/sub][sup]2[/sup] + c[sub]2[/sub][sup]2[/sup] + c[sub]3[/sub][sup]2[/sup] = 1, express the left side in terms of c[sub]3[/sub] alone, and solve for c[sub]3[/sub]. Yes, it’s quadratic in c[sub]3[/sub] so you use the quadratic formula and pick either of the two possible solutions.

It isn’t surprising that there are two solutions – consider our restrictions:

  1. The vector is perpendicular to A.

  2. The vector is at an angle theta relative to B

  3. The vector has magnitude 1 (we added this arbitrary restriction to simplify the problem – we can always multiply our answer by whatever magnitude we want after the fact.)

  4. specifies a plane, 2) specifies a cone, 3) specifies a sphere. The intersection between a cone and a sphere gives a circle (note: the center of the sphere and the vertex of the cone are at the origin), and the intersection of a circle and a plane is two points. Hence, two possible solutions.

Note: The above method isn’t totally general – e.g., if your first equation doesn’t contain c[sub]1[/sub], you can’t possibly solve it for c[sub]1[/sub]. But there are analogous ways to proceed for each case. It’s probably easiest to plug in numbers for all the known quantities at the start, so you won’t be as likely to accidentally divide by zero.

You could also use A cross B to get a third perpendicular vector C, and then use a linear combination of B and C to get a vector with the angle you want. To do this, I would first take the unit vectors in the directions of B and C, and the final vector would then be b cos(theta) + c sin(theta) (where the lower-case indicates unit vectors).

Or even less work, it doesn’t matter if B and C are unit vectors, so long as they’re the same size. So normalize A first, before you take the cross product.

I’ll admit Chronos’s way is simpler than mine. I hadn’t noticed that the OP specified A and B perpendicular, which simplifies things a bit.

Although a similar method works well even for a more general problem:

E.g.: Find a vector X (of magnitude X) such that for two vectors A and B (not scalar multiples of each other), the angle between A and X is phi, and the angle between B and X is theta.

Answer: X = a A + b B + c C, where C = A x B

The coefficients a, b, and c, can be determined as follows:
Let A, B, and C be the magnitudes of A, B, and C
Let D = A dot B

Then:

  1. A[sup]2[/sup]a + Db = AX cos(phi)
  2. Da + B[sup]2[/sup]b = BX cos(theta)
  3. A[sup]2[/sup]a[sup]2[/sup] + B[sup]2[/sup]b[sup]2[/sup] + C[sup]2[/sup]c[sup]2[/sup] = X[sup]2[/sup]

Solve for a and b using 1) and 2), and then solve for c using 3).


For the actual problem specified in the OP, we have phi = 90 degrees, D = 0, and C = AB.

Thus, the above equations reduce to

  1. a = 0
  2. Bb = X cos(theta)
  3. B[sup]2[/sup]b[sup]2[/sup] + A[sup]2[/sup]B[sup]2[/sup]c[sup]2[/sup] = X[sup]2[/sup]

From 2), we have (Bb/X)[sup]2[/sup] = cos[sup]2/sup
Thus, we can rewrite 3) as (AB/X)[sup]2[/sup]c[sup]2[/sup] = 1 - cos[sup]2/sup = sin[sup]2/sup

Thus,
c = (X/AB)sin(theta)
up to an arbitrary sign.

In other words,
X = (X/B) cos(theta)B + (X/AB) sin(theta)C = X [cos(theta) B/B + sin(theta) (A x B)/AB]

For the choice X = B, this is just
X = cos(theta) B + sin(theta) (A x B)/A
as Chronos said.

Transform method:

Given vectors A, and B, find C which is in the plane orthogonal to A and at an angle θ to B.

u is the unit vector associated with B.
w is the unit vector associated with A.
v = u x w.

u, v, and w are the orthogonal unit vectors that form the coordinate system of your A-B reference frame described above in terms of the global system. They are also the transform matrix, such that any vector, V, in the A-b frame can be translated by:


                   | u1 u2 u3 |
C = [ V1 V2 V3 ] . | v1 v2 v3 |
                   | w1 w2 w3 |

For our purposes, V = B [cos θ, sin θ, 0], which gives B (u cos θ + v sin θ ), which incidentally is the same result that Chronos gets (unsurprisingly, since you’re translating it from a coordinate system defined by those vectors). You can translate vectors the other way (from the global to the A-B frame) by inverting the matrix. Tons of fun for the whole family.

Stranger