Historical materialism is a theory that emphasizes the role of economic factors in shaping history and society. Engels and Marx developed the concept of historical materialism together, and it forms the basis of Marxist theory. According to historical materialism, the mode of production (the way in which goods are produced and exchanged) is closely related to the means of production (the tools and resources used to produce goods), and both are determined by the forces of production (the technical and social organization of production). The mode of production and the means of production are constantly changing, and these changes are driven by the class struggle between the ruling class (the bourgeoisie) and the working class (the proletariat).