The correct option is A optional
Mandatory means required by law or mandate; compulsory. The opposite of mandatory is optional, or available to be chosen but not obligatory. Hence, Option A is correct. Among the rest of the options, compulsory means required by law or a rule, imperative means of vital importance, irritating means causing annoyance, impatience, or mild anger. These options do not express this antonym, hence incorrect.