A consolidated or unconsolidated aggregate of minerals or organic matter. The minerals may be all of one type, in which case the rock is ‘monomineralic’, or of many types, in which case it is ‘polymineralic’. The aggregate of minerals can form by: (a) accretion or precipitation of grains during Earth surface processes, to give sedimentary rocks; (b) crystallization of magma to give igneous rocks; and (c) solid-state recrystallization in response to changes in external conditions (e.g. pressure and temperature) to give metamorphic rocks. The grain relationships (textures) of these three rock types contrast. Sedimentary rocks are characterized by one of the following: (i) rounded or angular grains held together by an intergrain precipitate or a fine intergrain mud; (ii) fine aggregates of clay minerals displaying a preferred orientation of their long axes; (iii) a crystalline aggregate of minerals (e.g. calcite) displaying straight edges and triple junctions between the grains; (iv) an aggregate of fossil fragments held together by an interfragment precipitate of calcite or a fine interfragment mud; or (v) an aggregate of organic material (e.g. lignite or coal). All igneous rocks are characterized by an aggregate of minerals displaying an interlocking texture. Metamorphic rocks are characterized by one of the following: (i) a crystalline aggregate of minerals which display a preferred orientation of their long axes; (ii) a crystalline aggregate of equidimensional and randomly oriented non-equidimensional minerals; or (iii) an extremely fine-grained aggregate of sutured, anhedral, or sometimes elongate minerals.