Here's how to figure that out:
* Aluminum (Al) is in Group 3A and has a +3 charge as a cation (Al³⁺).
* Nitrogen (N) is in Group 5A and has a -3 charge as an anion (N³⁻).
Since the charges are equal and opposite, they balance out perfectly in a 1:1 ratio, resulting in the formula AlN.