Heating malic acid

Malic acid is 2-hydroxybutanedioic acid.

When malic acid is strongly heated it loses the elements of water (H and OH)

from adjacent carbon atoms to yield maleic and fumaric acids.

2HOOC(OH)HC-CH2COOH H2O + 2HOOCHC=CHCOOH

Why do we not show two different acids as products?

The two acids are geometric isomers.

Maleic acid is cis-butendioic acid ; fumaric acid is trans-butendioic acid.

You will find more on these acids in the cis-trans section.