Two equal and opposite charges placed at a very short distance from each other is called an electric dipole. For example NaCl, NaOH and water molecule are electric dipoles.
The dipole moment p is a fundamental property of dipoles. Dipole moment is equal to product of magnitude of charges of dipole and distance between the charges i.e
p = qd
where q is the magnitude of charges and d is the distance between them. Dipole moment is a vector and is always directed along the line joining the two charges pointing from negative charge towards the positive charge.
The electric field E due to a dipole at a point A at a distance x from the dipole is given as :-
E = kp/x^3
here p is the dipole moment and k is the coulomb's constant.
When we place the electric dipole in an external electrical field the force on positive end of the dipole will be in one direction and that on negative will be in other direction. These forces produce torque in the dipole. The dipole moment makes some angle with the external electrical field.
The torque tends to decrease this angle. The force acts on the dipole such that it tends to bring the dipole into the alignment with the external field. o rotate the dipole there must be some work done on the dipole. This work done is stored in the form of potential energy of the system of the field and dipole. When dipole moment of the dipole and the external electric field are parallel then the potential energy is minimum.