All the ideas in our mind that are not simple are complex. These complex ideas come in four basic varieties: modes, substances, relations, and abstract generals. Modes are ideas that do not include any notion of self-subsistence, in particular, qualities, numbers, and abstract concepts; qualities depend for their existence on substances, whereas numbers and abstract concepts do not have any archetypes out in the world, but exist only as ideas. There are two types of ideas of mode: Simple modes are created by taking a single simple idea and either repeating it or varying it (examples include "dozen," "infinity," "oval," and "space"). Mixed modes are combinations of simple ideas of different kinds (examples include "murder", "obligation", and "beauty"). In contrast to modes, substances are either self-subsisting things (e.g. a man or a sheep) or collections of self-subsisting things (e.g. an army of men or a flock of sheep). Relations are simply relational concepts, such as "father," "bigger," and "morally good." Abstract generals are not treated until Book IV. Complex ideas are created through three methods. First, simple ideas can be glued together through combination, either by taking stock of simple ideas that come into the mind together naturally though sensation (for example, gluing together yellow, long, wheels, loud, etc. into "school bus") or else by mixing and matching simple ideas in the imagination (for example, to create the idea of a mythical creature). Complex ideas can also arise through a comparison of simple ideas, in which we take two or more simple ideas and observe the similarities and differences. This method results in the complex ideas of relations. Finally, there is abstraction, in which the mind separates ideas previously joined by the mind.
Chapters xiii-xx analyze our ideas of simple modes, focusing in turn on the ideas of space, duration, number, infinity, pleasure and pain, and powers. Examples of ideas of space include "space," "place," and "inch," and are produced by considering two ideas of color or texture and noticing the distance between them. We form ideas of duration, such as "time," "year," minute," "eternity," by noticing that we have a train of ideas and that this succession has distances between its parts. The idea of number is produced by repeating the simple idea of unity. Realizing that there is no end to the process that gave us the idea of numbers produces the idea of infinity. Ideas of pleasure and pain, such as "good," "love," and "sorrow," which are produced in reference to our simple ideas of pleasure and pain. Finally, we get ideas of powers, such as the ability to cause things to melt or the ability to be melted, by perceiving changes in our ideas and noticing that these changes happen in regular patterns.
Chapter XXII examines mixed modes. Mixed modes, Locke tells us, are created simply for purposes of communication. We glue together certain ideas by giving them a collective name if and only if collectively they will prove useful in discourse. So, for instance, we decided to glue together the ideas of murder and father into "patricide," but it never proved as useful to glue together the ideas of murder and son, or murder and neighbor. To strengthen his claim that mixed modes are invented for reasons of convention, Locke points out that often one language will have a word for a concept that does not exist in another culture. He also points out that languages constantly change, discarding and creating new mixed modes as our communicative needs alter.
Locke's application of the categories "substance" and "mode" is rather unique in the history of philosophy. Both Aristotle and Descartes agreed with Locke that the distinguishing characteristic is self-subsistence. However, for them, only actual objects were self-subsistent; they would not have included collections of objects as substances. It is not entirely clear why Locke feels the need to classify collections as substances, since collections do not really have any self-subsistence out in the world in the way that single objects do. He probably could as easily called collections mixed modes rather than substances and account for their origin in the same way that he accounts for the origin of concepts like "dozen."
Aristotle and Descartes also limited the term "mode" to those things that depend on substances for their existence in a very literal way. Qualities were modes for him; abstract concepts were not. It is clear, though, why Locke felt justified in enlarging the scope of "mode." A mode, he felt, is not just something that is physically dependent on substances; it is also ontologically dependent on substances. We individuate modes in terms of the substances they depend on. While concepts like "murder," "gratitude," and "theft" do not physically exist in substances, they do depend on substances for their existence as ideas. We get these ideas by considering the relations and connections between our ideas of substances.