An epigram is a brief, interesting, memorable, and sometimes surprising or satirical statement. The word is derived from the Greek ἐπίγραμμα "inscription" from ἐπιγράφειν "to write on, to inscribe", and the literary device has been employed for over two millennia.
The presence of wit or sarcasm tends to distinguish non-poetic epigrams from aphorisms and adages, which tend to lack those qualities.
The Greek tradition of epigrams began as poems inscribed on votive offerings at sanctuaries including statues of athletes and on funerary monuments, for example "Go tell it to the Spartans, passersby...". These original epigrams did the same job as a short prose text might have done, but in verse. Epigram became a literary genre in the Hellenistic period, probably developing out of scholarly collections of inscriptional epigrams.
Though modern epigrams are usually thought of as very short, Greek literary epigram was not always as short as later examples, and the divide between "epigram" and "elegy" is sometimes indistinct (they share a characteristic metre, elegiac couplets). In the classical period, the clear distinction between them was that epigrams were inscribed and meant to be read, while elegies were recited and meant to be heard. Some elegies could be quite short, but only public epigrams were longer than ten lines. All the same, the origin of epigram in inscription exerted a residual pressure to keep things concise, even when they were recited in Hellenistic times. Many of the characteristic types of literary epigram look back to inscriptional contexts, particularly funerary epigram, which in the Hellenistic era becomes a literary exercise. Many "sympotic" epigrams combine sympotic and funerary elements they tell their readers (or listeners) to drink and live for today because life is short. Generally, any theme found in classical elegies could be and were adapted for later literary epigrams.
Hellenistic epigrams are also thought of as having a "point" that is, the poem ends in a punchline or satirical twist.