An elegy is a poem mourning the dead. It is a type of poem or song that is written or performed to lament the loss of someone or something, often expressing sorrow, grief, and sadness. It can be written in a variety of styles and forms, and is often associated with funerals or other solemn occasions. The purpose of an elegy is to pay tribute to the deceased, to express the poet's emotions and thoughts about death, and to provide comfort to those who are grieving.