To prove that H∪K is a subgroup of G, we need to show that it satisfies three conditions:(i) To prove that H∩K is a subgroup of G, we need to show that it satisfies three conditions:

- Closure: For any elements a and b in H⋅K, their product ab must also be in H⋅K.
- Identity: The identity element of G must be in H⋅K.
- Inverses: For every element a in H⋅K, its inverse a^(-1) must also be in H⋅K.

Let’s now prove these conditions:

- Closure: Let a and b be elements in H⋅K. By definition, this means a = hk and b = h’k’, where h, h’ ∈ H and k, k’ ∈ K. Now, consider their product: ab = (hk)(h’k’). Since H and K are subgroups of G, they are closed under multiplication, so hh’ ∈ H and kk’ ∈ K. Therefore, ab = (hk)(h’k’) = (hh’)(kk’) ∈ H⋅K. Thus, H⋅K is closed under multiplication.
- Identity: Since H and K are subgroups of G, they each contain the identity element of G. Let e_H be the identity element of H and e_K be the identity element of K. Thus, e_H ∈ H and e_K ∈ K. Therefore, the product e_He_K = e_G (where e_G is the identity element of G) is the identity element of H⋅K. Hence, the identity element of G is in H⋅K.
- Inverses: Let a = hk be an element in H⋅K, where h ∈ H and k ∈ K. Since H and K are subgroups, h^(-1) ∈ H and k^(-1) ∈ K. Consider the inverse of a: a^(-1) = (hk)^(-1) = k^(-1)h^(-1). Since k^(-1) ∈ K and h^(-1) ∈ H, we have a^(-1) ∈ H⋅K.

Thus, H⋅K satisfies all the conditions to be a subgroup of G.

(ii) To show that H⋅K need not be a subgroup of G, we need to provide a counterexample. Consider the group G = Z (the group of integers under addition). Let H = {2n | n ∈ Z} (the even integers) and K = {3n | n ∈ Z} (the multiples of 3).

It can be observed that both H and K are subgroups of G. However, their product H⋅K = {6n | n ∈ Z} (the multiples of 6) is not a subgroup of G.

To prove this, let’s consider the element 6. While 6 is in H⋅K since it is a multiple of 6, its inverse, -6, is not in H⋅K since there is no integer n such that 6n = -6. Hence, H⋅K fails to satisfy the condition of having inverses and, therefore, is not a subgroup of G in this case.

This counterexample demonstrates that the product of two subgroups need not always be a subgroup itself.