Catalyzes the 1,3-allylic rearrangement of the homoallylic substrate isopentenyl (IPP) to its highly electrophilic allylic isomer, dimethylallyl diphosphate (DMAPP). isopentenyl diphosphate = dimethylallyl diphosphate Binds 1 Mg(2+) ion per subunit. The magnesium ion binds only when substrate is bound. Binds 1 Mn(2+) ion per subunit. Isoprenoid biosynthesis; dimethylallyl diphosphate biosynthesis; dimethylallyl diphosphate from isopentenyl diphosphate: step 1/1. Homodimer. Belongs to the IPP isomerase type 1 family.