In metaphysics, extension signifies both 'stretching out' (Latin: extensio) as well as later 'taking up space', and most recently, spreading one's internal mental cognition into the external world.
The history of thinking about extension can be traced back at least to Archytas' spear analogy for the infinity of space. How far can one's hand or spear stretch out until it reaches the edge of reality? “If I arrived at the outermost edge of the heaven, could I extend my hand or staff into what is outside or not? It would be paradoxical [given our normal assumptions about the nature of space] not to be able to extend it.”
René Descartes defined extension as the property of existing in more than one dimension, a property that was later followed up in Grassmann's n-dimensional algebra. For Descartes, the primary characteristic of matter is extension (res extensa), just as the primary characteristic of mind is thought (res cogitans).
This can be contrasted with current conceptions in quantum physics, where the Planck length, an almost unimaginably tiny quantity, represents reaching that distance scale where, it has been theorized, all measurement seemingly breaks down to that which can be subsumed at this scale, as distance only, or extension.
John Locke, in An Essay Concerning Human Understanding, defined extension as "only the Space that lies between the Extremities of those solid coherent Parts" of a body. It is the space possessed by a body. Locke refers to the extension in conjunction with solidity and impenetrability, the other primary characteristics of matter.
Extension also plays an important part in the philosophy of Baruch Spinoza, who says that substance (that which has extension) can be limited only by substance of the same sort, i.e. matter cannot be limited by ideas and vice versa. From this principle, he determines that substance is infinite. This infinite substance is what Spinoza calls God, or better yet nature, and it possesses both unlimited extension and unlimited consciousness.