# Help with dot product for vectors

1. Oct 4, 2009

### warfreak131

Question
Let vectors $$\vec{A} =(2,1,-4), \vec{B}=(-3,0,1), \vec{C}=(-1,-1,2).$$

What is the angle (in radians) $$\theta_{AB}$$ between $$\vec{A}$$ and $$\vec{B}$$?

Important equations
$$\vec{A} \cdot \vec{B} = \vert \vec{A} \vert \,\vert \vec{B}\vert \cos(\theta)$$, where $$\theta$$ is the angle between $$\vec{A}$$ and $$\vec{B}.$$

My attempt

$$\vec{A}\cdot\vec{B} = (2*-3) + (1*0) + (-4*1) = -6 - 4 = -10$$

$$|\vec{A}||\vec{B}| = (2*3) + (1*0) + (4*1) = 10$$

therefore, $$-10 = 10*cos(\theta)$$

$$-1 = cos(\theta)$$
$$arccos(-1) = \theta$$
$$180 = \theta$$
$$180 = \pi$$ $$radians$$

but it says $$\pi$$ isnt the right answer

But I don't think that sounds right, because $$\vec{A}$$ is at $$\arctan{\frac{1}{2}}$$ (26.7) degrees, and $$\vec{B}$$ runs along the negative X axis at 180 degrees, So thats a difference of 153.3 degrees. And if you convert that to radians, you get approximately $$\frac{17\pi}{20}$$ radians, which isnt right either.

Last edited: Oct 5, 2009
2. Oct 5, 2009

### mplayer

You did your dot product right but the magnitude of the vectors is wrong. Recall that the magnitude of a vector is square root of the sum of its individual components squared...the length of the vector.

For example, the magnitude of vector A would be |A| = sqrt(2^2 + 1^2 + -4^2) = sqrt(21)

Hope that helps.

3. Oct 5, 2009

### HallsofIvy

Staff Emeritus
This is wrong. Find |A| and |B| separately and then multiply!

$|A|= \sqrt{2^2+ 1^2+ (-4)^2}$