We consider commutativity equations F i F j = F j F i for a function F (x 1 , . . . , x N ), where F i is a matrix of the third order derivatives F ikl . We show that under certain nondegeneracy conditions a solution F satisfies the WDVV equations. Equivalently, the corresponding family of Frobenius algebras has the identity field e.We study trigonometric solutions F determined by a finite collection of vectors with multiplicities, and we give an explicit formula for e for all the known such solutions. The corresponding collections of vectors are given by non-simply laced root systems or are related to their projections to the intersection of mirrors.