Gel electrophoresis is a technique used to separate DNA fragments by size. DNA is cut by restriction enzymes into different sized pieces, which are then loaded into an agarose gel. An electric current is applied, causing the negatively charged DNA fragments to migrate through the gel at different rates according to their size. Smaller fragments travel farther than larger ones. After running the gel, DNA bands can be visualized under UV light and the sizes of fragments determined by comparison to a DNA ladder of known sizes.