Answer:
magnesium belongs to group 2 while nitrogen belongs to group 5.
I hope this helps
9.3m questions
12.0m answers