Proteins and nucleic acids are macromolecules that are composed of linear chains of amino acids and nucleotides, respectively. These chains can fold into specific three-dimensional structures, which are critical for their biological functions. The secondary structure of proteins and nucleic acids refers to the local spatial arrangement of the polypeptide backbone or the sugar-phosphate backbone, respectively.

Protein secondary structure is typically classified into three types: alpha helices, beta sheets, and random coils. Alpha helices are right-handed coils that form when the polypeptide backbone forms intramolecular hydrogen bonds between the amino and carbonyl groups of neighboring amino acids. Beta sheets are formed when neighboring polypeptide chains align in a parallel or antiparallel orientation, and the carbonyl and amino groups of different chains form intermolecular hydrogen bonds. Random coils refer to regions of the polypeptide chain that do not form regular structures.

Nucleic acid secondary structure is also typically classified into three types: A-form helices, B-form helices, and Z-form helices. A-form helices are formed when the sugar-phosphate backbone twists into a right-handed helix, and the nitrogenous bases are tilted out of the plane of the helix. B-form helices are formed when the sugar-phosphate backbone twists into a right-handed helix, and the nitrogenous bases are stacked perpendicular to the helix axis. Z-form helices are formed when the sugar-phosphate backbone twists into a left-handed helix, and the nitrogenous bases are tilted out of the plane of the helix.

The secondary structure of proteins and nucleic acids is critical for their biological functions. For example, the alpha helices and beta sheets of proteins form the structural framework for enzymes and other proteins. In nucleic acids, the double-stranded helical structure of DNA enables it to store and transmit genetic information, while the secondary structure of RNA is critical for its catalytic and regulatory functions.