Ijm (Arabic: ) is an Arabic term referring to the consensus or agreement of the Muslim scholars basically on religious issues.:472 Various schools of thought within Islamic jurisprudence may define this consensus to be that of the first generation of Muslims only; or the consensus of the first three generations of Muslims; or the consensus of the jurists and scholars of the Muslim world, or scholarly consensus; or the consensus of all the Muslim world, both scholars and laymen.
The hadith of Muhammad which states that "My ummah will never agree upon an error" is often cited as a proof for the validity of ijm?'. (While this hadith has only a limited number of transmissions bringing it to hadith collectors, and so is less reliable than would be preferred, Sunni scholars argue that they had come to a consensus that Muhammad had affirmed the Muslim communities infallibility so that the hadith was certain.)Sunni Muslims regard ijm?' as the third fundamental source of Sharia law, just after the divine revelation of the Qur'an, and the prophetic practice known as Sunnah.
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."
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 bin 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 Muhammad ibn Zakariya al-Razi 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 ulamas 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 ancient Mu'tazilite sect did 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.