You will need

- A basic knowledge of geometry and algebra.

Instruction

1

The cosine of the angle between the vectors, find their dot product. The sum of the products of the respective coordinates of the vector equal to the product of their lengths into the cosine of the angle between them. Let the given two vectors: a(x1, y1) and b(x2, y2). Then the scalar product can be written as the equation: x1*x2 + y1*y2 = |a|*|b|*cos(U), where U is the angle between the vectors.

For example, the coordinates of the vector a(0, 3) and vector b(3, 4).

For example, the coordinates of the vector a(0, 3) and vector b(3, 4).

2

Expressing the equality cos(U) it turns out that cos(U) = (x1*x2 + y1*y2)/(|a|*|b|). In the example, the formula after substitution of known coordinates takes the form: cos(U) = (0*3 + 3*4)/(|a|*|b|) or cos(U) = 12/(|a|*|b|).

3

The length of the vectors is according to the formula: |a| = (x1^2 + y1^2)^1/2, |b| = (x2^2 + y2^2)^1/2. Substituting the coordinates of the vectors a(0, 3), b(3, 4) is obtained, respectively, |a|=3, |b|=5.

4

Substituting these values into the formula cos(U) = (x1*x2 + y1*y2)/(|a|*|b|), find the answer. Found using the lengths of vectors, we find that the cosine of the angle between the vectors a(0, 3), b(3, 4) is equal to: cos(U) = 12/15.

Note

If everything is calculated correctly, the cosine of the angle must be less than unity. Also the lengths of the vectors cannot be a negative number.

Useful advice

If the length of one of the vectors is zero, then it is zero vector, then the angle between it and another vector equal to 90 degrees.