I believe that you are asking how we can find out if someone is really an Imam or not. However, before answering this question, we should first understand why we need to believe in the concept of Imamate.
Imamate is an important issue in Islam, and it is the last stage in the evolution of humans. The rank of Imamate has sometimes even been tied to the Prophetic mission, e.g. Imamate of Prophet Abraham (a) or the Prophet of Islam (s), and sometimes it has been considered as separate from Prophetic missions, such as the case of the 12 Shia Imams (a).
Concerning the necessity of the presence of an Imam in the society, it can be said that similar to the Prophets (a) who played an important role in the evolution and growth of human beings, the Imams (a) are also regarded as essential factors for maintaining religion and continuing the mission of the Prophets (a).
Imamate is a covenant and status granted by God to an Imam, and it's only within God's authority to appoint an Imam.
In order to prove the concept of Imamate, Shias refers to both rational reasoning and verses of the Holy Quran.
Among these verses and hadiths, we can mention verses «و لکل قوم هاد», «کونوا مع الصادقین» and «اولوالامر» and some hadiths such as the hadith of Thaqalain, Safinah and the Ithna Ashar Khaliphs .
All these verses and traditions explain why we should believe in the Imams, and who we should follow.
Apparently you are asking how we can believe in someone as an Imam, and find out if he’s a true Imam. Before that, we should examine the very concept of Imamate and the reason behind why we follow the Imams.
Importance of Imamate:
Imamate plays a crucial role in Islam. From the Holy Quran’s point of view, imamate is the final stage of human evolution, to which only Messengers of God have reached. The Holy Quran says about Prophet Abraham (a): ''Remember when Abraham's God examined him with different means, and he successfully passed all those tests, so that God told him that he was appointed as the people's Imam and leader, and Abraham (a) asked God to appoint his descendents as Imams as well, but God replied that imamate could not be handed over to tyrants, and only those of his offspring who were pure and sinless would deserve such a grace.''.
This verse shows that imamate has a very high status and rank, since Prophet Abraham (a) was appointed as an Imam while he was already a Prophet. This happened only after he passed many difficult tests and trials.
The position of Imamate is sometimes combined with Prophethood, so that an eminent Prophet such as Abraham (a) becomes an Imam. Another evident reason is the combination of Prophethood and Imamate in the Prophet of Islam (s).
It also occurs that Imamate is separated from a Prophetic mission, such as what occurred in the case of the Shia Imams (a) who were only Imams, without being subject to direct divine revelation.
The Necessity of the Presence of Imams
Imams are necessary in the same way that Prophets (a) are.
Alammah Hilli, in his Commentary on Khajeh Nasiroddin Toosi's words, referred to these necessities and added:
- Prophets are necessary because they strengthen the rational knowledge of human beings by their words, because even though humans can rationally understand the majority of realities about religious principles, there are still temptations and uncertainties in their hearts which can prevent them from carrying out such principles wholeheartedly. However, when these rational perceptions are strengthened by prophetic words then all of these types of doubts and distrusts are obliterated, and humans can approach their sacred goals.
- There are some affairs whereby the common sense of human beings cannot identify their advantages and disadvantages. In cases such as these people should resort to religious leaders to help them distinguish the good from what is not.
- Many things can be useful, and some others can be harmful. Before ascertaining which is which, human beings are not able to distinguish between the good and the bad purely by relying on their intellectual power. Consequently, they feel a need for someone who can clarify these qualities and this is something which is only within the power of religious leaders who are connected to the divine through revelation.
- Humans are social creatures, and a society is only organized through rules and regulations that respect the rights of all its members, in order to lead them to the right path. However, formulation of such regulations and their subsequent implementation is only within the authority of wise and infallible leaders.
- Humans are different in respect to their understanding and acquisition of knowledge, as some are able to find the right direction and some are not. Divine leaders, on the other hand, support the former group and assist the latter to eventually understand and acquire knowledge and the right direction.
- Given the different levels of morality people have, only the infallibles can give each and every person the hand they need for enhancing their morality.
- Divine leaders are completely aware of punishments and rewards which are received for obedience and sinfulness; therefore, they can motivate others in fulfilling their duties by informing them of such realities.
Considering the fact that imamate is a continuation of the Prophetic mission, the majority of reasons for the necessity of prophets apply to infallible imams as well. In other words God, who has created human beings and has shown them the right path to perfection and felicity through the revelation to His prophets (a), will certainly appoint Imams upon the death of prophets to carry on the prophetic mission in helping human beings to find their way. Such a mission would doubtlessly fail without this provision due to a few reasons:
First: Human common sense cannot distinguish all the means to perfection, sometimes not even one tenth of it.
Second: The words and practices of Prophets (a) might be distorted for various reasons. In order to avoid such distortions, there must be infallible divine guardians who can safeguard those words and practices. God truly says about the Holy Quran, «انا نحن نزلنا...» which means, "We sent the Quran down, and we shall be its guardian and protector." Such protection can only be carried out through certain means, which has been shown to be the Infallible Imams (a).
This is exactly what Imam Sadiq (a) has said: "Among us, the members of the household of the Prophet (a), there are just people in every generation who nullify the distortion of exaggerators, and cut the hands of heretics and innovators of religion short, and prevent the wrong interpretations of ignorant people."
Elsewhere, Imam Ali (a) says, "There would always be someone who arises for the good, whether overtly or covertly out of fear, to maintain the divine signs forever."
Third: The establishment of divine rule and justice through an Islamic state, in order to help humans approach the goals they have been created for is not possible unless through the help of the Infallible Imams. This is mainly because throughout history, governments have always been in favor of the material interests of exact individuals or groups. As we have repeatedly examined, titles like democracy, human rights and the such are only used to justify the devilish acts of tyrants, through which they impose their wills on people in a cunning manner.
In the form of an example, Imam Ali (a) describes the essence of imamate this way, "The position of an Imam who is handling the affairs of the Muslims is similar to the position of a string in a rosary that holds the beads together. If the string is cut, the beads will scatter around, and may not be set into order again."
Fourth: Permanent obedience of religious commands in a society demands the presence of wise Imams (a) who are aware of all the necessary details, so as to avoid any doubt and confusion in society.
The above explanations clearly indicate the necessity of the presence of Infallible Imams (a).
These are the reasons behind our faith in the Imams and imamate. If we believe in Islam as the last religion, we should also believe in the concept of imamate as well.
Some people believe that there is no necessity for appointing Imams, and it is people themselves who are to decide about their leadership and form of government after the passing of The Holy Prophet (s). To answer this objection, the following example will be sufficient. Suppose someone sets up a factory to produce expensive and intricate jewelry, and the factory is supposed to continue working in his absence or even after his death. If the factory is full of sophisticated machinery and devices which can only be operated by the owner, is it rational to think that the factory will continue to run by itself? This would never work in reality.
Are Quranic sciences and verses, divine commands, tradition and the such, which are required to manage human life, less sophisticated than the instruments of such a factory? This also is an impossibility.
Is the outcome of religions, which is the perfection of human beings (through knowing God and worshiping Him), a replacement of the passion of chastity and anger with bravery, as well as establishment of a utopia on the basis of divine guidance, less important than the products of that jewel factory? This is an impossibility.
Then how can we believe that a religion which takes all the aspects of human life into consideration, till the end of time, has failed to appoint leaders to serve after the prophet and bring to a conclusion the prophetic mission?
Reasoning for the Imamate of the Infallible Imams
Since the Imams are appointed by God, there is a need of rational reasoning to recognize the individuals who are actually imam. For instance, human logic can distinguish between an Imam and other people by witnessing characteristics such as knowledge, justice, courage, sinlessness and so forth in the Imam, and a lack of such characteristics in others. In addition, Quranic verses and authentic traditions also prove the imamate of an individual.
The following are some verses and their interpretations which are about the issue of imamate:
1- «انما انت منذر و لکل قوم هاد», which means, "Your duty is to advise people, and there is a leader for every group."
Shia interpreters and some Sunni ones, including Imam Fakhr Razi, says, "Here the term advisor refers to the Holy Prophet (s) and the leader to Imam Ali (a), since Ibn Abbas said that the Holy Prophet (s) put his hands on his chest and said that he was the advisor, and then pointed to Ali (a) and added «و انت الهادی یا علی...» that means Ali (a) was the leader and shall continue to lead people after the Prophet (s)."
In Al-Durrul-Manthur, one of the famous Sunni commentaries, several interpretations of the above verse are introduced, in which it is written that upon the revelation of this verse, the Holy Prophet (s) put his hand on his chest and said that he was the advisor, and then pointed to Ali (a) and added that Ali was the leader.
Other similar traditions from other theologians can be found in various other sources such as from Hakem Neyshabouri in "Mostadrak", Dhahabi in "Talkhis", Fakhr Razi and Ibn Kathir in their commentaries and Ibn Sabagh Maleki in "Alfusulul-Muhimmah" and Ganji Shafei in "Kifayatul-Taleb", and Tabari in his commentary, and Ibn Hayan Andolosi in "Al-Bahrul-Muhit" and Neyshabouri in his commentary and Hamvini in "Faraed Olsamtin" and as well as many others. To become familiar with the sources of such traditions and their evidences, see the book Ihghagh Olhagh, Vol. 3, pp 88-92.
2- «با ایها الذین آمنوا اتقوا الله و کونوا مع الصادقین Which reads, "O, believers, avoid antagonism (toward God's commands) and be with the loyal people."
Imam Fakhr Razi interpreted the phrase 'loyal people' as meaning infallibles. He also added, "By infallible the verse refers to the whole nation in its entirety." This is while no Arab speaker, at the date of revelation of this verse, was using this phrase to refer to the nation; therefore, such an interpretation does not seem to be valid.
We should accept that in every era, there are loyal people who do not make any mistakes in their deeds and speeches, whom we should follow.
Moreover, many Sunni interpreters have quoted Ibn Abbas as saying that the above-mentioned verse is referring to Imam Ali (a). Allamah Tha'alabi in his book of commentary, Ganji in "Kifayatul-Taleb", Allamah Sibt Jowzi in "Tadhkirah", all interpret this verse as referring to Imam Ali (a) and his household. Ibn Abbas added, "Ali (a) is the most loyal man."
Many other traditions quoted from the members of the prophetic household confirm this same interpretation.
3- «اطیعواالله و اطیعوا الرسول و اولی الامر منکم», Says: "Obey God and obey the Messenger of God and the Holders of Authority."
Shia interpreters unanimously believe that by the ‘Holders of Authority’, the verse is referring to the Infallible Imams (a).
In addition, the Hanafi Sheikh Soleiman Qanduzi in his book "Yanabi’ul-Mawaddah" quoted the book "Mujahid" as saying that the verse refers to Ali (a) when the Holy Prophet (s) appointed him as his substitute in Madinah when he himself was involved in the Tabuk war.
It is also quoted from Imam Ali (a) as referring to this verse in a debate with the Mohajerin and Ansar, so that they admitted to the legitimacy of his rule.
In “Shawahidul-Tanzil” of Hakem Haskani, a Sunni scholar, the interpretation of the same verse includes a quotation from Imam Ali (a) as saying that he once asked the Holy Prophet (s) about the meaning of “ruler”, to which the Holy Prophet (s) replied, "You are the first of them."
Imamate in Hadiths:
The issue of imamate has been put forth in several traditions from the Holy Prophet (s), hereafter we will refer to some:
- The Hadith of Thaqalain: This account of the Holy Prophet (s) has been widely repeated in various famous Shia and Sunni books (which are first hand references). These leave no room for doubt about the authenticity of the hadith. The whole of these hadiths show that that prophet has repeated this hadiths on several occasions, which indicates its importance. In Sahih Muslim, one of the six main Sunni books of reference, Zaid Ibn Argham is quoted as saying that: "The Holy Prophet (s) stood up and started delivering a speech in a place where a water well was located called Khom (Ghadir Khom) between Medina and Mecca. He first praised God and then added that he was a human being and his time to leave the world was arriving. He then added that he was going to leave two precious things among his people, first the book of God in which they could find light and guidance, and further encouraged them to take up the book and use it as a guide, and then added that the second thing was the members of his household (the ahlul bait), and commanded that his people should follow them and repeated it three times, indicating that they had to fulfill their duties toward the members of the prophetic household."
Bringing the names of the members of the prophetic household along with the Holy Quran as two precious things, and putting emphasis on it three times, all indicate the close relationship between these two and the fate of the Muslim nation, their guidance and the protection of Islamic principles. Otherwise they wouldn't have been used alongside each other.
The Hadith of Thaqalain has been repeated in many Sunni reference books as well, including Sunan Tirmidhi, Sunan Darami, Musnad of Imam Ahmad (one of Four Sunni leaders), as well as Sunan Nisaei, Mustadrakul-Sahihain, Al-Sawa’iqul-Muhriqah, also in Asadul-Ghabah fi Ma’rifatil-Sahabah written by Ibn Athir, and in Ihya’ul-Mayyit of Jalaluddin Suyuti, as well as Sunan Beihaqi, and Almu’jamul-Kabir compiled by Hafiz Tabarani.
Late Mir Hamed Hussein Hendi, in his book Kholasatu Abaqatil-Anwar, lists one hundred and twenty six books containing the same Hadith, with precise reference to the volume and page numbers.
This proves the authenticity and validity of the Hadith of Thaqalain. Moreover, its content and meaning can be detailed as below:
- The Holy Quran and the members of the Prophetic Household (a) are inseparable, therefore, those who seek the truth shall resort to them in order to achieve happiness.
- As it is mandatory for all Muslims to unconditionally follow the instructions of the Holy Quran, it is unconditionally necessary for them to obey the commands of the members of the Prophetic Household as well.
- The inseparable relationship between the Holy Quran and the members of the Prophetic Household (a), and the necessity for their unconditional obedience are all evident reasons for their infallibility and amazing characteristics.
- The Holy Prophet (s) said, "These two (The Holy Quran and my family) always come together, and someday will join me in paradise." This proves that all throughout the rule of Islam, there has been and will be an individual from the Prophetic Household who acts as an infallible leader. Just like the Holy Book which is the guiding light, they play the same role in directing people, therefore, it's upon us to seek them and to find and follow them in our age.
- This Hadith suggests that falling away from the members of the Prophetic Household (a) results in one going astray.
- They are the most honorable, knowledgeable and prominent of all people.
Interestingly, "Samhoudi Shafei", a Sunni scholar of 15th century, put a comment on the Hadith of Thaqalain in his book, Jawahirul-Aqdain, and said, "The Hadith indicates that all throughout the history until the end of time, there would be someone who is worthy of being followed and obeyed, as is the Holy Quran itself."
- The Hadith of Safinah:
This is a famous tradition on the members of the Household of the Prophet and the Infallible Imams which is frequently used in the main Sunni and Shia reference books.
The Hadith has been approved by at least 8 of the Holy Prophet's companions (Abudhar, Abousaeid Khudri, Ibn Abbas, Anas, Abdullah Ibn Zobair, Amer Bin Wathilah, Salmat Ibn Al-Akwa’ and Ali (a)).
The above tradition has also been reflected in tens of famous Sunni books.
Abudhar explains the Hadith this way, "I heard the Holy Prophet (s) to say that the members of his household were similar to Noah’s ark. Whoever boards it shall be saved, and whoever does not shall perish." In Abaqatul-Anwar, the same Hadith has been quoted from 92 books compiled by 92 famous Sunni scholars (with full details).
This authentic hadith contains many important points; some of them are detailed below:
- After the Holy Prophet (s), a flood of ignorance and depravity swept across the Islamic nation, and eventually destroyed the faith of many people.
- In order to escape such risks, there is only one hope. This is the ark of salvation which is composed of the members of the Prophetic Household, and separating from them will surely lead to misery.
- What saves us is not just their love, as some Islamic scholars believe, it is rather that the way to salvation passes through obedience to them, which is contrary to separating from them.
- The ark of the members of the Prophetic Household will be necessary until the end of time, because the floods of ignorance and depravity will keep threatening us till the end of time.
- Unconditional adherence to the members of the Prophetic Household is by itself a reliable proof that in every era there is an Infallible Imam, whom we have to obey in order to achieve salvation.
- The Ithna Ashar (twelve) Imams Hadith:
The hadith of the Twelve Imams is also another important hadith, which is present in most Sunni books of reference.
In Sahih Muslim, Jaber Bin Samarah is quoted as saying that, "I heard the Holy Prophet of God (s) say that Islam would continuously be honorable and glorious until twelve caliphs ruled over the Muslim nation. Then he added something that I didn't hear, so I asked my father about the meaning and he informed me that the prophet said all of them would be from the tribe of the Quraish. "
However, as for the content and phrasing of the hadith, there are different narration. Some narrations have the phrase “twelve caliphs (successors)”, others have “twelve amirs” while a third group speak of the guardianship and rule of twelve individuals. However, it is evident that all of them refer to rule and guardianship.
At the same time, in the majority of these traditions that have been passed to us through various ways, the phrase 'all of them would be from the tribe of Quraish’ is present, while in other traditions that 'all of them would be from Bani Hashim' has been mentioned.
Most of these traditions say that the Holy Prophet (s) whispered the last part of his words in a confidential manner, which shows there had been people present who were against the idea that all the Prophet's successors (a) would be from tribe of the Quraish or from the Bani Hashim.
Anyway, the interpretation of this tradition, which is present in reference books and approved by all legitimate Muslim scholars, is totally clear for the followers of the Ahlul-Bayt, that being the the twelve imams. However, followers of other faiths have not been successful in finding a clear interpretation for this tradition, because the first caliphs were four, the Caliphs of Banu Ummayah were 14, and the Bani Abbas Caliphs were thirty seven, none of which corresponds with the twelve mentioned leaders. No cut and paste job or mathematical operation will make these numbers correspond.
Moreover, there are traditions from both Sunni and Shia scholars which contain the name of twelve Imams as believed by the Shias. Some other traditions refer to the name of the first as "Imam Ali" (a) and the last as "Imam Mahdi" (a), while some others refer to the third "Imam Hussain" (a), stating that the Holy Prophet (s) pointed to Imam Hussain (a) and said, "This grandson of mine is an Imam, the offspring of an Imam, the brother of an Imam, and the father of nine other Imams".
Although there are plenty of authentic traditions concerning imamate, this much will suffice for our purpose here.
For more information, please refer to the following links:
- The Necessity of The Infallibles and the Ways of Identifying an Imam, No. 5548 (site: 5807).
- Infallibility of the Prophets from the Perspective of the Holy Quran, Numbers. 112 (site: 998) and 129 (site: 1069)
- The Infallibility of Ordinary People, Number 104 (site: 861)
- The Exclusive Infallibility of The Fourteen, Number 178 (site: 1395)
 Surah Baqarah, Verse 124
 This reply is adopted from the Interpretation of the Quran's Message, Vol. 9 (Imamate and Leadership in the Holy Quran)
 Surah Hijr, Verse 9
 Usul Kafi, Volume 1 Page 32
 Nahjul Balagha word 134
 Nahjul Balagha Sermon 46
7 Surah Ra’ad, Verse 7
 Tafsir Kabir, Fakhr Razi, Volume 19, Page 14
 Al-Durrul-Manthur, Jalaladdin Suyuti, Volume. 4 Page 45
 Surah Bara’at, Verse 119
 Commentary of Fakhre Razi, volume 16, Page 221
 Ihqaqul-Haqq Volume. 3 Page 297
 Commentary of Noor Al Thaqalain Volume 2 Page 280,
 Yanabi’ul-Mawaddah, Page 114 – 115 – 116
 Shawahidul-Tanzil, Volume 1, Page 148
 Sahih Muslim Vol. 4 page 1873
 Sunanun Tirmidhi Vol. 5 Page 662
 Sunanun Darmi Vol. 2 Page 432 Tabe Dai Al Fekr, Beirut
 Musnad Ahmad Vol. 182 Chap Dar Al Sadr, Beirut
 Khasayis Nasaei Page 2
 Mustadrakul-Sahihain Vol. 3 Page 109
 Al-Sawa’iqul-Muhriqah, Page 226 , Tabe Abd Al Latif, Egypt
 Asadul-Ghabah fi Ma’rifatil-Sahabah, Vol 3 Page 47
 Ihya’ul-Mayyit, which is published in the border of Al Etehaaf page 116
 Sunan Beihaghi Vol. 10 Page 114
 Al Mojam Al Kabir Page 137
 Abaqatul-Anwar summary Vol. 2 page 105
 Abaqatul-Anwar summary Vol. 2 page 285
 Al Mojam Alkabir and Al mojam Al saghir Page 78, Delhi publication Oyoon Al akhbar Dinvari Vol. 1 page 212 (Egyptian publication) Mostadrak, Neishabouri ruler Vol. 3 page 150, Mizan Al etedal Zahbi Volume. 1 page 224 Tarikh Al kholafa Siouti page 573
 Abaqat summary vol. 2 page 195 – 126
 Sahih Muslim, Volume. 3, page 1453, Tabe Beirut dar Al ehya Al taras Al arabi
 Sahih Bukhari vol. 3 ninth part, page 101
 Sahih Tirmidhi, vol. 4 page 501 Tabe Dar Al ehya Al Taras Alarabi, Beirut
 Sahih Abi Dawud, vol. 4
 Refer to Montakhabul-Athar, page 12 and Ihqaqul-Haqq, vol. 13
 Yanabi’ul-Mawaddah, page 445 chapter 77
 Kashful-Murad, page 314 (Qom Mostafavi publication)
 This answer has been prepared according to the interpretation of the Quran’s message, Vol. 9 (Imamate, Leadership, in the Holy Quran).