The Holy Quran
All the Muslims, whenever they discuss anything regarding the law, consider the holy Quran as a source of guidance. The holy Quran is the primary source of Islamic law. It is the book that has all the information, instructions and directives regarding Islamic law which will rest till the day of the judgment. It is free from any changes. It is said in the Holy Quran that:
"Indeed, it is We who sent down the Quran and Indeed, we will be its guardian."
The holy Quran is the final authority for all Muslims as it can never be challenged. The teachings of the Holy Quran can never be questioned at any stage. Our holy prophet Muhammad (Peace be upon him) said that whosoever desired to get guidance from any other source except the holy Quran will go astray. This statement clearly describes the holy Quran as a source of guidance and final authority to decide in any situation.
The Sunnah of our holy prophet Muhammad (Peace be upon him) is also a primary source of Islamic law. The Sunnah or life of our holy prophet Muhammad (Peace be upon him) is an explanation of the holy Quran. Once someone asked Ummul Momineen Hazrat Ayesha, what was the behavior of our holy prophet Muhammad (Peace be upon him). She replied, haven't you read the holy Quran? The holy Quran is an explanation of his behavior. As ALLAH orders us to perform pray and to give zakat but the explanation could be found in the life of our holy prophet Muhammad (Peace be upon him) that how to perform prayers and how much zakat should be given? Once our holy prophet Muhammad (Peace be upon him) said that offer prayer as you see me offering prayer.
Ijma is a secondary source of Islamic law. It refers to the decision related to any issue which was not existing in the time of our holy prophet Muhammad (Peace be upon him). If anything has been discussed in the Holy Quran or any hadith is available regarding any issue, the Ijma will not be valid for that issue. Ijma can be done with the consensus of Muslim scholars. Trying to take consensus in the issue which is already discussed in the holy Quran or hadith will lead to Shirk (association in the oneness of ALLAH Almighty). In the same way, Ijma is not allowed to do the same issue where Ijma is already done. A great example of the Ijma is the opinion of the religious scholars on test-tube babies.
Qiyas is the last source of Islamic law and it is also a secondary source. It is done where all the above sources are silent. In Qiyas, the scholars try to find out all the relative information from the holy Quran and hadith. The records of Ijma are also checked because in case if Ijma has done, Qiyas will not be valid for the same issue. Then all the merits and demerits are checked in the light of Islamic laws. Scholars match the unknown with the known and find out the similarities to come to any decision. A common man can’t go for Qiyas as only great scholars who have in-depth knowledge of Shariah are eligible for Qiyas.