The scalar or dot product of two vectors can be calculated by taking the component of one vector in the direction of the other and multiplying it by the magnitude of the other vector. The dot product of two vectors yields a scalar quantity.
If we have two vectors →A and →B, their scalar product is given by
→A.→B=|→A||→B|cosθ
Here, |→A| is the magnitude of →A.
|→B| is the magnitude of →B.
θ is the angle between →A and →B.