Finding the sets from a Cartesian product
If A×B is given and A, B are non-empty, the set of first elements of its ordered pairs is A, and the set of second elements is B. The figure shows this for A={x,y,z} and B={1,2,3}. The elements of A label the rows, the elements of B label the columns, and each cell is one ordered pair of A×B.

Number of elements in a Cartesian product
If n(A)=p and n(B)=q, then n(A×B)=pq. In the figure, n(A×B)=3×3=9. The same rule extends to ordered triplets: n(A×B×C)=n(A)×n(B)×n(C).
Based on the above, answer the following questions.
(i) If A×B={(a,1),(b,3),(a,3),(b,1),(a,2),(b,2)}, then A and B are
(A) {1,3,2}, {a,b}
(B) {a,b}, {1,3}
(C) {a,b}, {1,3,2}
(D) None of these
(ii) If the set A has 3 elements and A×A×B has 18 elements, then the number of elements in B is
(A) 6
(B) 3
(C) 9
(D) 2
(iii) A and B are two sets such that A×B has 6 elements. If three elements of A×B are (1,3), (2,5) and (3,3), then A and B are
(A) {1,2,3}, {3,5}
(B) {3,5}, {1,2,3}
(C) {1,2}, {3,5}
(D) {1,2,3}, {5}
(iv) The remaining elements of A×B in (iii) are
(A) (5,1), (3,2), (3,5)
(B) (1,5), (2,3), (3,5)
(C) (1,5), (3,2), (5,3)
(D) None of these