Halliday (2008: 45):
Every clause in every kind of discourse combines an ideational and an interpersonal strand of meaning. But weaving these two together is an extremely complicated task; and in managing all this complexity, language evolved a third metafunctional component, by which it is enabled to organise itself in the form of discourse. Discourse is what linguists perceive as text; so we call this the textual metafunction. This is what enables a language to function meaningfully in all its multifarious contexts.