The dipole moment is a vector quantity and it has both, magnitude and direction. Considering an example of HCl. Due to the greater electronegativity of Cl-atom, the chemical bonding electron pair is shifted towards Cl-atom and it acquires small negative charge (- q) and hydrogen atom acquires small positive charge (+ q). If l is the distance of the charge separation usually taken in bond length,
then, µ = q × l.