The chemical reactions and pathways involving the nonmetallic element phosphorus or compounds that contain phosphorus. [ GOC:ai ]

Synonyms: phosphorus metabolism