During agarose gel electrophoresis, the separation of DNA fragments is based on their size. The gel matrix, made of agarose, acts as a molecular sieve through which the DNA molecules can migrate. When an electric current is applied, DNA fragments are attracted towards the positive electrode (anode) and move through the gel towards it.
The gel is composed of pores of varying sizes, and smaller DNA fragments can move more easily through these pores than larger fragments. As a result, smaller DNA fragments migrate faster and farther through the gel compared to larger fragments, which experience more resistance and migrate more slowly.
Therefore, the basis for separation in agarose gel electrophoresis is the size of DNA fragments, with the smallest fragments migrating the fastest and the largest fragments migrating the slowest.