A commutator is a mechanism used to switch the input of most DC machines and certain AC machines consisting of slip ring segments insulated from each other and from the electric motor's shaft.