Farabi made contributions to the fields of logic, mathematics, music, philosophy, psychology, and education.
Al-Farabi wrote: The Necessity of the Art of the Elixir
Though he was mainly an Aristotelian logician, he included a number of non-Aristotelian elements in his works. He discussed the topics of future contingents, the number and relation of the categories, the relation between logic and grammar, and non-Aristotelian forms of inference. He is also credited for categorizing logic into two separate groups, the first being "idea" and the second being "proof".
Al-Farabi also considered the theories of conditional syllogisms and analogical inference, which were part of the Stoic tradition of logic rather than the Aristotelian. Another addition al-Farabi made to the Aristotelian tradition was his introduction of the concept of poetic syllogism in a commentary on Aristotle's Poetics.
Al-Farabi wrote a book on music titled Kitab al-Musiqa (The Book of Music). In it, he presents philosophical principles about music, its cosmic qualities, and its influences.
He also wrote a treatise on the Meanings of the Intellect, which dealt with music therapy and discussed the therapeutic effects of music on the soul.
As a philosopher, Al-Farabi was a founder of his own school of early Islamic philosophy known as "Farabism" or "Alfarabism", though it was later overshadowed by Avicennism. Al-Farabi's school of philosophy "breaks with the philosophy of Plato and Aristotle [... and ...] moves from metaphysics to methodology, a move that anticipates modernity", and "at the level of philosophy, Alfarabi unites theory and practice [... and] in the sphere of the political he liberates practice from theory". His Neoplatonic theology is also more than just metaphysics as rhetoric. In his attempt to think through the nature of a First Cause, Alfarabi discovers the limits of human knowledge".
Al-Farabi had great influence on science and philosophy for several centuries, and was widely considered second only to Aristotle in knowledge (alluded to by his title of "the Second Teacher") in his time. His work, aimed at synthesis of philosophy and Sufism, paved the way for the work of Ibn Sina (Avicenna).
Al-Farabi also wrote a commentary on Aristotle's work, and one of his most notable works is Al-Madina al-Fadila (اراء اهل المدينة الفاضلة و مضاداتها) where he theorized an ideal state as in Plato's The Republic. Al-Farabi represented religion as a symbolic rendering of truth, and, like Plato, saw it as the duty of the philosopher to provide guidance to the state. Al-Farabi incorporated the Platonic view, drawing a parallel from within the Islamic context, in that he regarded the ideal state to be ruled by the prophet-imam, instead of the philosopher-king envisaged by Plato. Al-Farabi argued that the ideal state was the city-state of Medina when it was governed by the prophet Muhammad as its head of state, as he was in direct communion with Allah whose law was revealed to him.
Al-Farabi wrote a short treatise "On Vacuum", where he thought about the nature of the existence of void. He may have carried out the first experiments concerning the existence of vacuum, in which he investigated handheld plungers in water. He concluded that air's volume can expand to fill available space, and he suggested that the concept of perfect vacuum was incoherent.
Wrote Social Psychology and Principles of the Opinions of the Citizens of the Virtuous City, which were the first treatises to deal with social psychology. He stated that "an isolated individual could not achieve all the perfections by himself, without the aid of other individuals," and that it is the "innate disposition of every man to join another human being or other men in the labor he ought to perform." He concluded that to "achieve what he can of that perfection, every man needs to stay in the neighborhood of others and associate with them."
In his treatiseOn the Cause of Dreams, which appeared as chapter 24 of his Principles of the Opinions of the Citizens of the Ideal City, he distinguished between dream interpretation and the nature and causes of dreams.