As seen in Table below, these two rocks have the same chemical composition and contain mostly the same minerals, but they do not have the same texture. Sample 1 has visible mineral grains, but Sample 2 has some visible grains in a fine matrix. The two different textures indicate different histories. Sample 1 is a diorite, a rock that cooled slowly from magma (molten rock) underground. Sample 2 is an andesite, a rock that cooled rapidly from a very similar magma that erupted onto Earth’s surface.