0

I have a few questions about how functions are defined, specifically their mappings from a set $A$ to a set $B$.

  1. If I have an expression for $f(x)$ such as $f(x)=x^2$, is this the sole thing which determines a mapping from its set from A to B, or is there something else which determines how $f(x)$ maps from $A$ to $B$?

  2. Do A and B always have to be defined before hand in order to make the function well-defined?

  3. What things about a function are needed to define it; just $A$, $B$, and an expression for $f(x)$ which determines the mapping?

Princess Mia
  • 2,403
  • 1
    To define a function you have to specify a domain $A$, a co-domain $B$ and a rule for associating each element of $A$ with a uniue element of $B$. Unfortunately, not everyone accepts this. Some authors ask a question like: what is the domain of $\frac 1{1-x}$? These are not valid questions. I started seing such questions only after coming to MSE. – geetha290krm Aug 21 '23 at 06:42
  • 1
    @geetha290krm, I wouldn't say such questions are invalid so much as they're written using informal and non-rigorous language. Such a "find the domain" question can be more precisely written in the form "What is the largest subset of the real numbers over which we can define a function that has the rule $f:x \rightarrow \frac{1}{1-x}$?" These questions come up all the time in precalc and college algebra courses. – Mikayla Eckel Cifrese Aug 21 '23 at 06:44
  • fyi: this question is likely sparked by a poorly notated function definition in the OP's prior question. – Bill Dubuque Aug 21 '23 at 07:18

3 Answers3

1
  1. Assuming that $x^2$ is a well defined operation for every element of $A$ and that it maps into an element of $B$, then this is enough for an expression for $f(x)$
  2. Usually the domain and codomain are included as part of the definition of a function (along with the specific mapping). Sometimes depending on context these can be implied.
  3. Yes that is all. This expression does not have to be a concise formula such as $x^2$, it can be just a list detailing how $f$ maps each element of $A$ or some expression for the graph of $f$.
Alan Abraham
  • 5,142
  • 6
  • 20
1

My answer might be disputed as it contains personal preferences, but:

  1. The only thing here that might change here is how you interpret $x^2$ as this could as well be perceived as $x\circ x$ where $\circ$ is a (group) operation on $A$

  2. Formally yes, but then often no. Often $f$ is automatically restricted to its natural domain and codomain depending on the context. The domain $A$ on which we define the function is surely the most important thing as otherwise $f$ could as well not be defined, whereas $B$ is less "important" as you could define it simply as $f(A)$

  3. You don't even need an expression for $f$. The function $f$ just has to be a mapping that assigns to each value $x$ ($\in A$) one value $y$ ($\in B$) in a deterministic way: every time you feed the same $x$ you should get the same $y$. A classical example of function that has no closed formula is the Prime counting function

b00n heT
  • 16,360
  • 1
  • 36
  • 46
1

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:

  1. 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;
  2. 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"
  3. 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.
sortai
  • 319