When working in ${\rm I\!R}^2$, if I apply the Curl operator to a vector field, I obtain a scalar function. Now, the value of this scalar function on a certain point is the Curl on that point. I understand that, by convention, if this value is positive, the Curl is supposed to be a vector pointing "out" from the ${\rm I\!R}^2$ plane and vice-versa.
So my question is: formally speaking, does the Curl function return a scalar, which by convention we understand as a vector that can only take 1 possible direction, and whose orientation depends on the sign of the scalar (1), or, does the Curl function return a three-dimensional vector, with its first two entries equal to zero? (2) I know in practical terms, this doesn't make a difference, yet I would like to know the formal definition, which I couldn't find online.
In synthesis, is two dimensional Curl defined as:
$\nabla \times : {\rm I\!R}^2 \to {\rm I\!R}^3$$\!$ (2)
or
$\nabla \times : {\rm I\!R}^2 \to {\rm I\!R}$ $\!$ (1)