> For the complete documentation index, see [llms.txt](https://mandober.gitbook.io/math-debrief/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mandober.gitbook.io/math-debrief/260-function-theory/_articles/_into.md).

# Introduction

Although the concept of functions existed before, it was first formalized in terms of set theory, and described as a particular type of relation between two sets.

Any subset of the *Cartesian product* between two non-empty sets defines a relation between them.

A particular relation that associates each element of the *domain* set (DOM) to a single element of *codomain* set (COD) is called a function.

Cartesian product, relation and function are all sets: fn is a proper subsets of all relations which are subset of Cartesian product:

$$\displaystyle \forall a \in A, \forall b \in B \mid aRb = {(a,b)}$$

$$R \ \subseteq \ X \times Y$$

$$\displaystyle \forall a \in A, \exists !b \in B \mid f(a) = b$$

$$f \subset R$$

$$f \subset R \subseteq X \times Y$$

All functions are relations, but not all relations are functions:\
`functions ⊂ relations ⊆ dot-product`.

`relations ⊆ dot-product` because the `full-relation = dot-product`\
all other `relations ⊂ dot-product`.

Functions are relations with a set of special properties.
