I got project on the working of inverter from school. I know this that DC inverter has an alternator switch which constantly changes its direction so that magnetic field is produced in primary coil due to which current is induced in secondary coil and we get output AC. So according to all this Electromagnetic induction should be the working principle behind the working of DC inverter. But DC can't take part in EMI, I know alternator is being used but it doesn't feels right. I hope I am right till this point I am taking following image as reference:
Please don't get mad at me if I got everything wrong.