Diorite is a plutonic igneous rock composed of coarse grains of plagioclase feldspar and less than 40 percent hornblende (see amphibole) and biotite (see mica), or, more rarely, pyroxene or olivine. Small amounts of potassium feldspar and quartz may also occur, along with traces of magnetite, apatite, sphene, and zircon. Diorite is the plutonic equivalent of the volcanic rock andesite and is intermediate between gabbro and granite. Diorite occurs around margins of granitic batholiths, in separate plutons, and in dikes. It forms by the melting of rocks in the lower crust, by the assimilation of crustal rocks in basaltic magma, or as by metamorphic processes.