Consider a self-similar space X. A typical situation is that X looks like several copies of itself glued to several copies of another space Y, and Y looks like several copies of itself glued to several copies of X, or the same kind of thing with more than two spaces. Thus, the self-similarity of X is described by a system of simultaneous equations. Here I formalize this idea and the notion of a `universal solution' of such a system. I determine exactly when a system has a universal solution and, when one does exist, construct it. A sequel (math.DS/0411345) contains further results and examples, and an introductory article (math.DS/0411343) gives an overview.