Margarine is a substitute for butter, prepared from vegetable and animal fats by emulsifying them with water and adding small…