Is a function a special kind of relation? Is a function a "special kind of relation", or, does it "describe a specific relation"?
My text on discrete mathematics explains:

A relation is a subset of a Cartesian product and a function is a
  special kind of relation.

But it would make more sense to me if a function described a relation as a subset of the Cartesian product.
My thoughts being:
Given a function, f(x) = y, we can compute a set of (x,y) coordinates within the Cartesian plain. And this set of coordinates would be the relation that is the subset of the Cartesian product.
Am I confused? Could anyone help explain how a function IS a relation?

A function (from set $A$ to set $B$) is a relaction of special kind in which  $(x,y_1)=(x,y_2) \Rightarrow y_1=y_2$ for every $x \in A, y_1,y_2 \in B$.
