The bacterial cell envelope is one of the most important diagnostic and therapeutic features in microbiology. The Gram stain, developed by Hans Christian Gram, classifies bacteria based on cell wall architecture. Gram-positive bacteria possess a thick peptidoglycan layer and lack an outer membrane, retaining the crystal violet-iodine complex and appearing purple. Gram-negative bacteria have a thin peptidoglycan layer plus an outer membrane containing lipopolysaccharide (LPS); the alcohol/acetone decolorizer washes out the crystal violet, and the safranin counterstain renders them pink. The Gram stain procedure proceeds in four steps: crystal violet (primary stain), Gram's iodine (mordant), alcohol/acetone (decolorizer), and safranin (counterstain).
Peptidoglycan (murein), a polymer of alternating NAG and NAM sugars cross-linked by peptide chains, gives the cell wall its rigidity and is the target of lysozyme, an enzyme found in tears and saliva. Gram-positive walls also contain teichoic acid, a polymer that extends through the peptidoglycan and contributes to virulence and immune stimulation. In contrast, the LPS of Gram-negative organisms, specifically the lipid A component, acts as an endotoxin upon cell lysis. Two notable exceptions to the typical peptidoglycan-containing cell wall are Mycoplasma, which lacks a cell wall entirely and is therefore resistant to penicillin, and Mycobacterium, whose waxy mycolic acid layer renders it acid-fast and identifiable using the Ziehl-Neelsen stain, appearing bright red/pink against a blue background.
Bacteria also display characteristic external structures. Flagella provide motility through rotation of a flagellar motor, while pili (fimbriae) mediate adherence to host cells, with specialized sex pili enabling DNA transfer. A capsule is a tightly bound, well-organized polysaccharide layer that aids in adherence and immune evasion, whereas a slime layer is loosely attached and diffuse. Under stressful conditions, certain genera, notably Bacillus and Clostridium, form endospores, dormant, highly resistant structures visualized using malachite green in the Schaeffer-Fulton stain. Morphologically, bacteria appear as cocci (spherical), bacilli (rod-shaped), or spirilla/spirochetes (spiral), and they arrange into patterns such as diplococci (pairs), streptococci (chains), and staphylococci (grape-like clusters).