Electricity and magnetism are the same force (and interestingly, using Einstein’s general relativity, you can “turn” one into the other just by looking at it differently). A moving magnetic field creates an opposing electric current and a moving electric current creates an opposing magnetic field. Even a wire is made of a nonmagnetic metal, the current flowing through it generates a magnetic field anyway.
Latest Answers