Here's how to determine the formula:
* Aluminum (Al) is a metal in group 3, so it has a +3 charge (Al³⁺).
* Sulfur (S) is a nonmetal in group 16, so it has a -2 charge (S²⁻).
To balance the charges, we need two aluminum ions (2 x +3 = +6) and three sulfur ions (3 x -2 = -6). This results in the formula Al₂S₃.