An introduction to general principles of magnets and electromagnetism, showing applications of magnetism to nanotechnology.