Applications of the scalar product

  • Magnitude of a vector.

    The scalar product can be used to determine the length of a vector u since: uu=|u||u|cos(uu^)=|u|2

    from which: u=uu

    So, we obtain, using the coordinates of the vector u=(u1,u2), u=u12+u22

Example

For u=(3,4), we have that |u|=u12+u22=32+42=25=5

  • Angle between two vectors.

    From the definition of the scalar product, uu=|u||u|cos(uu^) we can convert the cosine to another value: cos(uv^)=uv|u||v|

    Applying the function arcosine to both sides of the equality we obtain (ang=angle): ang(u,v)=arccos(uv|u||v|)

    So, if we have two vectors u=(u1,u2) and v=(v1,v2) we have:

    ang(u,v)=ang(v,u)=arccos(u1v1+u2v2u12+u22v12+v22)

Example

Find the angle formed by u=(2,3) and v=(1,4). In this case, applying the previous formula, we obtain: ang(u,v)=arccos(2(1)+3422+32(1)2+42)=arccos(0.67267)=474335