Trimethoprim is a synthetic antibiotic used to treat various bacterial infections, especially those affecting the urinary tract, respiratory tract, and skin. It belongs to the dihydrofolate reductase inhibitor class of antibiotics, working by blocking the production of tetrahydrofolic acid, which is essential for bacterial growth and replication. Trimethoprim is often used in combination with sulfamethoxazole, forming the potent antibiotic combination co-trimoxazole (TMP-SMX). This combination enhances the antibacterial activity and helps prevent the development of bacterial resistance.