If an electric current flows through a wire, it will create a magnetic field. ... a ship or an airplane, it can damage or otherwise change the ship's magnetic compass.
Placing a magnetic compass in an electric circuit would interfere with its ability to accurately point to the Earth's magnetic north. The magnetic field generated by the electric current in the circuit would cause the compass needle to deflect from its normal orientation.
The needle of the compass will align itself with the magnetic field produced by the electromagnet due to the flow of electric current in the coil. The compass needle will point in the direction of the magnetic field lines, which are generated by the current passing through the coil of the electromagnet.
Direction of the magnetic lines too would get changed
magnetic compass will stop working.
When a small compass is placed in a magnetic field, the needle of the compass will align itself with the direction of the magnetic field. This is because the needle is magnetized and responds to the magnetic forces in the surrounding area.
If battery terminals are brought near a compass, the magnetic field produced by the flow of current in the battery can interfere with the Earth's magnetic field, causing the compass needle to deviate from its normal orientation. This can lead to inaccurate readings on the compass.
The compass needle would be affected by the magnetic field from the nearby magnet. The needle would align itself with the magnetic field of the magnet, causing the compass to point in a direction different from true north.
The compass needle will be unaffected by the presence of the aluminium bar as it is not magnetic. Aluminium is not a magnetic material, so it will not interfere with the function of the compass needle.
If a compass is suspended next to a conductor that is not carrying an electron flow, there will be no effect on the compass. The flow of electrons is what creates a magnetic field, so without electron flow in the conductor, there will be no interaction with the compass needle.
The compass needle would align itself with the magnetic field produced by the electromagnet. The north-seeking pole of the compass needle would point towards the south pole of the electromagnet, indicating the direction of the magnetic field.
Any time current flows through a conductor an electromagnetic field is formed around the length of that conductor. The direction of current flow determines the polarity of this magnetic field.
Your compass will always point to the earth's north magnetic pole. That spot is about 940 miles from the real north Pole. Your compass only points to real north if you happen to be on the extension of the line that joins the two spots. Anywhere else, your compass points to one side or the other of the real north Pole.