Bacteria
Bacteria (singular: bacterium) are unicellular microorganisms. Typically a few micrometres in length, bacteria have a wide range of shapes, ranging from spheres to rods to spirals. Bacteria are ubiquitous in every habitat on Earth, growing in soil, Hot spring|acidic hot springs, radioactive waste, seawater, and deep in the Earth's crust. There are typically 40 million bacterial cells in a gram of soil and a million bacterial cells in a millilitre of fresh water; in all, there are approximately five nonillion (51030) bacteria on Earth, forming much of the world's biomass. Bacteria are vital in recycling nutrients, and many important steps in nutrient cycles depend on bacteria, such as the fixation of nitrogen from the atmosphere. However, most of these bacteria have not been characterized, and only about half of the phyla of bacteria have species that can be cultured in the laboratory. The study of bacteria is known as bacteriology, a branch of microbiology.
There are approximately ten times as many bacterial cells as human cells in the human body, with large numbers of bacteria on the skin and in the digestive tract. Although the vast majority of these bacteria are rendered harmless by the protective effects of the immune system, and a few are beneficial, some are pathogenic bacteria and cause infectious diseases, including cholera, syphilis, anthrax, leprosy and bubonic plague. The most common fatal bacterial diseases are respiratory infections, with tuberculosis alone killing about 2 million people a year, mostly in sub-Saharan Africa. In developed countries, antibiotics are used to treat bacterial infections and in various agricultural processes, so antibiotic resistance is becoming common. In industry, bacteria are important in processes such as sewage treatment, the production of cheese and yoghurt, and the manufacture of antibiotics and other chemicals.
Bacteria are prokaryotes. Unlike cells of animals and other eukaryotes, bacterial cells do not contain a nucleus and rarely harbour membrane-bound organelles. Although the term bacteria traditionally included all prokaryotes, the scientific classification changed after the discovery in the 1990s that prokaryotic life consists of two very different groups of organisms that evolved independently from an ancient common ancestor. These evolutionary domains are called Bacteria and Archaea.

# History of bacteriology
Bacteria were first observed by Antonie van Leeuwenhoek in 1676, using a single-lens microscope of his own design. He called them "animalcules" and published his observations in a series of letters to the Royal Society. The name bacterium was introduced much later, by Christian Gottfried Ehrenberg in 1838, and is derived from the Greek word  - , bacterion -a , meaning "small staff".
Louis Pasteur demonstrated in 1859 that the fermentation process is caused by the growth of microorganisms, and that this growth is not due to spontaneous generation. (Yeasts and molds, commonly associated with fermentation, are not bacteria, but rather fungi.) Along with his contemporary, Robert Koch, Pasteur was an early advocate of the germ theory of disease.
Robert Koch was a pioneer in medical microbiology and worked on cholera, anthrax and tuberculosis. In his research into tuberculosis, Koch finally proved the germ theory, for which he was awarded a Nobel Prize in 1905. In Koch's postulates, he set out criteria to test if an organism is the cause of a disease; these postulates are still used today.
Though it was known in the nineteenth century that bacteria are the cause of many diseases, no effective antibacterial treatments were available. In 1910, Paul Ehrlich developed the first antibiotic, by changing dyes that selectively stained Treponema pallidumthe spirochaete that causes syphilisinto compounds that selectively killed the pathogen. Ehrlich had been awarded a 1908 Nobel Prize for his work on immunology, and pioneered the use of stains to detect and identify bacteria, with his work being the basis of the Gram stain and the Ziehl-Neelsen stain.
A major step forward in the study of bacteria was the recognition in 1977 by Carl Woese that archaea have a separate line of evolutionary descent from bacteria. This new phylogenetic taxonomy was based on the sequencing of 16S ribosomal RNA, and divided prokaryotes into two evolutionary domains, as part of the three-domain system.

# Origin and early evolution
The ancestors of modern bacteria were single-celled microorganisms that were the first forms of life to develop on earth, about 4 billion years ago. For about 3 billion years, all organisms were microscopic, and bacteria and archaea were the dominant forms of life. Although bacterial fossils exist, such as stromatolites, their lack of distinctive morphology prevents them from being used to examine the past history of bacterial evolution, or to date the time of origin of a particular bacterial species. However, gene sequences can be used to reconstruct the bacterial phylogeny, and these studies indicate that bacteria diverged first from the archaeal/eukaryotic lineage. The most recent common ancestor of bacteria and archaea was probably a hyperthermophile that lived about 2.5 billion3.2 billion years ago.
Bacteria were also involved in the second great evolutionary divergence, that of the archaea and eukaryotes. Here, eukaryotes resulted from ancient bacteria entering into endosymbiotic associations with the ancestors of eukaryotic cells, which were themselves possibly related to the Archaea. This involved the engulfment by proto-eukaryotic cells of alpha-proteobacterial symbionts to form either mitochondria or hydrogenosomes, which are still being found in all known Eukarya (sometimes in highly reduced form, e.g. in ancient "amitochondrial" protozoa). Later on, an independent second engulfment by some mitochondria-containing eukaryotes of cyanobacterial-like organisms led to the formation of chloroplasts in algae and plants. There are even some algal groups known that clearly originated from subsequent events of endosymbiosis by heterotrophic eukaryotic hosts engulfing a eukaryotic algae that developed into "second-generation" plastids.

# Morphology
Bacteria display a wide diversity of shapes and sizes, called morphologies. Bacterial cells are about one tenth the size of eukaryotic cells and are typically 0.55.0 micrometres in length. However, a few speciesfor example Thiomargarita namibiensis and Epulopiscium fishelsoniare up to half a millimetre long and are visible to the unaided eye. Among the smallest bacteria are members of the genus Mycoplasma, which measure only 0.3 micrometres, as small as the largest viruses.
Most bacterial species are either spherical, called cocci (sing. coccus, from Greek kokkos, grain, seed) or rod-shaped, called bacilli (sing. bacillus, from Latin baculus, stick). Some rod-shaped bacteria, called vibrio, are slightly curved or comma-shaped; others, can be spiral-shaped, called spirilla, or tightly coiled, called spirochaetes. A small number of species even have tetrahedral or cuboidal shapes. This wide variety of shapes is determined by the bacterial cell wall and cytoskeleton, and is important because it can influence the ability of bacteria to acquire nutrients, attach to surfaces, swim through liquids and escape predators.
Many bacterial species exist simply as single cells, others associate in characteristic patterns: Neisseria form diploids (pairs), Streptococcus form chains, and Staphylococcus group together in "bunch of grapes" clusters. Bacteria can also be elongated to form filaments, for example the Actinobacteria. Filamentous bacteria are often surrounded by a sheath that contains many individual cells; certain types, such as species of the genus Nocardia, even form complex, branched filaments, similar in appearance to fungal mycelia.
Bacteria often attach to surfaces and form dense aggregations called biofilms or bacterial mats. These films can range from a few micrometers in thickness to up to half a meter in depth, and may contain  multiple species of bacteria, protists and archaea. Bacteria living in biofilms display a complex arrangement of cells and extracellular components, forming secondary structures such as microcolonies, through which there are networks of channels to enable better diffusion of nutrients. In natural environments, such as soil or the surfaces of plants, the majority of bacteria are bound to surfaces in biofilms. Biofilms are also important for chronic bacterial infections and infections of implanted medical devices, as bacteria protected within these structures are much harder to kill than individual bacteria.
Even more complex morphological changes are sometimes possible. For example, when starved of amino acids, Myxobacteria detect surrounding cells in a process known as quorum sensing, migrate towards each other, and aggregate to form fruiting bodies up to 500 micrometres long and containing approximately 100,000 bacterial cells. In these fruiting bodies, the bacteria perform separate tasks; this type of cooperation is a simple type of multicellular organisation. For example, about one in 10 cells migrate to the top of these fruiting bodies and differentiate into a specialised dormant state called myxospores, which are more resistant to desiccation and other adverse environmental conditions than are ordinary cells.

# Cellular structure

## Intracellular structures
The bacterial cell is surrounded by a lipid membrane, or cell membrane, which encompasses the contents of the cell and acts as a barrier to hold nutrients, proteins and other essential components of the cytoplasm within the cell. As they are prokaryotes, bacteria do not tend to have membrane-bound organelles in their cytoplasm and thus contain few intracellular structures. They consequently lack a nucleus, mitochondria, chloroplasts and the other organelles present in eukaryotic cells, such as the Golgi apparatus and endoplasmic reticulum. However, recent research is identifying increasing amounts of structural complexity in bacteria, such as the discovery of the prokaryotic cytoskeleton.
Many important biochemical reactions, such as energy generation, occur due to concentration gradients across membranes, creating a potential difference analogous to a battery. The absence of internal membranes in bacteria means these reactions, such as electron transport, occur across the cell membrane, between the cytoplasm and the periplasmic space.  Additionally, while some transporter proteins consume chemical energy, others harness concentration gradients to import nutrients across the cell membrane or to expel undesired molecules from the cytoplasm.
Bacteria do not have a membrane-bound nucleus, and their genetic material is typically a single circular chromosome located in the cytoplasm in an irregularly shaped body called the nucleoid. The nucleoid contains the chromosome with associated proteins and RNA. Like all living organisms, bacteria contain ribosomes for the production of proteins, but the structure of the bacterial ribosome is different from those of eukaryotes and Archaea. The order Planctomycetes are an exception to the general absence of internal membranes in bacteria, because they have a membrane around their nucleoid and contain other membrane-bound cellular structures.
Some bacteria produce intracellular nutrient storage granules, such as glycogen, polyphosphate, sulfur or polyhydroxyalkanoates. These granules enable bacteria to store compounds for later use. Certain bacterial species, such as the photosynthetic Cyanobacteria, produce internal gas vesicles, which they use to regulate their buoyancy - allowing them to move up or down into water layers with different light intensities and nutrient levels.

## Extracellular structures
Around the outside of the cell membrane is the bacterial cell wall. Bacterial cell walls are made of peptidoglycan (called murein in older sources), which is made from polysaccharide chains cross-linked by unusual peptides containing D-amino acids. Bacterial cell walls are different from the cell walls of plants and fungi, which are made of cellulose and chitin, respectively. The cell wall of bacteria is also distinct from that of Archaea, which do not contain peptidoglycan. The cell wall is essential to the survival of many bacteria, and the antibiotic penicillin is able to kill bacteria by inhibiting a step in the synthesis of peptidoglycan.
There are broadly speaking two different types of cell wall in bacteria, called Gram-positive and Gram-negative. The names originate from the reaction of cells to the Gram stain, a test long-employed for the classification of bacterial species.
Gram-positive bacteria possess a thick cell wall containing many layers of peptidoglycan and teichoic acids. In contrast, Gram-negative bacteria have a relatively thin cell wall consisting of a few layers of peptidoglycan surrounded by a second lipid membrane containing lipopolysaccharides and lipoproteins. Most bacteria have the Gram-negative cell wall, and only the Firmicutes and Actinobacteria (previously known as the low G+C and high G+C Gram-positive bacteria, respectively) have the alternative Gram-positive arrangement. These differences in structure can produce differences in antibiotic susceptibility; for instance, vancomycin can kill only Gram-positive bacteria and is ineffective against Gram-negative pathogens, such as Haemophilus influenzae or Pseudomonas aeruginosa.
In many bacteria an S-layer of rigidly arrayed protein molecules covers the outside of the cell. This layer provides chemical and physical protection for the cell surface and can act as a macromolecular diffusion barrier. S-layers have diverse but mostly poorly understood functions, but are known to act as virulence factors in Campylobacter and contain surface enzymes in Bacillus stearothermophilus.
Flagella are rigid protein structures, about 20 nanometres in diameter and up to 20 micrometres in length, that are used for motility. Flagella are driven by the energy released by the transfer of ions down an electrochemical gradient across the cell membrane.
Fimbriae are fine filaments of protein, just 210 nanometres in diameter and up to several micrometers in length. They are distributed over the surface of the cell, and resemble fine hairs when seen under the electron microscope. Fimbriae are believed to be involved in attachment to solid surfaces or to other cells and are essential for the virulence of some bacterial pathogens. Pili (sing. pilus) are cellular appendages, slightly larger than fimbriae, that can transfer genetic material between bacterial cells in a process called conjugation (see bacterial genetics, below).
Capsules or slime layers are produced by many bacteria to surround their cells, and vary in structural complexity: ranging from a disorganised slime layer of extra-cellular polymer, to a highly structured capsule or glycocalyx. These structures can protect cells from engulfment by eukaryotic cells, such as macrophages. They can also act as antigens and be involved in cell recognition, as well as aiding attachment to surfaces and the formation of biofilms.
The assembly of these extracellular structures is dependent on bacterial secretion systems. These transfer proteins from the cytoplasm into the periplasm or into the environment around the cell. Many types of secretion systems are known and these structures are often essential for the virulence of pathogens, so are intensively studied.

## Endospores
Certain genera of Gram-positive bacteria, such as Bacillus, Clostridium, Sporohalobacter, Anaerobacter and Heliobacterium, can form highly resistant, dormant structures called endospores. In almost all cases, one endospore is formed and this is not a reproductive process, although Anaerobacter can make up to seven endospores in a single cell. Endospores have a central core of cytoplasm containing DNA and ribosomes surrounded by a cortex layer and protected by an impermeable and rigid coat.
Endospores show no detectable metabolism and can survive extreme physical and chemical stresses, such as high levels of UV light, gamma radiation, detergents, disinfectants, heat, pressure and desiccation. In this dormant state, these organisms may remain viable for millions of years, and endospores even allow bacteria to survive exposure to the vacuum and radiation in space. Endospore-forming bacteria can also cause disease: for example, anthrax can be contracted by the inhalation of Bacillus anthracis endospores, and contamination of deep puncture wounds with Clostridium tetani endospores causes tetanus.

# Metabolism
In contrast to higher organisms, bacteria exhibit an extremely wide variety of metabolic types. The distribution of metabolic traits within a group of bacteria has traditionally been used to define their taxonomy, but these traits often do not correspond with modern genetic classifications. Bacterial metabolism is classified on the basis of three major criteria: the kind of energy used for growth, the source of carbon, and the electron donors used for growth. An additional criterion of respiratory microorganisms are the electron acceptors used for aerobic or anaerobic respiration.
Carbon metabolism in bacteria is either heterotrophic, where organic carbon compounds are used as carbon sources, or autotrophic, meaning that cellular carbon is obtained by fixing carbon dioxide. Typical autotrophic bacteria are phototrophic cyanobacteria, green sulfur-bacteria and some purple bacteria, but also many chemolithotrophic species, such as nitrifying or sulfur-oxidising bacteria. Energy metabolism of bacteria is either based on phototrophy, the use of light through photosynthesis, or on chemotrophy, the use of chemical substances for energy, which are mostly oxidised at the expense of oxygen or alternative electron acceptors (aerobic/anaerobic respiration).
Finally, bacteria are further divided into lithotrophs that use inorganic electron donors and organotrophs that use organic compounds as electron donors. Chemotrophic organisms use the respective electron donors for energy conservation (by aerobic/anaerobic respiration or fermentation) and biosynthetic reactions (e.g. carbon dioxide fixation), whereas phototrophic organisms use them only for biosynthetic purposes. Respiratory organisms use chemical compounds as a source of energy by taking electrons from the reduced substrate and transferring them to a terminal electron acceptor in a redox reaction. This reaction releases energy that can be used to synthesise ATP and drive metabolism. In aerobic organisms, oxygen is used as the electron acceptor. In anaerobic organisms other inorganic compounds, such as nitrate, sulfate or carbon dioxide are used as electron acceptors. This leads to the ecologically important processes of denitrification, sulfate reduction and acetogenesis, respectively.
Another way of life of chemotrophs in the absence of possible electron acceptors is fermentation, where the electrons taken from the reduced substrates are transferred to oxidised intermediates to generate reduced fermentation products (e.g. lactate, ethanol, hydrogen, butyric acid). Fermentation is possible, because the energy content of the substrates is higher than that of the products, which allows the organisms to synthesise ATP and drive their metabolism.
These processes are also important in biological responses to pollution; for example, sulfate-reducing bacteria are largely responsible for the production of the highly toxic forms of mercury (methyl- and dimethylmercury) in the environment. Non-respiratory anaerobes use fermentation to generate energy and reducing power, secreting metabolic by-products (such as ethanol in brewing) as waste. Facultative anaerobes can switch between fermentation and different terminal electron acceptors depending on the environmental conditions in which they find themselves.
Lithotrophic bacteria can use inorganic compounds as a source of energy. Common inorganic electron donors are hydrogen, carbon monoxide, ammonia (leading to nitrification), ferrous iron and other reduced metal ions, and several reduced sulfur compounds. Unusually, the gas methane can be used by methanotrophic bacteria as both a source of electrons and a substrate for carbon anabolism. In both aerobic phototrophy and chemolithotrophy, oxygen is used as a terminal electron acceptor, while under anaerobic conditions inorganic compounds are used instead. Most lithotrophic organisms are autotrophic, whereas organotrophic organisms are heterotrophic.
In addition to fixing carbon dioxide in photosynthesis, some bacteria also fix nitrogen gas (nitrogen fixation) using the enzyme nitrogenase. This environmentally important trait can be found in bacteria of nearly all the metabolic types listed above, but is not universal.

# Growth and reproduction
Unlike multicellular organisms, increases in the size of bacteria (cell growth) and their reproduction by cell division are tightly linked in unicellular organisms. Bacteria grow to a fixed size and then reproduce through binary fission, a form of asexual reproduction. Under optimal conditions, bacteria can grow and divide extremely rapidly, and bacterial populations can double as quickly as every 9.8 minutes. In cell division, two identical clone daughter cells are produced. Some bacteria, while still reproducing asexually, form more complex reproductive structures that help disperse the newly-formed daughter cells. Examples include fruiting body formation by Myxobacteria and arial hyphae formation by Streptomyces, or budding. Budding involves a cell forming a protrusion that breaks away and produces a daughter cell.
In the laboratory, bacteria are usually grown using solid or liquid media. Solid growth media such as agar plates are used to isolate pure cultures of a bacterial strain. However, liquid growth media are used when measurement of growth or large volumes of cells are required. Growth in stirred liquid media occurs as an even cell suspension, making the cultures easy to divide and transfer, although isolating single bacteria from liquid media is difficult. The use of selective media (media with specific nutrients added or deficient, or with antibiotics added) can help identify specific organisms.
Most laboratory techniques for growing bacteria use high levels of nutrients to produce large amounts of cells cheaply and quickly. However, in natural environments nutrients are limited, meaning that bacteria cannot continue to reproduce indefinitely. This nutrient limitation has led the evolution of different growth strategies (see r/K selection theory). Some organisms can grow extremely rapidly when nutrients become available, such as the formation of algal (and cyanobacterial) blooms that often occur in lakes during the summer. Other organisms have adaptations to harsh environments, such as the production of multiple antibiotics by Streptomyces that inhibit the growth of competing microorganisms. In nature, many organisms live in communities (e.g. biofilms) which may allow for increased supply of nutrients and protection from environmental stresses. These relationships can be essential for growth of a particular organism or group of organisms (syntrophy).
Bacterial growth follows three phases. When a population of bacteria first enter a high-nutrient environment that allows growth, the cells need to adapt to their new environment. The first phase of growth is the lag phase, a period of slow growth when the cells are adapting to the high-nutrient environment and preparing for fast growth. The lag phase has high biosynthesis rates, as proteins necessary for rapid growth are produced. The second phase of growth is the logarithmic phase (log phase), also known as the exponential phase. The log phase is marked by rapid exponential growth. The rate at which cells grow during this phase is known as the growth rate (k), and the time it takes the cells to double is known as the generation time (g). During log phase, nutrients are metabolised at maximum speed until one of the nutrients is depleted and starts limiting growth. The final phase of growth is the stationary phase and is caused by depleted nutrients. The cells reduce their metabolic activity and consume non-essential cellular proteins. The stationary phase is a transition from rapid growth to a stress response state and there is increased expression of genes involved in DNA repair, antioxidant metabolism and nutrient transport.

# Genetics
Most bacteria have a single circular chromosome that can range in size from only 160,000 base pairs in the endosymbiotic bacteria Candidatus Carsonella ruddii, to 12,200,000 base pairs in the soil-dwelling bacteria Sorangium cellulosum. Spirochaetes of the genus Borrelia are a notable exception to this arrangement, with bacteria such as Borrelia burgdorferi, the cause of Lyme disease, containing a single linear chromosome. The genes in bacterial genomes are usually a single continuous stretch of DNA and although several different types of introns do exist in bacteria, these are much more rare than in eukaryotes.
Bacteria may also contain plasmids, which are small extra-chromosomal DNAs that may contain genes for antibiotic resistance or virulence factors. Another type of bacterial DNA are integrated viruses (bacteriophages). Many types of bacteriophage exist, some simply infect and lyse their host bacteria, while others insert into the bacterial chromosome. A bacteriophage can contain genes that contribute to its host's phenotype: for example, in the evolution of Escherichia coli O157:H7 and Clostridium botulinum, the toxin genes in an integrated phage converted a harmless ancestral bacteria into a lethal pathogen.
Bacteria, as asexual organisms, inherit identical copies of their parent's genes (i.e., they are clonal). However, all bacteria can evolve by selection on changes to their genetic material DNA caused by genetic recombination or mutations. Mutations come from errors made during the replication of DNA or from exposure to mutagens. Mutation rates vary widely among different species of bacteria and even among different clones of a single species of bacteria. Genetic changes in bacterial genomes come from either random mutation during replication or "stress-directed mutation", where genes involved in a particular growth-limiting process have an increased mutation rate.
Some bacteria also transfer genetic material between cells. This can occur in three main ways. Firstly, bacteria can take up exogenous DNA from their environment, in a process called transformation. Genes can also be transferred by the process of transduction, when the integration of a bacteriophage introduces foreign DNA into the chromosome. The third method of gene transfer is bacterial conjugation, where DNA is transferred through direct cell contact. This gene acquisition from other bacteria or the environment is called horizontal gene transfer and may be common under natural conditions. Gene transfer is particularly important in antibiotic resistance as it allows the rapid transfer of resistance genes between different pathogens.

# Movement
Motile bacteria can move using flagella, bacterial gliding, twitching motility or changes of buoyancy.  In twitching motility, bacterial use their type IV pili as a grappling hook, repeatedly extending it, anchoring it and then retracting it with remarkable force (>80 pN).
Bacterial species differ in the number and arrangement of flagella on their surface; some have a single flagellum (monotrichous), a flagellum at each end (amphitrichous), clusters of flagella at the poles of the cell (lophotrichous), while others have flagella distributed over the entire surface of the cell (peritrichous). The bacterial flagella is the best-understood motility structure in any organism and is made of about 20 proteins, with approximately another 30 proteins required for its regulation and assembly. The flagellum is a rotating structure driven by a motor at the base that uses the electrochemical gradient across the membrane for power. This motor drives the motion of the filament, which acts as a propeller. Many bacteria (such as E. coli) have two distinct modes of movement: forward movement (swimming) and tumbling. The tumbling allows them to reorient and makes their movement a three-dimensional random walk. (See external links below for link to videos.) The flagella of a unique group of bacteria, the spirochaetes, are found between two membranes in the periplasmic space. They have a distinctive helical body that twists about as it moves.
Motile bacteria are attracted or repelled by certain stimuli in behaviors called taxes: these include chemotaxis, phototaxis and magnetotaxis. In one peculiar group, the myxobacteria, individual bacteria move together to form waves of cells that then differentiate to form fruiting bodies containing spores. The myxobacteria move only when on solid surfaces, unlike E. coli which is motile in liquid or solid media.
Several Listeria and Shigella species move inside host cells by usurping the cytoskeleton, which is normally used to move organelles inside the cell. By promoting actin polymerization at one pole of their cells, they can form a kind of tail that pushes them through the host cell's cytoplasm.

# Classification and identification
Classification seeks to describe the diversity of bacterial species by naming and grouping organisms based on similarities. Bacteria can be classified on the basis of cell structure, cellular metabolism or on differences in cell components such as DNA, fatty acids, pigments, antigens and quinones. While these schemes allowed the identification and classification of bacterial strains, it was unclear whether these differences represented variation between distinct species or between strains of the same species. This uncertainty was due to the lack of distinctive structures in most bacteria, as well as lateral gene transfer between unrelated species. Due to lateral gene transfer, some closely related bacteria can have very different morphologies and metabolisms. To overcome this uncertainty, modern bacterial classification emphasizes molecular systematics, using genetic techniques such as guanine cytosine ratio determination, genome-genome hybridization, as well as sequencing genes that have not undergone extensive lateral gene transfer, such as the rRNA gene.  Classification of bacteria is determined by publication in the International Journal of Systematic Bacteriology, and Bergey's Manual of Systematic Bacteriology.
The term "bacteria" was traditionally applied to all microscopic, single-celled prokaryotes. However, molecular systematics showed prokaryotic life to consist of two separate domains, originally called Eubacteria and Archaebacteria, but now called Bacteria and Archaea that evolved independently from an ancient common ancestor. The archaea and eukaryotes are more closely-related to each other than either is to the bacteria. These two domains, along with Eukarya, are the basis of the three-domain system, which is currently the most widely used classification system in microbiolology. However, due to the relatively recent introduction of molecular systematics and a rapid increase in the number of genome sequences that are available, bacterial classification remains a changing and expanding field. For example, a few biologists argue that the Archaea and Eukaryotes evolved from Gram-positive bacteria.
Identification of bacteria in the laboratory is particularly relevant in medicine, where the correct treatment is determined by the bacterial species causing an infection. Consequently, the need to identify human pathogens was a major impetus for the development of techniques to identify bacteria.
The Gram stain, developed in 1884 by Hans Christian Gram, characterises bacteria based on the structural characteristics of their cell walls. The thick layers of peptidoglycan in the "Gram-positive" cell wall stain purple, while the thin "Gram-negative" cell wall appears pink. By combining morphology and Gram-staining, most bacteria can be classified as belonging to one of four groups (Gram-positive cocci, Gram-positive bacilli, Gram-negative cocci and Gram-negative bacilli). Some organisms are best identified by stains other than the Gram stain, particularly mycobacteria or Nocardia, which show acid-fastness on ZiehlNeelsen or similar stains. Other organisms may need to be identified by their growth in special media, or by other techniques, such as serology.
Culture techniques are designed to promote the growth and identify particular bacteria, while restricting the growth of the other bacteria in the sample. Often these techniques are designed for specific specimens; for example, a sputum sample will be treated to identify organisms that cause pneumonia, while stool specimens are cultured on selective media to identify organisms that cause diarrhoea, while preventing growth of non-pathogenic bacteria. Specimens that are normally sterile, such as blood, urine or spinal fluid, are cultured under conditions designed to grow all possible organisms. Once a pathogenic organism has been isolated, it can be further characterised by its morphology, growth patterns such as (aerobic or anaerobic growth, patterns of hemolysis) and staining.
As with bacterial classification, identification of bacteria is increasingly using molecular methods. Diagnostics using such DNA-based tools, such as polymerase chain reaction, are increasingly popular due to their specificity and speed, compared to culture-based methods. These methods also allow the detection and identification of "viable but nonculturable" cells that are metabolically active but non-dividing. However, even using these improved methods, the total number of bacterial species is not known and cannot even be estimated with any certainty. Attempts to quantify bacterial diversity have ranged from 107 to 109 total species, but even these diverse estimates may be out by many orders of magnitude.

# Interactions with other organisms
Despite their apparent simplicity, bacteria can form complex associations with other organisms. These symbiotic associations can be divided into parasitism, mutualism and commensalism. Due to their small size, commensal bacteria are ubiquitous and grow on animals and plants exactly as they will grow on any other surface. However, their growth can be increased by warmth and sweat, and large populations of these organisms in humans are the cause of body odor.

## Mutualists
Certain bacteria form close spatial associations that are essential for their survival. One such mutualistic association, called interspecies hydrogen transfer, occurs between clusters of anaerobic bacteria that consume organic acids such as butyric acid or propionic acid and produce hydrogen, and methanogenic Archaea that consume hydrogen. The bacteria in this association are unable to consume the organic acids as this reaction produces hydrogen that accumulates in their surroundings. Only the intimate association with the hydrogen-consuming Archaea keeps the hydrogen concentration low enough to allow the bacteria to grow.
In soil, microorganisms which reside in the rhizosphere (a zone that includes the root surface and the soil that adheres to the root after gentle shaking) carry out nitrogen fixation, converting nitrogen gas to nitrogenous compounds. This serves to provide an easily absorbable form of nitrogen for many plants, which cannot fix nitrogen themselves. Many other bacteria are found as symbionts in humans and other organisms. For example, the presence of over 1,000 bacterial species in the normal human gut flora of the intestines can contribute to gut immunity, synthesise vitamins such as folic acid, vitamin K and biotin, convert milk protein to lactic acid (see Lactobacillus), as well as fermenting complex undigestible carbohydrates. The presence of this gut flora also inhibits the growth of potentially pathogenic bacteria (usually through competitive exclusion) and these beneficial bacteria are consequently sold as probiotic dietary supplements.

## Pathogens
If bacteria form a parasitic association with other organisms, they are classed as pathogens. Pathogenic bacteria are a major cause of human death and disease and cause infections such as tetanus, typhoid fever, diphtheria, syphilis, cholera, foodborne illness, leprosy and tuberculosis. A pathogenic cause for a known medical disease may only be discovered many years after, as was the case with Helicobacter pylori and peptic ulcer disease. Bacterial diseases are also important in agriculture, with bacteria causing leaf spot, fire blight and wilts in plants, as well as Johne's disease, mastitis, salmonella and anthrax in farm animals.
Each species of pathogen has a characteristic spectrum of interactions with its human hosts. Some organisms, such as Staphylococcus or Streptococcus, can cause skin infections, pneumonia, meningitis and even overwhelming sepsis, a systemic inflammatory response producing shock, massive vasodilation and death. Yet these organisms are also part of the normal human flora and usually exist on the skin or in the nose without causing any disease at all. Other organisms invariably cause disease in humans, such as the Rickettsia, which are obligate intracellular parasites able to grow and reproduce only within the cells of other organisms. One species of Rickettsia causes typhus, while another causes Rocky Mountain spotted fever. Chlamydia, another phylum of obligate intracellular parasites, contains species that can cause pneumonia, or urinary tract infection and may be involved in coronary heart disease. Finally, some species such as Pseudomonas aeruginosa, Burkholderia cenocepacia, and Mycobacterium avium are opportunistic pathogens and cause disease mainly in people suffering from immunosuppression or cystic fibrosis.
Bacterial infections may be treated with antibiotics, which are classified as bacteriocidal if they kill bacteria, or bacteriostatic if they just prevent bacterial growth. There are many types of antibiotics and each class inhibits a process that is different in the pathogen from that found in the host. An example of how antibiotics produce selective toxicity are chloramphenicol and puromycin, which inhibit the bacterial ribosome, but not the structurally different eukaryotic ribosome. Antibiotics are used both in treating human disease and in intensive farming to promote animal growth, where they may be contributing to the rapid development of antibiotic resistance in bacterial populations. Infections can be prevented by antiseptic measures such as sterilizating the skin prior to piercing it with the needle of a syringe, and by proper care of indwelling catheters. Surgical and dental instruments are also sterilized to prevent contamination and infection by bacteria. Disinfectants such as bleach are used to kill bacteria or other pathogens on surfaces to prevent contamination and further reduce the risk of infection.

# Significance in technology and industry
Bacteria, often Lactobacillus in combination with yeasts and molds, have been used for thousands of years in the preparation of fermented foods such as cheese, pickles, soy sauce, sauerkraut, vinegar, wine and yoghurt.
The ability of bacteria to degrade a variety of organic compounds is remarkable and has been used in waste processing and bioremediation. Bacteria capable of digesting the hydrocarbons in petroleum are often used to clean up oil spills. Fertilizer was added to some of the beaches in Prince William Sound in an attempt to promote the growth of these naturally occurring bacteria after the infamous 1989 Exxon Valdez oil spill. These efforts were effective on beaches that were not too thickly covered in oil. Bacteria are also used for the bioremediation of industrial toxic wastes. In the chemical industry, bacteria are most important in the production of enantiomerically pure chemicals for use as pharmaceuticals or agrichemicals.
Bacteria can also be used in the place of pesticides in the biological pest control. This commonly involves Bacillus thuringiensis (also called BT), a Gram-positive, soil dwelling bacterium. Subspecies of this bacteria are used as a Lepidopteran-specific insecticides under trade names such as Dipel and Thuricide. Because of their specificity, these pesticides are regarded as environmentally friendly, with little or no effect on humans, wildlife, pollinators and most other beneficial insects.
Because of their ability to quickly grow and the relative ease with which they can be manipulated, bacteria are the workhorses for the fields of molecular biology, genetics and biochemistry. By making mutations in bacterial DNA and examining the resulting phenotypes, scientists can determine the function of genes, enzymes and metabolic pathways in bacteria, then apply this knowledge to more complex organisms. This aim of understanding the biochemistry of a cell reaches its most complex expression in the synthesis of huge amounts of enzyme kinetic and gene expression data into mathematical models of entire organisms. This is achievable in some well-studied bacteria, with models of Escherichia coli metabolism now being produced and tested. This understanding of bacterial metabolism and genetics allows the use of biotechnology to bioengineer bacteria for the production of therapeutic proteins, such as insulin, growth factors, or antibodies.