  Metallicity appears to be one the most important tool to study formation and
evolution of galaxies. Recently, we have shown that metallicity of local
galaxies is tightly related not only to stellar mass, but also to star
formation rate (SFR). At low stellar mass, metallicity decreases sharply with
increasing SFR, while at high stellar mass, metallicity does not depend on SFR.
The residual metallicity dispersion across this Fundamental Metallicity
Relation (FMR) is very small, about 0.05dex. High redshift galaxies, up to
z~2.5, are found to follow the same FMR defined by local SDSS galaxies, with no
indication of evolution. At z>2.5, evolution of about 0.6dex off the FMR is
observed, with high-redshift galaxies showing lower metallicities. This result
can be combined with our recent discover of metallicity gradients in three high
redshift galaxies showing disk dynamics. In these galaxies, the regions with
higher SFR also show lower metallicities. Both these evidences can be explained
by the effect of smooth infall of gas into previously enriched galaxies, with
the star-formation activity triggered by the infalling gas.
