Soap is made from oil or animal fat reacting with sodium hydroxide or potassium hydroxide, while detergent is made from petroleum reacting with sulfuric acid and sodium hydroxide or potassium hydroxide. The main differences between soap and detergent are their source materials, examples of specific compounds, and molecular structures.