The field lines inside of a solenoid all go in one direction, right? So why doesn't a magnet that's placed in the solenoid simply get forced one way or another. I tried this at home by placing a magnet in the solenoid(near the outside of the coil so that it stuck out a bit), and when I turned on the current, the magnet slid either out of the solenoid or into the center of it(where it just stopped). I'm assuming that it slides out of the solenoid or gets pulled in depending on the polarity of the magnet/current. After it stopped in the middle, I pushed it further to the other end so that it was on the opposite end of the solenoid from where it started. When I turned on the current, it slid back into the center. Thus, it didn't simply get pushed one way or the other. Can anybody explain why this happens?