A majority of the students are expected to vote in the class election.
This sentence uses the indefinite article before the "majority of the students". This has the effect of introducing this group of students to the reader or the listener.
It may give a hint that the exact number of the students that will vote is uncertain: it could be 51%, but then it could be 88%.
I would also half-expect the following sentences to contain further information on this particular group of students, like this:
A majority of the students are expected to vote in the class election. This is a rag-tag group of A-grade students and 'politically active' D-graders.
Now, to the second sentence.
The majority of the students are expected to vote in the class election.
This sentence seemed not very natural to me, but it is probably okay. It uses the definite article before "majority of the students", as if referring to a known group. But in reality it likely refers to the concept of majority (superiority in numbers).
I've tried to look for similar structures on the web, say "The majority of the citizens", "The majority of the voters", and the results are scarce (about 400 google-hits each). But so are the results for the same phrases with a, so I'm unsure.
Here's one quote apparently coined by a native English speaker:
If I recollect rightly, Aristotle observes, that a democracy has many striking points of resemblance with a tyranny. Of this I am certain, that in a democracy, the majority of the citizens is capable of exercising the most cruel oppressions upon the minority, whenever strong divisions prevail in that kind of polity, as they often must; and that oppression of the minority will extend to far greater numbers, and will be carried on with much greater fury, than can almost ever be apprehended from the dominion of a single sceptre. (Edmund Burke)
Here, the majority is contrasted with the minority, and this probably makes the nouns "definite": we are all accustomed to groups of people being divided into a majority and a minority on numerous matters. This use of the probably stresses that the author talks about definite concepts, not about particular groups of people.
1. The grammar: "partitive structures"
As I understand it, constructions of the type
(A/The) Z of X have a partitive effect: we tend to assume that Z is part of X. Hence, the use of the is justified only when the reader is familiar with this particular group Z that is part of X.
The writer can oftener safely presume that all his readers are familiar with abstract concepts than with some particular groups of people or items. Hence, this partitive use of the seems to prevail in phrases speaking about well-known abstract topics:
She is studying the history of Russia. (okay)(see Quirk et al., 5.58)
She has already bought the majority of the Russian history books she needs. (not okay? or marginally okay?)
- The grammar: "collective nouns"
The word majority is a collective noun and could be treated either as a plural noun or as a singular noun. But following a it is usually plural, especially in of-partitive structures:
A majority of the students were polled. (according to the grammar book "Woe is I")
Here's one explanation I've found on the web (Grammar Logs, 2000):
In the expression "a majority of ____," we invariably use a plural verb. The word majority is always singular in itself when it means a superiority in number — "The majority was small but enough to carry the day." In other senses, the word can be either singular or plural, depending on whether you're thinking of the group in question as a singular entity or as a group of individuals: "the majority [of the students] have voted already"; "the majority is sometimes wrong." But "a majority of ______" requires a plural verb.
Here's the Google Ngram comparison for "majority of __ is" vs. "majority of __ are" (kudos to Damkerng T.)
(Bear with me, I'm not a native English speaker and might be mistaken in my apprehension of articles.)