Dear Student The function of commutator in an electric motor is to reverse the direction of current through the coil periodically. Regards