...How is this relation defined?contains R^n.
If is a relation between sets and : that is, , and similarly is a relation between and , then the composition is the relation between and given by .
If is a relation between and itself, then it makes sense to define as and more generally . Of course it turns out that composition is associative so that all the possible ways of defining are the same.