The peritrophic matrix (from the prefix peri-, meaning around, and -trophic, referring to nutrition(food)) or peritrophic membrane is a semi-permeable, non-cellular structure which surrounds the food bolus in an organism's midgut. Although they are often found in insects, peritrophic matrixes are found in seven different phyla. The peritrophic matrix serves several functions, including improvement of digestion, protection against mechanical and chemical damage and serving as a barrier to infection by pathogens.
 The peritrophic matrix is composed of regularly arranged chitin microfibrils, (3–13% of matrix mass), and species specific proteins (20–55%) embedded in a proteoglycan matrix. The peritrophic matrix also includes very small pores which allow for passage of small molecules into and out of the matrix. Thus, due to size limitations (pores reach a maximum size of 10 nm) larger, unwanted materials taken in while feeding are trapped and excreted along with the matrix.
 Type I formation of a peritrophic matrix is thought to be the ancestral method, and is found in the majority of organisms that produce a peritrophic matrix. In type I formation, the peritrophic matrix is secreted by the entire midgut, and is formed simply by delamination from the surface of the midgut epithelium. Type I formation usually occurs as a response to feeding, but can also be produced continually. When formed in response to feeding, a single matrix is secreted by the midgut epithelium. This matrix surrounds the food bolus and is later excreted along with unwanted materials present in the food bolus after digestion. When formed continually, as in the insect family Acrididae (locusts), multiple peritrophic matrixes are secreted and surround the food bolus, creating a peritrophic envelope. When no food bolus is present, peritrophic matrixes that are secreted are rapidly passed in excrement.
 Type II formation of a peritrophic matrix is considered to be a derived technique, and is found only in some families of the diptera, dermaptera, embioptera and lepidoptera orders of insects. In type II formation, the peritrophic matrix is produced by a specialized group of cells present on the proventriculus of the anterior midgut. Type II formation is a continuous process which is carried out regardless of the presence or absence of a food bolus. Thus, the peritrophic matrix is secreted as an unbroken, concentric, “sleeve like” structure. Although the peritrophic matrix is secreted continually, the presence of a food bolus significantly increases the rate of production. In addition, the presence of a food bolus stimulates the production of multiple matrices which surround the bolus. Following the secretion of a primary peritrophic matrix, subsequent matrices are secreted underneath the first matrix to create a layered peritrophic envelope.
 In many organisms the primary function of the peritrophic matrix is to improve digestion. Following feeding, the food bolus is surrounded by the peritrophic matrix, effectively isolating it from the midgut epithelium. This isolation creates two distinct compartments within the midgut, the endoperitrophic space and ectoperitrophic space. This compartmentalization of the midgut provides three general advantages: prevention of non-specific binding of undigested material to the epithelium wall, conservation and concentration of enzymes and substrates and rapid removal of indigestible molecules.
 Prevention of non-specific binding is particularly important, as it increases the efficiency of the absorption process by filtering out undigested material which would otherwise block access to the midgut epithelium. Due to the small pore size of the matrix, only small molecules which have been broken down by enzymes or can already be effectively absorbed come in contact with the midgut epithelium. The remaining materials, undigested food and unwanted molecules, are kept within the matrix until they can be broken down by enzymes or excreted.
 Concentrating enzymes and food substrate within the endoperitrophic space significantly decreases the time required for digestion in the midgut. In addition, since enzymes are small enough to easily move into and out of the peritrophic matrix, they are rarely lost when the matrix, along with its contents still in the endoperitrophic space, is excreted. A counterflow of fluid in the ectoperitrophic space also helps recycle enzymes, thus maximizing their efficacy.
 The presence of a peritrophic matrix significantly simplifies the excretion process. Rather than having to continually sift through a mixture of digestible and unwanted molecules, digestible molecules are quickly broken down by enzymes, removed from the matrix and absorbed. Once the digestive process is completed, unwanted molecules are kept confined within the endoperitrophic space and excreted along with the matrix.
 Although the peritrophic matrix is a very thin layer of compounds (type I matrixes reach a maximum thickness of 20 µm, type II matrixes reach a maximum thickness of 2 µm), it can withstand mechanical pressure strains up to 500 mmH2O. This capacity to expand prevents the food bolus from rupturing the delicate epithelial layer while assisting the passage of food through the gut.
 Much like indigestible molecules present in the food bolus, many toxins are too large to pass through the small pores of the peritrophic matrix. For example, some insects that are resistant to the insecticide DDT shed large amounts of the toxin in the peritrophic matrix. In addition, some smaller toxins bind with specific surface proteins present in the peritrophic matrix. This binding is particularly important for blood-feeding insects. Heme groups, which are components of hemoglobin, an oxygen carrying protein present in vertebrate blood, act as strong oxidizers in insects. Although this oxidizing agent is safe in vertebrates, it is very damaging to insects. However, heme groups ingested in a blood meal bind to proteins on the peritrophic matrix, enabling insects to safely feed on blood.
 Organisms that take in food often infected with pathogens, such as blood-feeding insects, also depend on the peritrophic matrix to filter out the disease agents, which are often too large to fit through the matrix pores. This benefit in particular is thought to be an important driving force in the evolution of peritrophic matrices, as many insects feeding on foods with low pathogen levels lack the ability to produce a peritrophic matrix. This trend is highlighted by mosquitoes, as blood-feeding female mosquitoes produce a peritrophic matrix while nectar-feeding males do not. A significant trend can also be observed in the type of peritrophic matrix produced by blood-feeding insects that are capable of transmitting disease. The majority of blood-feeding insects that are good disease vectors produce a type I matrix. In comparison, blood-feeding insects that produce a type II matrix, which provides a more impenetrable barrier to pathogens, are rarely disease vectors.
 Many pathogens are too large to fit through the small pores of the peritrophic matrix, and thus have evolved specialized mechanisms of evading being filtered out by the matrix. Since type I peritrophic matrixes are secreted in response to the presence of a food bolus in the midgut, some pathogens simply invade the epithelial cells before the matrix is excreted. Many helminth microfilaria and arboviruses (arthropod borne viruses) are transmitted to the mosquito in their infective form and are able to immediately invade mosquito tissue. However, other pathogens such as the malaria protozoan must first develop into an infective stage within the midgut before invading other tissues. These pathogens secrete chitinase and proteinase enzymes which dissolve the chitin microfibrils and proteins present in the peritrophic matrix. These enzymes open large holes in the membrane, allowing the pathogen to infect the epithelium and other tissues in the insect.