Angle between vectors

1. Jun 16, 2013

dudu3060

I have some question guys

i have four points in the x,y plane in cartesian coordinates.

A (Ax,Ay)
B(Bx,By)

C(Cx,Cy)
D(Dx,Dy)

A and B is vector G
C and D is vector F

I would like to know what is the equation to get the angle between those two vectors (G,F) . and what are the limitations of this equation.

thank you

2. Jun 16, 2013

Fredrik

Staff Emeritus
Are you familiar with the dot product? The angle $\theta$ between two vectors G and F satisfies $G\cdot F=|G||F|\cos\theta$.

When we're dealing with vectors in $\mathbb R^2$ or $\mathbb R^3$, this is a theorem. It holds for all pairs of vectors in those spaces. When we're dealing with an arbitrary inner product space over $\mathbb R$, we can instead take $\langle G,F\rangle=\|G\|\|F\|\cos\theta$ as the definition of "the angle between G and F". (If you don't know what that means, don't worry about it. These terms are explained in courses on linear algebra). This works because the Cauchy-Schwartz inequality ensures that
$$\frac{\langle G,F\rangle}{\|G\|\|F\|}\leq 1$$ for all G and F.

This isn't a textbook-style question, and it doesn't involve physics, so I'm moving it to linear algebra.

3. Jun 16, 2013

dudu3060

thank you!but..

it is for excel chart.
i dont know how to make the vectors for the equation when i use cartesian coordinate.
i mean how do i make the vector G from A(Ax,Ay) and B(Bx,By)
can someone write it down for me.

thank you !!!

4. Jun 16, 2013

Fredrik

Staff Emeritus
$G=B-A=(B_x,B_y)-(A_x,A_y)=(B_x-A_x,B_y-A_y)$

5. Jun 17, 2013

dudu3060

sorry again.

How do i make the last one to the dot product equation?

the vector G is not a number now but set of coordinates . again sorry but i am a novice and i need full explanation from start to end

thank you, youre a life saver

the dude

6. Jun 17, 2013

Fredrik

Staff Emeritus
Is this what you mean?
$$G\cdot F=(B_x-A_x,B_y-A_y)\cdot (D_x-C_x,D_y-C_y) =(B_x-A_x)(D_x-C_x)+(B_y-A_y)(D_y-C_y)$$ The norm $\|v\|$ of a vector $v=(x,y)$ is defined by $\|v\|=\sqrt{x^2+y^2}$.