The theory of magnetism is that a magnet has two sides that if you put together the same side they repel and if you put the diferent sides together they connect.