No other single letter really does polysemy like x: it can stand for a kiss, found from 1765; it can represent the horizontal axis on a graph; it designates films which are only appropriate for adults, found from the 1950s; it can represent a cross; it can indicate a mistake; or it can denote any unknown or unspecified thing, like in algebra. It’s pretty versatile for one little letter.
Considering the last use, we find x in the classic phrase of pirate adventures and hidden treasures, x marks the spot, to indicate where something unknown might be found. Yet the expression has a fairly unexpected origin: Chicago gangsters.
Before the fixed expression came about, there is evidence of using the letter x to show the location of something on a map, at least from 1813, according to the Oxford English Dictionary:
‘The three crosses X mark the three places where we were let in’
But it wasn’t until a century later and the height of Chicago gangsterism that the specific phrase x marks the spot came into its own.
When newspapers started to abstain from publishing pictures of actual corpses in the scenes of murders, the x was used on the bodiless photos to indicate where it had been positioned. As a result, spotted came to mean ‘murdered’, in the slang of that time, and to be put on the spot took on a specific implication.
For more on the letter x, here’s a great TED talk: