We study the relation between the WDVV equations and the τ-function of the noncommutative KP (NCKP) hierarchy. WDVV-like equations (Hirota triple-product relation) in the noncommutative context appear as a consequence of the nontrivial equation for τ-function of the NC KP hierarchy, while the prepotential in the Seiberg–Witten (SW) theory has been identified to the τ-function of the Whitham hierarchy. We show that the spectral curve for the SW theory is the same as the Toda-chain hierarchy. We also show explicitly that Whitham hierarchy includes commutative Toda/KP hierarchy. Further, we comment on the origin of the Hirota triple-product relation in the context of the SW theory.