The chemical reactions and pathways involving malate, the anion of hydroxybutanedioic acid, a chiral hydroxydicarboxylic acid. The (+) enantiomer is an important intermediate in metabolism as a component of both the TCA cycle and the glyoxylate cycle. (Gene Ontology, GO_0006108)