|Part of a series on Islam|
|Legal vocations and titles|
Ijmāʿ (Arabic: إجماع ʾiǧmāʿ [ʔɪd͡ʒˈmæːʕ], "consensus") is an Arabic term referring to the consensus or agreement of the Islamic community on a point of Islamic law. Sunni Muslims regard ijmā' as one of the secondary sources of Sharia law, after the Qur'an, and the Sunnah.
Exactly what group should represent the Muslim community in reaching the consensus is not agreed on by the various schools of Islamic jurisprudence. Some believe it should be the Sahaba (the first generation of Muslims) only; others the consensus of the Salaf (the first three generations of Muslims); or the consensus of Islamic lawyers,: 472 the jurists and scholars of the Muslim world, i.e. scholarly consensus; or the consensus of all the Muslim world, both scholars and lay people. The opposite of ijma (i.e., lack of consensus on a point of Islamic law) is called ikhtilaf.
Imam Al-Shafi'i was once approached by an old man and was asked rearding proof of Ijma from the Quran. Imam Al-Shafi'i took the question home where he started reciting the whole Quran three times. On the third recitation, he stumbled upon a verse in Sura An-Nisa (4:115)
"And whoever defies the Messenger after guidance has become clear to them and follows a path other than that of the believers, We will let them pursue what they have chosen, then burn them in Hell—what an evil end!"
which mentions the word 'Sabeelil Mu'mineen' (The way of those of faith). Imam Al-Shafi'i told this man regarding this verse being a proof for Ijma from the Quran and the old man was satisfied. Another proof of Ijma from the Quran is in Sura Lukman (31:15) in which Allah mentions
"and follow the way of those who turn to Me in devotion"
Another proof of Ijma in the Quran is in Sura a Nisa (4:83) in which Allah mentions
"And when they hear news of security or fear,1 they publicize it. Had they referred it to the Messenger or their authorities, those with sound judgment among them would have validated it. Had it not been for Allah’s grace and mercy, you would have followed Satan—except for a few."
Some scholars have the opinion that Surah Al Fatihah verse 1:6 and 1:7 which Muslims read at least 17 times a day (in their 5 daily Salah) is also an indirect support of Ijma.
The hadith of Muhammad which states that "Allah will ensure my ummah will never collude en-masse upon error" have been mentioned in the books of Tirmidhi, Ibn Majah, Musnah Ahmad, and Darimi. This is often quoted as the primary proof of Ijma from the Hadith from the Sunni View.
Similar hadiths are often cited as a proof for the validity of ijma' as well.
Sunni scholars argued that the nature of human society was such that a community could not mistakenly agree that a statement had been made, and further that the consensus of the ummah about its inability to agree upon an error in itself certified the authenticity of this hadith. Sunni Muslims and Scholars regard ijmā' as one of the secondary sources of Sharia law, just after the divine revelation of the Qur'an, and the prophetic practice known as Sunnah. Thus so a position of Majority should always be taken into consideration, when a matter cannot be concluded from the Qur'an or Hadith.
There are differing views over who is considered a part of this consensus, whether "the consensus is needed only among the scholars of a particular school, or legists, or legists of an early era, or the Companions, or scholars in general, or the entire Muslim community." 
Malik ibn Anas held the view that the religiously binding consensus was only the consensus of Muhammad's companions and the direct successors of those companions in the city of Medina.
According to Iraqi academic Majid Khadduri, Al-Shafi'i held the view that religiously binding consensus had to include all of the Muslim community in every part of the world, both the religiously learned and the layman. Thus, if even one individual out of millions would hold a differing view, then consensus would not have been reached. In an attempt to define consensus in a form which was more likely to ever occur, Al-Ghazali expanding on al-Shafi'i's definition to define consensus as including all of the Muslim community in regard to religious principles and restricting the meaning to only the religiously learned in regard to finer details.
Abu Hanifa, Ahmad ibn Hanbal and Dawud al-Zahiri, on the other hand, considered this consensus to only include the companions of Muhammad, excluding all generations which followed them, in Medina and elsewhere.
Views within Sunni Islam branched off even further in later generations, with Abu Bakr Al Jassas, a hanafi scholar, defining even a simple majority view as constituting consensus and Ibn Taymiyyah restricting consensus to the view of the religiously learned only. Muhammad ibn Jarir al-Tabari's position was not entirely clear, as modern scholarship has attributed to him both the view that consensus means a simple majority, and that it means only the consensus of the companions of Muhammad.
According to Ahmad Hasan, the majority view is split between two possibilities: that religiously binding consensus is the consensus of the entire Muslim community, or that religiously binding consensus is just the consensus of the religiously learned. The names of two kinds of consensus are:
Initially, for Shia the authority of the Imams rendered the consensus as irrelevant. With the development of sectarian communities of Imami Shīa Islam, the question of guidance and interpretation between different ulama became an issue, however the importance of ijmā never reached the level and certainty it had in Sunni Islam. Later, since Safavid and with the establishment of Usuli school at the turn the 19th century the authority of living mujtahid is accepted, however it dies with him. For Shia, the status of ijmā is ambiguous.
The Mu'tazilite sect does not consider consensus to be a valid source of law, primarily due to their rationalist criticism of the first generation of Muslims, whom the Mu'tazila viewed as possessing defective personalities and intellects. Shi'ite theologians Al-Shaykh Al-Mufid and Sharif al-Murtaza held the Mu'tazilite theologian Nazzam's book Kitab al-Nakth, in which his student Al-Jahiz reports that he denied the validity of consensus for this reason, in high esteem. Modern scholarship has suggested that this interest was motivated by the desire of Shi'ite theologians to impugn the character of the first three leaders of the Rashidun Caliphate, Abu Bakr, Umar and Uthman.