Simplifying the product of two expressions