A hadith was originally just an Arabic story. As the stories began to be used formally it became common to provide their chain of transmitters, (or sanad سند, plural اسناد isnad) . The story proper was then called the matn.
In more recent times the nomenclature - hadith, isnad and matn - has become restricted to mean those stories for which the original narrator was Muhammad or the original narrator told a story involving Muhammad.
Stories about earlier days were commonplace in Arabia long before the time of Muhammad. If a story-teller was speaking about an earlier generation he might well name who told him the story. In the earliest surviving Arabic literature about Islamic origins (from around 150/767) the conventional isnad was three terms long. As time went on the isnads got longer.
In the earliest literature the original narrator or his interest was as often as not some one other than the prophet. But when following his grand-master, Abu Hanifah through his stepfather and eventual master Abu Yusuf and his co-disciple Muhammad Shaybani - and in contrast with his earlier master, Malik - al-Shafi'i (died 204/820) convinced everyone that the only acceptable legal precedences were those demonstrably coming from Muhammad, the focus changed to those hadiths which could be proven to have come from Muhammad himself. Moreover because each hadith was a potential Islamic legal precedent the authenticity of each hadith became a matter of crucial importance.
One important element in determining the authenticity of a hadith was the reliability of the individual narrators who were named in the isnad. Specialized biographical studies called Ilm ar-Rijal were made to determine how trustworthy each narrator was and, using that information, how authentic each hadith was.
Scholars emerged who devoted their lives to checking each narrator in the isnad. They asked about the narrators like:
At the same time would ask about the authenticity such questions as:
It is not very clear just how many hadiths, good and bad, there are. Most likely they would be counted in the millions. These scholars categorized all (or all they could find) of these hadiths as authentic, agreeable, weak, narrated by a weak source, missing a transmitter, provably false, etc.