The conversation between human and AI assistant.
How is electricity related to magnetism?
How is this magnetic field generated around the wire?
The magnetic field is generated by the movement of electric charges in the wire. When the charges move, it creates a magnetic field perpendicular to the direction of the current.