# Finding the angel between two vectors

1. Apr 9, 2007

### ssb

I have two vectors

Vector A and B
Axi = -3
Ayj = 5.4

Bxi = 1.3
Byj = -3.9

I want the angle between them so I do the dot product

(-3)(1.3)+(5.4)(-3.9) = -24.96

Therefore the angle between them is

-24.96 = |-24.96|cos(theta)

Arccos(-24.96/24.96) = theta

Arccos(-1) = theta

Theta = pi = 180 degrees.

Is this correct?

2. Apr 9, 2007

### cristo

Staff Emeritus
Your calculation for the dot product is correct, however you have used the wrong formula: the formula you need is $$\vec{a}\cdot\vec{b}=|\vec{a}||\vec{b}|\cos\theta$$. How do you find the magnitude of a vector? (i.e. $|\vec{a}|$)

Last edited: Apr 9, 2007
3. Apr 9, 2007

### ssb

Ok so the magnitude of vector a would be
= sqrt(5.4^2 + 3^2)
= (3*sqrt(106))/5
= 6.18

Magnitude of B would be
= sqrt(-3.9^2 + 1.3^2)
= (13*sqrt(10))/10
= 4.11

therefore

-24.96 = abs(4.11) * abs(6.18) cos(theta)

Theta = arccos [(-24.96)/(abs(4.11) * abs(6.18))]

theta = 90 degrees = pi/2 radians

Does this look accurate?

4. Apr 9, 2007

### Mystic998

It can't be 90. That would imply the dot product is zero (see the formula mentioned)

5. Apr 9, 2007

### ssb

$$\vec{a}\cdot\vec{b}=|\vec{a}||\vec{b}|\cos\theta$$

I guess im still confused on the $$|\vec{a}||\vec{b}|$$ part

this would be finding the magnitudes then multiplying their absolute values together right? The magnitudes are found with pathegoran's theorem correct?

6. Apr 9, 2007

### cristo

Staff Emeritus
What is the value of [(-24.96)/(abs(4.11) * abs(6.18))]?

7. Apr 9, 2007

### ssb

its just about -1.

Find the angle between
A = -3i + 5.4j
B = 1.3i - 3.9j

(-3 * 1.3)+(5.4 * -3.9) = -24.96

-24.96 = ab cos(theta)

therefore

theta = arccos (-24.96/sqrt[(2^2+1.3^2)(5.4^2+(-3.9)^2)]

theta = domain error when I try to calculate it.

8. Apr 10, 2007

### HallsofIvy

Staff Emeritus
Where did you get that "2" in the square root? You should have
sqrt[((-3.9)^2+ 1.3^3)(5.4^2+ (-3.9)^2)].

9. Apr 10, 2007

### ssb

When you replaced my 2 with a -3.9, did you mean to replace it with a -3?

If this is the case then my questions have been answered!!

thanks everybody for helping me with this most basic topic