I think that the following definitions of the domain of a function are inconsistent:
Definition A
A function $f$ from a set $X$ to set $Y$ is defined by a set $G$ of ordered pairs $(x,y)$ such that $\forall x\in X$ and $\forall y\in Y$, and every element of $X$ is the first component of exactly one ordered pair in $G$. The set $X$ is called the domain of the function $f$.
Definition B
Let $f: X\mapsto Y$. Then $X$ is the set of all inputs for which $f$ provides an image in $Y$.
Let $f(x)=x^2$ be a function over the reals.
Using definition A, the domain of this function can be any subset of $\mathbb R$, because every element in any subset of $\mathbb R$ satisfies the condition that it is the first component of exactly one ordered pair.
But using definition B, the domain of this function is precisely the set $\mathbb{R}$. Therefore, these definitions are inconsistent. Which one should be used?