The chemical reactions and pathways involving dimethyl sulfoxide, DMSO (C2H6OS), an alkyl sulfoxide that is practically odorless in its purified form. As a highly polar organic liquid, it is a powerful solvent. Its biological activities include the ability to penetrate plant and animal tissues and to preserve living cells during freezing.