Historical materialism is the philosophical opposite of idealism. It is directly opposed to idealism, the notion that material reality is created by what people believe or perceive in their minds. Marx also asserted that in all class societies the dominant ideas are the ideas of its ruling class. Racism, sexism, homophobia and national chauvinism are the ideas that the masses of people assimilate from the ruling class, which benefits from the promotion of those ideas.