In modern English, yea is an affirmative reply or a yes vote. Yeah is a casual pronunciation of yes. Yay is an interjection expressing triumph, joy, or enthusiasm.
Yea shares distant roots with yes (and with aye), and they were used interchangeably until the middle 19th century, when yea began to decline. Though yea is rare today, it still appears in legislative contexts (where a yea is a vote for a measure) and in the phrase yea or nay. Writers also sometimes use it as an archaic flourish.
Yeah first appeared in writing around the first decade of the 20th century. It’s apparently American in origin, but today it is used throughout the English-speaking world.
We find no good information on the origins of the interjection yay. Your ideas are welcome. The earliest examples we can find are from the 1940s, and it becomes much more common around 1970. The word also has a secondary sense, used in phrases such as “yay big,” usually accompanied by a gesture illustrating the size. Here, yay is synonymous with this.
[T]he legislators who voted yea are no doubt telling themselves they have done the responsible thing here. [Wall Street Journal]
Mandel could have made it easy on us by simply taking a position — yea or nay. [Politifact]
“Do you really think she’ll be better than you?” Ennis was asked. “Probably, yeah,” the European champion replied. [Independent]
You’re a beautiful young queen. Yay. But you’re married to an insane king. Boo. [Sydney Morning Herald]
He will be here for many weeks this summer (yay!). [letter to Boston Globe]