Step 1: Understanding the Concept:
Hardy-Weinberg law has specific conditions.
It applies under certain mating systems.
Step 2: Key Formula or Approach:
No specific formula.
Need to know the conditions for Hardy-Weinberg.
Step 3: Detailed Explanation:
Hardy-Weinberg law applies to a random mating population.
It does not apply to self-fertilized populations.
Assortative mating is not random mating.
Thus, it applies only to random mating populations.
Step 4: Final Answer:
The Hardy-Weinberg law applies to random mating populations only.
Hence, the correct option is (B).