Ali was the most learned man of the age. He was a living encyclopaedia of knowledge. The Holy Prophet said, "If I am the City of Knowledge; verily Ali is the Gate of it". He was the first person to have learnt the Holy Quran by heart. He possessed a prodigious memory. He was a keen observer; he was a deep thinker; he had an enlightened mind and he carried in his brain a vast storage of knowledge. He was a versatile genius and he exhibited extraordinary talents in all disciplines of knowledge. He was a master of philosophy and rhetoric. He was a distinguished poet. He was a great preacher and teacher. His knowledge extended to such disciplines as: logic, mathematics, physics, astronomy, medicine and history.
"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari