GO:1903830:   magnesium ion transmembrane transport
The directed movement of magnesium ion across a membrane.