Final answer:
The lacZ gene encodes the enzyme β-galactosidase, which breaks down lactose into glucose and galactose, playing a crucial role in lactose metabolism in bacteria such as E. coli.
Step-by-step explanation:
The function of the lacZ gene is to encode an enzyme called β-galactosidase, which is responsible for cleaving the disaccharide lactose into its monosaccharide components, glucose and galactose. This process is an essential step in the metabolism of lactose by bacteria such as E. coli. When lactose is present in the environment, E. coli can use the lac operon system to express the lacZ gene, along with other genes necessary for the utilization of lactose as a carbon source, such as the lacY gene for lactose permease and the lacA gene for transacetylase.