The acids react with an alkali like sodium hydroxide or potassium hydroxide to form the corresponding sodium or potassium salts. Fats and oils are first hydrolyzed to form glycerol and fatty acids. When potassium hydroxide is used instead of sodium hydroxide, potassium palmitate soap is formed. The process involves hydrolyzing fats or oils to form fatty acids and glycerol, and then reacting the fatty acids with an alkali like sodium hydroxide or potassium hydroxide to form soap.