Pegmatites are igneous rocks with very large crystals – usually, most of the crystals will be greater than 1 cm in length. In igneous rocks, the presence of large minerals tells us that the rocks cooled very slowly from their molten state to what we see today. The slow cooling is because they form deep within the crust where it takes a very long time for the heat to escape (as opposed to lava at the surface, which cools very quickly).
Pegmatites form deep within the continental crust in vast magma chambers – the same sort of places as the granites that you saw on the buildings last week. However, what makes pegmatites special is that they form very late in the process, and they’re sort of like the vacuum cleaner of igneous processes – they collect up all of the leftover elements that don’t fit into the crystal lattice of the more common igneous minerals (like quartz and plagioclase feldspar).
The odd way that pegmatites form means some elements usually found in low concentrations in many igneous rocks end up being very highly concentrated in pegmatites. This makes them a valuable ore resource for certain elements. The pegmatite deposits aren’t usually that large, so, even though the ore is quite valuable, they are not always worth mining.
One unusually large pegmatite in Western Australia (the Greenbushes pegmatite) is mined for lithium which is found in a mineral called spodumene. Lithium is an important component in a lot of batteries, including the one likely to be in your phone right now, or the laptop you may be reading this on. Another large pegmatite in Manitoba, Canada (the Tanco pegmatite) is mined for tantalum and niobium, which are used in some of the electronics in your phone.