The chemical reactions and pathways involving the nonmetallic element phosphorus or compounds that contain phosphorus, usually in the form of a phosphate group (PO4). [ GOC:ai ]

Synonyms: phosphorus metabolism