Praise be to Allah.
Shaykh Ibn Uthaymeen (may Allah have mercy on him) said:
In linguistic terms, ijmaa means resolve and agreement.
In shari terms, it means the agreement of the mujtahids of this ummah after the death of the Prophet (blessings and peace of Allah be upon him) on a shari ruling.
By saying agreement we exclude differences of opinion; if there is a difference of opinion, even from one person, then we cannot say that there is ijmaa.
By saying the mujtahids we exclude the common folk and those who follow or imitate scholars; it does not matter whether they agree or disagree.
By saying this ummah we exclude the consensus of others, which carries no weight.
By saying after the death of the Prophet (blessings and peace of Allah be upon him) we exclude their agreement at the time of the Prophet (blessings and peace of Allah be upon him); ijmaa or consensus at that time does not count as evidence, because evidence is established by the Sunnah of the Prophet (blessings and peace of Allah be upon him), whether in word or deed or by approval. Hence if a Sahaabi says We used to do or that they (i.e., people) used to do such and such at the time of the Prophet (blessings and peace of Allah be upon him), this is indicative of the approval of the Prophet (blessings and peace of Allah be upon him), according to consensus.
By saying on a shari ruling, we exclude their agreement on a rational or human ruling, which has nothing to do with the matter under discussion, because we are talking about looking for ijmaa as one of the kinds of shari evidence.
Ijmaa counts as evidence on the basis of a number of pieces of evidence, including the following:
1. The verse in which Allah, may He be exalted, says (interpretation of the meaning): Thus We have made you (Muslims), a Wasat (just) (and the best) nation, that you be witnesses over mankind [al-Baqarah 2:143]. The words witnesses over mankind include testifying about their deeds and judging their deeds, and the words of the witness may be accepted.
2. The verse in which Allah, says (interpretation of the meaning): (And) if you differ in anything amongst yourselves [an-Nisa' 4:59] indicate that whatever they agreed upon is sound and correct.
3. The Prophet (blessings and peace of Allah be upon him) said: My ummah will not unanimously agree on misguidance.
4. We say: If the ummah unanimously agrees on something, it must be either true or false. If it is true, then it is proof. If it is false, how can this ummah, which is the dearest of nations to Allah since the time of its Prophet until the onset of the Hour, agree on something false with which Allah is not pleased? This is quite impossible.
Types of ijmaa
Ijmaa is of two types: definitive and presumptive.
1. Definitive is that which well known and well established, such as consensus that the five daily prayers are obligatory and that zina (fornication, adultery) is haraam. No one can deny that this type of ijmaa is proven and established, or that it constitutes proof in and of itself, or that the one who rejects it becomes a kaafir, unless he is ignorant and may be excused for his ignorance.
2. Presumptive is that which can only be known by means of research and study, where the scholars may differ as to whether is ijmaa (on a particular issue) or not. The most correct scholarly opinion concerning that is the view of Shaykh al-Islam Ibn Taymiyah, when he said in al-Aqeedah al-Waasitiyyah: The type of ijmaa that is to be accepted is that of the righteous early generations (as-salaf as-saalih), because after their time there was a great deal of disagreement and the ummah spread far and wide. End quote.
It should be noted that the ummah cannot agree on something that is contrary to an unabrogated, clear, saheeh text, because it can only agree on what is true. If you see consensus that you think is contrary to that, then it must be one of the following: either the evidence is not clear, or it is not saheeh, or it is abrogated, or there is a difference of opinion concerning the matter of which you were not aware.
Conditions of ijmaa:
There are certain conditions for ijmaa, such as:
1. It should be soundly proven in the sense that it is either well known among the scholars or transmitted by a trustworthy narrator who has read widely.
2. It should not have been preceded by a well-known difference of opinion. If that was the case, then there is no ijmaa, because scholarly opinions are not invalidated by the death of their authors.
Ijmaa does not cancel out a previous difference of opinion; rather it prevents differences of opinion from arising.
This is the most correct view, because of the strength of its argument.
And it was said that the second condition is not stipulated, so it is valid in a later period for there to be consensus on one of the previous opinions and for that to serve as proof for those who come afterwards.
According to the majority, it is not essential that those who unanimously agree all die when still holding this view for ijmaa to be established; rather ijmaa is established as soon as they (the scholars of a particular era) agree, and it is not permissible for them or anyone else to go against it after that, because the condition for the establishment of ijmaa do not include any stipulation that the era (of the scholars who reached this consensus) should have come to an end with their passing. As ijmaa is established at the moment they agree (on a particular issue), there is nothing that could cancel it out.
If one of the mujtahids (scholars) says or does something and that becomes well known among the mujtahids, and they do not denounce it even though they are able to do so, then it is said that there is ijmaa. It was said that this establishes that there is ijmaa; others said that it is may be regarded as proof but not ijmaa; and others said that it is neither ijmaa nor proof. And it was said that if they all passed away before denouncing it then it is ijmaa, because their silence until the time of their death, even though they were able to denounce it, constitutes proof of their agreement. This is the view that is most likely to be correct.
Al-Usool min Ilm al-Usool, 62-64
And Allah knows best.