If $S= \{\emptyset, 5, \{1,5\}\}$, how many elements does $S^2$ have?
The answer to this question was given to be $9$, as $S$ has three elements so $S^2$ will have $9$, however, for example, by the principles of a cartesian product, there will be an element in which $\emptyset$ is multiplied by $\emptyset$, which I understand just to be $\emptyset$, which would mean that there would be less than $9$ elements.
Is my understanding flawed and there are indeed $9$ elements?
The Cartesian product merely assembles the elements of two sets in order. Here's is an excerpt from Wikipedia:
In your specific example, the product will consist of the nine pairs $(\varnothing,\varnothing),(\varnothing,5),(\varnothing,\{1,5\}), (5,\varnothing), (5,5), (5, \{1,5\}), (\{1,5\},\varnothing), (\{1,5\}, 5),$ and $(\{1,5\},\{1,5\})$.
In general, the notion of "multiplication" between set elements is ill-defined.