Interjections are words or phrases that express strong emotion or sudden feelings. They are often used alone, but can also be used within a sentence.
Here's why "goodbye" is an interjection:
* It expresses a feeling of farewell or departure.
* It stands alone and doesn't modify any other word in the sentence.
* It doesn't function as a noun, verb, adjective, adverb, pronoun, preposition, conjunction, or determiner.