Euclid was born in Megara, but in Athens he became a follower of Socrates. So eager was he to hear the teaching and discourse of Socrates, that when, for a time, Athens had a ban on any citizen of Megara entering the city, Euclid would sneak into Athens after nightfall, disguised as a woman to hear him speak. He is represented in the preface of Plato's Theaetetus as beingresponsible for writing down the conversation between Socrates and the young Theaetetus many years earlier. Socrates is also supposed to have reproved Euclid for his fondness for eristic disputes. He was present at Socrates' death, after which Euclid returned to Megara, where he offered refuge to Plato and other frightened pupils of Socrates. In Megara, Euclid founded a school of philosophy which became known as the Megarian school, and which flourished for about a century. Euclid's pupils were said to have been Ichthyas, the second leader of the Megarian school; Eubulides of Miletus; Clinomachus; and Thrasymachus of Corinth. Thrasymachus was a teacher of Stilpo, who was the teacher of Zeno of Citium, the founder of the Stoic school.
Philosophy
Euclid himself wrote six dialogues — the Lamprias, the Aeschines, the Phoenix, the Crito, the Alcibiades, and the Amatorydialogue — but none survive. The main extant source on his views is the brief summary by Diogenes Laërtius. Euclid's philosophy was a synthesis of Eleatic and Socratic ideas. Socrates claimed that the greatest knowledge was understanding the good. The Eleatics claimed the greatest knowledge is the one universal Being of the world. Mixing these two ideas, Euclid claimed that good is the knowledge of this being. Therefore, this good is the only thing that exists and has many names but is really just one thing. He identified the Eleatic idea of "The One" with the Socratic "Form of the Good," which he called "Reason," "God," "Mind," "Wisdom," etc. This was the true essence of being, and was eternal and unchangeable. The idea of a universal good also allowed Euclid to dismiss all that is not good because he claimed that good covered all things on Earth with its many names. Euclid adopted the Socratic idea that knowledge is virtue and that the only way to understand the never-changing world is through the study of philosophy. Euclid taught that virtues themselves, however, were simply the knowledge of the one good, or Being. As he said, "The Good is One, but we can call it by several names, sometimes as wisdom, sometimes as God, sometimes as Reason", and he declared, "the opposite of Good does not exist". Euclid was also interested in concepts and dilemmas of logic. Euclid and his Megarian followers used dialogue and the eristic method to defend their ideas. The eristic method allowed them to prove their ideas by disproving those of the one they were arguing with and therefore indirectly proving one's own point. When attacking a demonstration, it was not the premises assumed but the conclusions that he attacked, which presumably means that he tried to refute his opponents by drawing absurd consequences from their conclusions. He also rejected argument from analogy. His doctrinal heirs, the Stoic logicians, inaugurated the most important school of logic in antiquity other than Aristotle's peripatetics.