Using density functional theory and a combination of growing string and dimer method transition state searches, we investigate the interaction of phosphorus atoms with the silicon (001) surface.We report reaction pathways for three technologically important processes: diffusion of phosphorus adatoms on the surface, incorporation of the phosphorus adatom into the surface, and diffusion of the incorporated phosphorus atom within the surface. These reactions have direct relevance to nanoscale lithographic schemes capable of positioning single phosphorus atoms on the silicon surface. Temperatures of activation for the various processes are calculated and, where possible, compared with experiment.