Peter Peregrinus conducted early experiments on magnetism in the 13th century and wrote the first treatise on magnetic properties called "Epistle of Magnete". In this letter from 1269, he explained how magnets attract and repel each other and how to identify the poles of a compass. Later in the 13th century, Maricourt discovered that a magnetized needle is guided by a lodestone and identified the north and south poles by drawing lines around it, finding the source of magnetic power resides at the poles. This established the basis for understanding how magnets interact through pole orientation.