Atomic level and below,manipulation of matter to make it do what we want.
Neodymium alloys. Neodymium is based on rare earth elements.Which apparently the Chinese have the supremacy on.
Initially the magnets were made of the rare earth elements samarium and cobolt.
The high cost of samarium/cobolt led to research into the production of Neodymium magnets. Stronger magnets but a lower Curie point. (ie the temp at which they lose their magneticism.)
he Nd2Fe14B crystal structure can be described as alternating layers of iron atoms and a neodymium-boron compound. The diamagnetic boron atoms do not contribute directly to the magnetism but improve cohesion by strong covalent bonding. The relatively low rare earth content (12% by volume, 26.7% by mass) and the relative abundance of neodymium and iron compared with samarium and cobalt makes neodymium magnets lower in price than samarium-cobalt magnets.
lots of sites talking about ebikes and magnets. I missed out there.