A nut is a type of fastener with a threaded hole. Nuts are almost always used opposite a mating bolt to fasten a stack of parts together. The two partners are kept together by a combination of their threads’ friction, a slight stretch of the bolt, and compression of the parts. In applications where vibration or rotation may work a nut loose, various locking mechanisms may be employed: Adhesives, safety pins or lockwire, nylon inserts, or slightly oval-shaped threads. The most common shape is hexagonal, for similar reasons as the bolt head – 6 sides give a good granularity of angles for a tool to approach from (good in tight spots), but more (and smaller) corners would be vulnerable to being rounded off. It takes only 1/6th of a rotation to obtain the next side of the hexagon and grip is optimal. However polygons with more than 6 sides do not give the requisite grip and polygons with less than 6 sides take more time to be given a complete rotation.Other specialized shapes exist for certain needs, such as wing nuts for finger adjustment and captive nuts for inaccessible areas.