If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Gel electrophoresis

A technique used to separate DNA fragments and other macromolecules by size and charge.

Key points:

  • Gel electrophoresis is a technique used to separate DNA fragments according to their size.
  • DNA samples are loaded into wells (indentations) at one end of a gel, and an electric current is applied to pull them through the gel.
  • DNA fragments are negatively charged, so they move towards the positive electrode. Because all DNA fragments have the same amount of charge per mass, small fragments move through the gel faster than large ones.
  • When a gel is stained with a DNA-binding dye, the DNA fragments can be seen as bands, each representing a group of same-sized DNA fragments.

Introduction

Suppose you have just done a PCR reaction, making many copies of a target DNA region. Or perhaps you’ve done some DNA cloning, trying to "paste" a gene into a circular DNA plasmid.
Now, you want to check and see whether your PCR worked, or whether your plasmid has the right gene in it. What technique can you use to visualize (directly observe) the fragments of DNA?

Gel electrophoresis

Gel electrophoresis is a technique used to separate DNA fragments (or other macromolecules, such as RNA and proteins) based on their size and charge. Electrophoresis involves running a current through a gel containing the molecules of interest. Based on their size and charge, the molecules will travel through the gel in different directions or at different speeds, allowing them to be separated from one another.
All DNA molecules have the same amount of charge per mass. Because of this, gel electrophoresis of DNA fragments separates them based on size only. Using electrophoresis, we can see how many different DNA fragments are present in a sample and how large they are relative to one another. We can also determine the absolute size of a piece of DNA by examining it next to a standard "yardstick" made up of DNA fragments of known sizes.

What is a gel?

As the name suggests, gel electrophoresis involves a gel: a slab of Jello-like material. Gels for DNA separation are often made out of a polysaccharide called agarose, which comes as dry, powdered flakes. When the agarose is heated in a buffer (water with some salts in it) and allowed to cool, it will form a solid, slightly squishy gel. At the molecular level, the gel is a matrix of agarose molecules that are held together by hydrogen bonds and form tiny pores.
At one end, the gel has pocket-like indentations called wells, which are where the DNA samples will be placed:
A sketch of a gel electrophoresis apparatus is shown. There is a power source with 2 lines extending from the power source to the apparatus. One line goes to the top of the apparatus and is attached and labeled with a negative symbol. The other line goes to the bottom of the apparatus and is attached and labeled with a positive symbol. At the top of the apparatus there are 4 small boxes with arrows pointing at each box and labeled wells. The middle of the tray in the apparatus has an arrow pointing to it and is labeled gel.
Before the DNA samples are added, the gel must be placed in a gel box. One end of the box is hooked to a positive electrode, while the other end is hooked to a negative electrode. The main body of the box, where the gel is placed, is filled with a salt-containing buffer solution that can conduct current. Although you may not be able to see in the image above (thanks to my amazing artistic skills), the buffer fills the gel box to a level where it just barely covers the gel.
The end of the gel with the wells is positioned towards the negative electrode. The end without wells (towards which the DNA fragments will migrate) is positioned towards the positive electrode.

How do DNA fragments move through the gel?

Once the gel is in the box, each of the DNA samples we want to examine (for instance, each PCR reaction or each restriction-digested plasmid) is carefully transferred into one of the wells. One well is reserved for a DNA ladder, a standard reference that contains DNA fragments of known lengths. Commercial DNA ladders come in different size ranges, so we would want to pick one with good "coverage" of the size range of our expected fragments.
Next, the power to the gel box is turned on, and current begins to flow through the gel. The DNA molecules have a negative charge because of the phosphate groups in their sugar-phosphate backbone, so they start moving through the matrix of the gel towards the positive pole. When the power is turned on and current is passing through the gel, the gel is said to be running.
DNA samples are loaded into wells at negative electrode end of gel.
Power is turned on and DNA fragments migrate through gel (towards the positive electrode).
After the gel has run, the fragments are separated by size. The largest fragments are near the top of the gel (negative electrode, where they began), and the smallest fragments are near the bottom (positive electrode).
Based on similar diagram in Reece et al.2
As the gel runs, shorter pieces of DNA will travel through the pores of the gel matrix faster than longer ones. After the gel has run for awhile, the shortest pieces of DNA will be close to the positive end of the gel, while the longest pieces of DNA will remain near the wells. Very short pieces of DNA may have run right off the end of the gel if we left it on for too long (something I've most definitely been guilty of!).

Visualizing the DNA fragments

Once the fragments have been separated, we can examine the gel and see what sizes of bands are found on it. When a gel is stained with a DNA-binding dye and placed under UV light, the DNA fragments will glow, allowing us to see the DNA present at different locations along the length of the gel.
An x-ray image of a gel electrophoresis blot. The image has 2 columns on a black background and to the left of the columns are the labels from top to bottom of 5000 bp, 1500 bp and 500bp. The first column of the image is labeled ladder, and there are multiple white lines visible from the top to the bottom of the column against the black background. The second row of the image is labeled PCR reaction and there is one thick white band located near the 500 bp label.
The bp next to each number in the ladder indicates how many base pairs long the DNA fragment is.
A well-defined “line” of DNA on a gel is called a band. Each band contains a large number of DNA fragments of the same size that have all traveled as a group to the same position. A single DNA fragment (or even a small group of DNA fragments) would not be visible by itself on a gel.
By comparing the bands in a sample to the DNA ladder, we can determine their approximate sizes. For instance, the bright band on the gel above is roughly 700 base pairs (bp) in size.

Check your understanding

Leftmost lane: ladder with 3000 bp, 1500 bp, and 500 bp bands marked on it.
Lane 1: 5000 bp band.
Lane 2: 100 bp band.
Lane 3: 1500 bp and 2000 bp bands.
Lane 4: 500 bp band.
Four lanes are numbered on the gel above. (A lane is a corridor through which DNA passes as it leaves a well.)
Which lane matches each description below?
1
2
3
4
This lane contains the longest DNA fragment.
This lane contains the shortest DNA fragment.
This lane contains a 1500 base pair (bp) DNA fragment.

Explore outside of Khan Academy

Do you want to learn more about gel electrophoresis? Check out this scrollable interactive and this simulation from LabXchange.
LabXchange is a free online science education platform created at Harvard’s Faculty of Arts and Sciences and supported by the Amgen Foundation.

Want to join the conversation?

  • leaf blue style avatar for user Kartikeya Sharma
    "All DNA molecules have the same amount of charge per mass. Because of this, gel electrophoresis of DNA fragments separates them based on size only."

    I don't get it.
    F=qE
    ma=qE
    a=qE/m
    and (q/m) is a constant.
    If all fragments have the same acceleration, then shouldn't they all move with the same speed?
    (22 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user gazar3049
      Great question.
      Your equations are correct but your model has assumptions. When you define that a=qE/m ,you assume that the only force acting on the DNA is the electric force from the electric field so that's why your calculation takes this as the resultant force since it is the resultant force which will accelerate a body according to Newton's second law.

      However, there's one more factor that comes in play. The DNA fragments move through the agarose gel so they are experiencing viscous drag as they move through the gel. This viscous drag is proportional to the mass of the DNA fragment . Let me explain why.

      The mass of the DNA fragment depends on the length of the DNA fragment. The longer the DNA fragment ,the more atoms it contains so the more electrons it contains . The more electrons in the DNA fragment ,the stronger the intermolecular london forces of attraction between the DNA fragment and the gel molecules so the greater the viscous drag experienced by the DNA fragment. Yes all your equations are correct and they travel at the same acceleration but it's the viscous drag through the gel that causes heavier DNA fragments to move slower than the lighter DNA fragments .I myself once had the same question in my mind but realized that the viscous drag is the game changer of the scenario. Hope I answered your amazing question.
      (89 votes)
  • duskpin ultimate style avatar for user Hassan Mohammad Alamin
    Is it possible to make gel electrophoresis determination machine in home ?
    (16 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user ruthpoh99
    Which poles are known as the cathode and anode? Sorry I get a bit confused with these two :\
    (16 votes)
    Default Khan Academy avatar avatar for user
    • starky tree style avatar for user Anais E
      In a galvanic (voltaic) cell, the anode is negative and the cathode is positive. However, in an electrolytic cell such as we have here, it's the reverse: the anode is positive and the cathode negative.
      This is because the flow of electrons goes in the opposite direction in the second system.
      (10 votes)
  • mr pink red style avatar for user Forrest T
    Are there more recently devloped methods to measure DNA length?
    (5 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Skylar Peven
      I would also add that researchers almost always use gel electrophoresis to at least check that the PCR was successful as sending a failed PCR product to another lab for sequencing etc. would be a complete waste of money and it's not cheap yet!
      (6 votes)
  • male robot hal style avatar for user Sualeha
    why do the bands appear to be of the same size while the DNA fragments vary in their sizes?
    (5 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Ollie Gould
    For example, you collect DNA from a particular sample and extract it, set up your gel and run it.

    Depending on the DNA size fragment and length, different bands will appear across the length of the gel.

    My question are: Why is the DNA fragmented?
    Is this variable for each human(for example) naturally? Why don't you get one large band?


    I'm guessing its variable but I would appreciate a link to learn more about DNA banding and its variability.
    (4 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user SULAGNA NANDI
    I don't understand how the length of a DNA fragment can be used to identify a person.

    Here's how I'm guessing it happens and the questions I have about it. There's much that might be wrong, so please let me know:

    Let's say you do PCR for a specific sequence on a hair cell from a crime scene. Firstly, how would you select the sequence to do PCR with?

    Then, let's say you did gel electrophoresis and found out the DNA for the chosen sequence is 5000 bp long. (Side question: why wouldn't you know the length of your target sequence before doing PCR?)

    Then, you take the hair cells of a few suspects (for simplicity, you know for sure that the culprit HAS to be one of them) and do PCR for the same sequence and gel electrophoresis. At this point, why would the different suspects have different lengths for that sequence? Doesn't a certain sequence have a fixed length?

    Let's say, somehow, only one suspect has 5000 bp for that sequence. Why does this mean that they are a match for the crime scene hair? How does having the same length for a sequence indicate identical genomes?

    Sorry about how long this was but I'm pretty confused so it'd be great if someone could explain.
    (5 votes)
    Default Khan Academy avatar avatar for user
  • leafers seed style avatar for user Kamini Joshi
    what does it mean to have multiple bands for same sample (for ex: sample#3 above). Also when two or more bands appear for the same sample, which band do we use to determine the size?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user `1
    I'm doing a lab in class on gel electrophoresis where a married lady was raped and she wants to find to whether her baby is from her husband or the rapist. The gel electrophoresis shows more shared bands between the child and the husband than the child and the rapist. I was wondering how accurate this procedure is and what more someone could do to be more certain that it is the husband. Can more DNA from these people be tested?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Jaclynellis1
    So when fragments of DNA are put in the gel electrophoresis box, do they keep moving toward the positive end until they reach a certain point where they stop, based on how many base - pairs long they are, indicated by the ladder? In other words, do they stop at a certain point that tells scientists how long they are? Because if they just kept moving toward the positive end (at different speeds), then the fragments would just pass each length interval on the ladder, and then scientists wouldn't know how many base - pairs long they actually are. Hope this makes sense.
    (2 votes)
    Default Khan Academy avatar avatar for user
    • female robot grace style avatar for user tyersome
      Everything (including the ladder) gets loaded at the same time in separate wells (slots/holes in the gel).

      This is done with the power supply turned off so there is no electric field.

      After loading the samples into the well you turn on the power§.

      This allows the DNA from the standard(s) (usually referred to as a ladder) and sample(s) to migrate in parallel.

      This means you can compare the sample(s) to the ladder(s) at any time.

      In general, the longer the gel is run the more separation you get, but the bands will also get fatter (more spread out).


      We generally decide when to stop the gel (turn off the voltage) based on the migration of one or more dye molecules included in the samples.

      These molecules migrates at known rates similar to those of a small DNA molecule.


      Does that help?


      §If you're smart you also double check that the samples are moving in the correct direction! (ADDENDUM: not that I've ever committed "retrophoresis", nope not me, I also didn't (re)invent a name for it ...
      (5 votes)