A function is defined as a set of ordered pairs of elements of the domain and the codomain, such that for any element of the domain there's exactly one pair in the function that has that element as its first value, together with the "context" of what the domain and codomain are; for example, if you have a function from the set $A=\{a,b,c\}$ to the set $B=\{d,e,f\}$ where
- $a$ gest mapped to d
- $b$ also gets mapped to d
- $c$ gets mapped to f
then that function would be the set $\{(a,d),(b,d),(c,f)\}$, together with the knowledge of what A and B are.
If you're working with numbers (or other objects with defined operations), then you might be able to describe the mapping with an expression like the one you mentioned, but this is not necessary: you just need some way to determine what pairs will be in the set and what pairs won't be.
So in synthesis:
- yes, once you know what the domain and codomain are, then the only thing determining the function is the expression, though sometimes you won't be using an expression;
- in theory yes, but in practice a lot of the time they can be inferred from context; remember though, being "defined" might mean as little as saying "$A$ and $B$ are two sets"
- more or less, the only things needed are the domain, codomain, and some way to map every element of the first to an element of the second (find all the pairs), which may not strictly be an expression.