We study the modular symmetry in magnetized D-brane models on T2.
Non-Abelian flavor symmetry D4 in the model with magnetic flux M=2 (in a
certain unit) is a subgroup of the modular symmetry. We also study the modular
symmetry in heterotic orbifold models. The T2/Z4 orbifold model has the
same modular symmetry as the magnetized brane model with M=2, and its flavor
symmetry D4 is a subgroup of the modular symmetry.Comment: 28 page