Marx's father, a lawyer, converted from Judaism to Lutheranism in 1824. Marx studied law at Bonn and Berlin, but became interested in philosophy and took a Ph.D. degree at Jena (1841). He early rejected the idealism of Georg Wilhelm Friedrich Hegel and turned toward materialism, partly through the influence of Ludwig Feuerbach and Moses Hess.