# functions are a special type of relation tags : [[category theory]] source : [[ACT4E - Session 2 - Connection]] A function is a special type of [[relation]]. A relation is a function if it satisfies the two following conditions: 1. \\(\forall x \in X \exists y \in Y : \langle x,y \rangle \in R\\) - every element of the source X gets mapped by f to some element of the target Y 2. \\(\exists \langle x\_1,y\_1 \rangle, \langle x\_2,y\_2 \rangle \in R\\) holds: \\(x\_1 = x\_2 \Rightarrow y\_1 = y\_2\\) Like categories and subsequently relations, functions can also be composed.