The formula of the compound formed between a trivalent metal, M and a divalent non-metal,…