Democritus was a pre-Socratic Greek philosopher who formulated an atomic theory of the cosmos. He proposed that everything is composed of invisible, indivisible atoms moving through empty space, and that all phenomena can be explained by the motions and interactions of atoms. Democritus traveled widely to acquire knowledge and was motivated by his thirst for learning. He recognized two types of knowledge - "legitimate" knowledge acquired through reason and "illegitimate" knowledge based on subjective sense perceptions. Democritus believed that ethics and politics should be based on principles of equality and that poverty is preferable to living under tyranny. He made early observations in mathematics and developed theories of how the earth and cosmos were formed from atoms in chaos