Yes; electromagnetism works exactly the same in space. In fact, there are some very big magnets in space. The Earth is one of them! The biggest magnet in the entire solar system, however, is the Sun. It's magnetic field is enormous, with its influence encompassing all of the planets. <div class="Discussion_UserSignature"> <p> </p><p><font color="#666699"><em>"People assume that time is a strict progression of cause to effect, but actually from a non-linear, non-subjective viewpoint it's more like a big ball of wibbly wobbly . . . timey wimey . . . stuff."</em> -- The Tenth Doctor, "Blink"</font></p> </div>