# `u = cos(pi/4)i + sin(pi/4)j, v = cos(pi/2)i + sin(pi/2)j` Find the angle theta between the vectors.

*print*Print*list*Cite

You need to use the formula of dot product to find the angle between two vectors, `u = u_x*i + u_y*j, v = v_x*i + v_y*j` , such that:

`u*v = |u|*|v|*cos(theta)`

The angle between the vectors u and v is theta.

`cos theta = (u*v)/(|u|*|v|)`

First, you need to evaluate the product of the vectors u and v, such that:

`u*v = u_x*v_x + u_y*v_y`

`u*v = cos(pi/4)*cos(pi/2) + sin(pi/4)*sin(pi/2)`

`u*v = cos(pi/2-pi/4) = sin pi/4 = sqrt2/2`

You need to evaluate the magnitudes |u| and |v|, such that:

`|u|= sqrt(cos^2(pi/4) + sin^2(pi/4)) => |u|= sqrt(1) =>|u|= 1`

`|v|= sqrt(cos^2(pi/2) + sin^2(pi/2)) => |v|= sqrt(1) =>|v|= 1`

`cos theta = (sqrt2/2)/(1*1) => cos theta = sqrt2/2 => theta = pi/4`

**Hence, the cosine of the angle between the vectors u and v is `cos theta = sqrt2/2` , so, `theta = pi/4.` **