Magnetic Field Basics

Magnetic fields are areas where an object exhibits a magnetic influence. The fields affect neighboring objects along things called magnetic field lines. A magnetic object can attract or push away another magnetic object. You also need to remember that magnetic forces are NOT related to gravity. The amount of gravity is based on an object's mass, while magnetic strength is based on the material that the object is made of.

Attracted and Repulsed
You know about charged particles. There are positive and negative charges. You also know that positive charges are attracted to negative charges. A French scientist named Andre-Marie Ampere studied the relationship between electricity and magnetism. He discovered that magnetic fields are produced by moving charges (current). And moving charges are affected by magnets. Stationary charges, on the other hand, do not produce magnetic fields, and are not affected by magnets. Two wires, with current flowing, when placed next to each other, may attract or repel like two magnets. It all has to do with moving charges.Earth's Magnetic Field

As noted earlier, current in wires produces a magnetic effect. You can increase the strength of that magnetic field by increasing the current through the wire. We can use this principle to make artificial, adjustable magnets called electromagnets, by making coils of wire, and then passing current through the coils.