# 3D vector questions.

1. Oct 21, 2007

### Joza

I have 2 vectors with their x, y and z components.

How do I evaluate A dot B? I know it is the product of their magnitudes and cosine of the angle between them. But it's this angle I can't figure out.

I have very limited experience with vectors so far, and none in 3 dimensional.

2. Oct 21, 2007

### HallsofIvy

Staff Emeritus
It's hard to answer your question because you haven't given any "context". Their are two equivalent ways of defining "dot product of two vectors":

1. $\vec{u}\cdot \vec{v}= |v||u|cos(\theta)$ where $\theta$ is the angle between the two vectors

2. If $\vec{u}= a\vec{i}+ b\vec{j}+ c\vec{k}[/tex] and [itex]v= d\vec{i}+ e\vec{j}+ f\vec{k}$, then $\vec{u}\cdot\vec{v}= ad +be+ cf$

Which are you using?

3. Oct 21, 2007

### ice109

definitely like this

4. Oct 22, 2007

### Feldoh

You can think of it like this:

$$\vec{u}= a_1\vec{}i+ b_1\vec{j}+ c_1\vec{k}$$

and

$$\vec{u}= a_2\vec{i}+ b_2\vec{j}+ c_2\vec{k}$$

If you want to find $$\vec{u}\cdot\vec{v}$$ you can think of it as expanding the two vectors through multiplication.

$\vec{u}\cdot\vec{v} = (a_1*a_2)\vec{i}\cdot\vec{i}+(a_1*b_2)\vec{i}\cdot\vec{j}+(a_1*c_2)\vec{i}\cdot\vec{k}+(b_1*a_2)\vec{j}\cdot\vec{i}+(b_1*b_2)\vec{j}\cdot\vec{j}+(b_1*c_2)\vec{j}\cdot\vec{k}+(c_1*a_2)\vec{k}\cdot\vec{i}+(c_1*b_2)\vec{k}\cdot\vec{j}+(c_1*c_2)\vec{k}\cdot\vec{k}$

But we know that if the terms are not the same (i.e., i dot j or j dot k) then they are perpendicular to each other right? The dot product, in a sense measures parallel-ness. So all the terms that are not the same become 0 since cos(90) = 0 which is their angle if they are perpendicular. All the terms that are the same go to 0 since they are parallel and cos(0) = 1 So we're left with:

$\vec{u}\cdot\vec{v} = (a_1*a_2)(1)+(b_1*b_2)(1)+(c_1*c_2)(1)$

Last edited: Oct 22, 2007