← Back to blog
Study science

Gram-Positive vs Gram-Negative Bacteria, Explained

Gram-positive vs gram-negative bacteria - how the cell walls differ, why the Gram stain works, and what it means for antibiotics, toxins and immunity.

Gram-positive and gram-negative are the first two boxes most bacteria get sorted into, and the sorting is not cosmetic. The difference is the structure of the cell wall, and that structure decides how a cell stains, which antibiotics reach it, what toxins it carries and how the immune system attacks it. It is the most reused idea in an intro microbiology course, so it pays to understand it rather than just memorize "purple and pink."

This explainer follows the cards in Encodr's free Microbiology course, which builds the topic in the cell unit and then returns to it in the units on drugs, toxins and immunity.

The short version

FeatureGram-positiveGram-negative
Peptidoglycan layerThick, about 30-100 nmThin, about 4 nm
Teichoic acidsYes, embedded in the wallNo
Outer membraneNoYes, containing lipopolysaccharide (LPS)
Periplasmic spaceNot a defining featureYes, between the inner and outer membranes
Color after Gram stainPurplePink or red
Endotoxin (lipid A of LPS)NoYes
Typical toxinsExotoxins, mainlyEndotoxin, plus some exotoxins
Quorum-sensing signalSmall peptidesN-acylated homoserine lactones

The two cell walls

Both kinds of bacteria build their wall from peptidoglycan: alternating sugar units called NAG and NAM, cross-linked by short peptide bridges into a mesh around the cell.

A gram-positive wall is mostly that mesh, many layers thick, sitting directly outside the plasma membrane. Teichoic acids are threaded through it and help stabilize the structure.

A gram-negative envelope has three layers, from the inside out: the plasma membrane, a thin peptidoglycan layer sitting in a gel-like periplasmic space, and an outer membrane. The outer membrane contains lipopolysaccharide, which is built from lipid A, a core glycolipid and an O-specific polysaccharide side chain. Porin channels in the outer membrane control what gets through.

So the gram-positive design is a thick wall with no outer membrane, and the gram-negative design is a thin wall with an extra membrane outside it. Everything below follows from that.

How the Gram stain tells them apart

The Gram stain is a differential stain: four reagents in a fixed order produce different colors for different wall types.

  1. Crystal violet, the primary stain. Every cell turns purple.
  2. Gram's iodine, the mordant. It forms a large crystal violet-iodine complex inside the cells.
  3. The decolorizer (ethanol or acetone). This is the step that separates the two groups. In gram-positive cells, the thick peptidoglycan traps the large dye complex, so the cells stay purple. In gram-negative cells, the thin wall can't hold it, the complex washes out, and the cells go colorless.
  4. Safranin, the counterstain. It colors the now-colorless gram-negative cells pink or red. The purple gram-positives look the same.

The useful exam habit is to reason from the steps. If the decolorizer is skipped, both groups stay purple. If safranin is skipped, gram-negatives end up colorless rather than pink. If you know why each step exists, you can answer any variation.

Why the difference matters

Antibiotics

Beta-lactams (penicillins, cephalosporins) and glycopeptides like vancomycin block the cross-linking of peptidoglycan. Gram-negatives have an extra obstacle: a drug has to cross the outer membrane first, mostly through porins. One resistance strategy in gram-negative bacteria is simply making fewer porins, so less drug gets in. Polymyxins such as colistin work differently, by disrupting the bacterial membrane directly.

The difference also defines spectrum. A narrow-spectrum drug might act only on gram-positive organisms; a broad-spectrum drug acts on a wide range of both groups, at a higher risk of wiping out normal flora and allowing a superinfection such as C. difficile.

Lab media use the same difference. MacConkey agar contains bile salts and crystal violet, which inhibit most gram-positives, so it selects for gram-negatives while also showing which ones ferment lactose.

Toxins

Endotoxin is the lipid A portion of LPS, so it exists only in gram-negative bacteria. It triggers a general inflammatory response, is heat-stable, and acts as an exogenous pyrogen: it makes white blood cells release the signals that cause fever. Exotoxins are secreted proteins with specific targets, produced mainly (not only) by gram-positive bacteria, and some are far more potent than endotoxin. Botulinum toxin is the classic example.

The immune system

Lysozyme in tears and saliva cuts the bond between NAG and NAM in peptidoglycan, and it works best against gram-positive cells, whose peptidoglycan is exposed on the outside. The complement system's membrane attack complex punches pores into membranes, and it lyses gram-negative bacteria; the thick gram-positive wall generally shields them from it.

The exceptions worth knowing

Named examples

Gram-positive bacteria split into two groups by DNA GC content. The firmicutes (low G+C) include Staphylococcus (S. aureus, MRSA), Streptococcus (S. pyogenes, S. pneumoniae), Clostridium (tetanus, botulism, gas gangrene) and Bacillus (B. anthracis). The actinobacteria (high G+C) include Mycobacterium, Corynebacterium diphtheriae and Streptomyces, the source of most clinically used antibiotics.

Gram-negative bacteria include the Proteobacteria, such as E. coli, Salmonella, Vibrio cholerae, Pseudomonas aeruginosa, Neisseria (N. meningitidis appears as gram-negative "coffee bean" diplococci), Bordetella pertussis, Helicobacter pylori and Campylobacter. Outside the Proteobacteria are the chlamydias, the spirochetes (Treponema pallidum, Borrelia burgdorferi), and Bacteroides in the gut.

The shape words come from medical vocabulary: -coccus means berry-shaped, so streptococci are chains of spheres and staphylococci are clusters. Medical prefixes, suffixes and root words covers the rest of those parts, and what's in Medical Terminology shows the course they come from.

Check yourself

Try these before reading the answers. Answering first, even wrongly, makes the correct answer stick better; the testing effect and the hypercorrection effect explain why.

  1. A cell has a thin peptidoglycan layer and an outer membrane. What color is it after a completed Gram stain? (Pink or red.)
  2. Which group contains endotoxin, and what part of LPS is it? (Gram-negative; lipid A.)
  3. Why does lysozyme work better on gram-positive bacteria? (Their peptidoglycan is thick and exposed, with no outer membrane over it.)
  4. Why doesn't penicillin treat walking pneumonia? (Mycoplasma has no cell wall to target.)
  5. A gram-negative organism reduces its porins. What happens to its antibiotic susceptibility? (Less drug enters, so it becomes more resistant.)

Comparison tables like the one at the top of this page are the fastest way to lock this down; how to memorize a list, a table or a formula sheet shows how to turn one into cards. For the wider picture, what's in Microbiology maps all 18 units and how to study for Microbiology gives a plan for the term. The course is free on Encodr as Microbiology flashcards, and the free gen ed course list has the rest.

Encodr turns this into a habit: study anything in a feed, and it schedules the rest.

Get started free

Related posts