The Student Room Group

Formal Definition of a Function

Hi, I was just wondering if there is a convention for writing the domain and range of a function?

For example, how would you state the range and domain (formally) for the following function:
f:xe2xf : x \mapsto e^{2x} where xRx \in \mathbb{R} and x>0x > 0 ?

As far as I'm aware, to state the domain of the function, you can just leave a space after the function definition and then list the criteria, but I'm not sure if there's a nice way to write the range. According to this, you can write Dom(f(x)) = ... and Ran(f(x)) = ..., but I feel a bit iffy about this.

Here's one attempt at writing the domain and range of the function I mentioned:
f:xe2xxR,x>0f : x \mapsto e^{2x}\,\,\,\,\,\, x \in \mathbb{R}, x > 0
f(x)R,f(x)>1f(x) \in \mathbb{R}, f(x) > 1

Here's another attempt based on set-builder notation:
f:xe2x{xxRx>0}f : x \mapsto e^{2x}\,\,\,\,\,\, \{x\, |\, x \in \mathbb{R} \land x > 0\}
Ran(f(x))={xxRx>1}\text{Ran}(f(x)) = \{x\, |\, x \in \mathbb{R} \land x > 1\}

Any suggestions/examples would be greatly appreciated.

Thank you! :smile:
In lecture notes, both typed and written, I usually see either:

f:RR,xe2xf:\mathbb{R}\mapsto\mathbb{R}, x\mapsto e^{2x}

or

Unparseable latex formula:

[br]\begin{align*}[br]\\f:\mathbb{R} & \mapsto\mathbb{R}[br]\\ x & \mapsto e^{2x}[br]\end{align*}[br]



edit: I have simply no idea why the second one isn't formatting properly.. hm. Well anyway, it's supposed to have x mapping to e^2x underneath the R's, looking a bit more neat than the one above, but a bit impractical in the layout sometimes.
(edited 9 years ago)
Original post by FireGarden
In lecture notes, both typed and written, I usually see either:

f:RR,xe2xf:\mathbb{R}\mapsto\mathbb{R}, x\mapsto e^{2x}

or

Unparseable latex formula:

[br]\begin{align*}[br]\\f:\mathbb{R} & \mapsto\mathbb{R}[br]\\ x & \mapsto e^{2x}[br]\end{align*}[br]



edit: I have simply no idea why the second one isn't formatting properly.. hm. Well anyway, it's supposed to have x mapping to e^2x underneath the R's, looking a bit more neat than the one above, but a bit impractical in the layout sometimes.


Sorry, I'm not sure I understand.
I think I understand f:RR,xe2xf : \mathbb{R} \mapsto \mathbb{R}, x \mapsto e^{2x}. So does this mean that 'input a real number, output a real number', and then 'the output should be e to the power of 2 multiplied by the input'?

But what about defining the range (f(x)R,f(x)>1f(x) \in \mathbb{R}, f(x) > 1)? And what about the domain (xR,x>0x \in \mathbb{R}, x > 0)? Can you include inequalities on the left-hand side of the \mapsto symbol?
Original post by FireGarden
In lecture notes, both typed and written, I usually see either:

f:RR,xe2xf:\mathbb{R}\mapsto\mathbb{R}, x\mapsto e^{2x}

or

Unparseable latex formula:

[br]\begin{align*}[br]\\f:\mathbb{R} & \mapsto\mathbb{R}[br]\\ x & \mapsto e^{2x}[br]\end{align*}[br]



edit: I have simply no idea why the second one isn't formatting properly.. hm. Well anyway, it's supposed to have x mapping to e^2x underneath the R's, looking a bit more neat than the one above, but a bit impractical in the layout sometimes.

Not quite. Whilst this is the conventional way to write a function, the domain of the OP's function is the positive reals so you cannot write f:RRf:\mathbb{R} \to \mathbb{R}; but rather f:R+Rf:\mathbb{R}_+\to \mathbb{R} (where you may define R+={xRx>0}\mathbb{R}_+ = \{ x\in \mathbb{R} | x>0\}).

[I assume you just misread the OP's post, though]

Original post by GingerCodeMan
Hi, I was just wondering if there is a convention for writing the domain and range of a function?

For example, how would you state the range and domain (formally) for the following function:
f:xe2xf : x \mapsto e^{2x} where xRx \in \mathbb{R} and x>0x > 0 ?

As far as I'm aware, to state the domain of the function, you can just leave a space after the function definition and then list the criteria, but I'm not sure if there's a nice way to write the range. According to this, you can write Dom(f(x)) = ... and Ran(f(x)) = ..., but I feel a bit iffy about this.

Here's one attempt at writing the domain and range of the function I mentioned:
f:xe2xxR,x>0f : x \mapsto e^{2x}\,\,\,\,\,\, x \in \mathbb{R}, x > 0
f(x)R,f(x)>1f(x) \in \mathbb{R}, f(x) > 1

Here's another attempt based on set-builder notation:
f:xe2x{xxRx>0}f : x \mapsto e^{2x}\,\,\,\,\,\, \{x\, |\, x \in \mathbb{R} \land x > 0\}
Ran(f(x))={xxRx>1}\text{Ran}(f(x)) = \{x\, |\, x \in \mathbb{R} \land x > 1\}

Any suggestions/examples would be greatly appreciated.

Thank you! :smile:

The definition of "range" either refers to the image of ff or a set containing the image of ff (often referred to as the codomain) - and in most cases, depends on what question is being asked of you. The definition of domain is inflexible - it is simply the set of inputs for the function and must always be written in it's entirety - with nothing more or nothing less, if you intend to define the same function.

The more commonly used convention is one where "range = codomain", so that you can write, in general terms:
f:{Domain}{image and "other stuff"}f:\{\text{Domain}\} \to \{\text{image and "other stuff"}\};
xf(x)x\mapsto f(x)

In this specific case:
f:R+Rf:\mathbb{R}_+ \to \mathbb{R};
xe2xx\mapsto e^{2x}

(Where R\mathbb{R} will do for the range, since R>1R\mathbb{R}_{>1} \subset \mathbb{R}; and it's hopefully obvious what R+,R>1\mathbb{R}_+, \mathbb{R}_{>1} mean [if you have any doubt about the clarity of your domain or codomain, define the sets separately first]).

This is usually the assumed convention unless you're specifically asked to give the range - in which case, the question is probably using the "range = image" convention, so there's little point writing out the entire function again; just write out the domain, image and nothing more.
(edited 9 years ago)
Original post by GingerCodeMan
Sorry, I'm not sure I understand.
I think I understand f:RR,xe2xf : \mathbb{R} \mapsto \mathbb{R}, x \mapsto e^{2x}. So does this mean that 'input a real number, output a real number', and then 'the output should be e to the power of 2 multiplied by the input'?

But what about defining the range (f(x)R,f(x)>1f(x) \in \mathbb{R}, f(x) > 1)? And what about the domain (xR,x>0x \in \mathbb{R}, x > 0)? Can you include inequalities on the left-hand side of the \mapsto symbol?


The format is (function name) : Domain -> Codomain, variable -> output.

The domain should be precisely specified, if you want only positive reals, you'd usually write R+\mathbb{R}^{+}. The range isn't usually specified, only the codomain. Of course, if it is easy to specify it, then you could write the range as the codomain, but it's often not a big deal - that's why people talk of surjectivity anyway, as the range and codomain may not be the same set.
Original post by Farhan.Hanif93

The more commonly used convention is one where "range = codomain", so that you can write, in general terms:
f:{Domain}{image and "other stuff"}f:\{\text{Domain}\} \to \{\text{image and "other stuff"}\};
xf(x)x\mapsto f(x)

In this specific case:
f:R+Rf:\mathbb{R}_+ \to \mathbb{R};
xe2xx\mapsto e^{2x}

(Where R\mathbb{R} will do for the range, since R>1R\mathbb{R}_{>1} \subset \mathbb{R}; and it's hopefully obvious what R+,R>1\mathbb{R}_+, \mathbb{R}_{>1} mean [if you have any doubt about the clarity of your domain or codomain, define the sets separately first]).


Thanks!

The 'range' must refer to the 'image' for my exam board, because the mark scheme gives the restrictive answers, i.e. not just 'the real numbers', but something like f(x) > 5/2 or something like that. Also, there's no real requirement to write them in this formal format; you can just write something like "Range: f(x) > ..., Domain: x ...". The reason I'm asking is just because I'm interested.

Just so I can solidify the concept in my head, here's another function:
f:xlnxxR,x>e3f : x \mapsto \ln{x}\,\,\,\,\,\,\, x \in \mathbb{R}, x > e^3

Could be written as:
R>y={xRx>y}\mathbb{R}_{>y} = \{x \in \mathbb{R} | x > y\}

f:R(>e3)R(>3)f : \mathbb{R}_{(>e^3)} \mapsto \mathbb{R}_{(>3)};
xlnxx \mapsto \ln{x}

Is this correct?
Original post by GingerCodeMan
Thanks!

The 'range' must refer to the 'image' for my exam board, because the mark scheme gives the restrictive answers, i.e. not just 'the real numbers', but something like f(x) > 5/2 or something like that.

Yeah, as above, if the questions asks for the range, you can give it in whichever form you like, provided that it's the image. So things like f(x) > 5/2 are perfectly valid.

Just so I can solidify the concept in my head, here's another function:
f:xlnxxR,x>e3f : x \mapsto \ln{x}\,\,\,\,\,\,\, x \in \mathbb{R}, x > e^3

Could be written as:
R>y={xRx>y}\mathbb{R}_{>y} = \{x \in \mathbb{R} | x > y\}

f:R(>e3)R(>3)f : \mathbb{R}_{(>e^3)} \mapsto \mathbb{R}_{(>3)};
xlnxx \mapsto \ln{x}

Is this correct?

It's correct. But again, as above, we conventionally refer to the range as a codomain when we use this format, so that it doesn't have to be the image (and more importantly, there's no implicit suggestion that the codomain is the image here [without specifying more about the function i.e. surjectivity] so there little point in writing the image as the codomain here as it's not explicit that f's image is being read off!)

It's more common to see the R>3\mathbb{R}_{>3} simply replaced with R\mathbb{R}, as both are suitable codomains; and since it's often easier to see that a function has a real output than it is to compute it's image, it's often sensible to stop once you've determined a codomain.

So:

f:R>e3Rf:\mathbb{R}_{>e^3} \to \mathbb{R};
xlnxx\mapsto \ln x

will do as a definition for the function.

But only R>3\mathbb{R}_{>3} (or equivalents) is a suitable candidate for an explicitly-requested range.
Original post by Farhan.Hanif93
Yeah, as above, if the questions asks for the range, you can give it in whichever form you like, provided that it's the image. So things like f(x) > 5/2 are perfectly valid.


It's correct. But again, as above, we conventionally refer to the range as a codomain when we use this format, so that it doesn't have to be the image (and more importantly, there's no implicit suggestion that the codomain is the image here [without specifying more about the function i.e. surjectivity] so there little point in writing the image as the codomain here as it's not explicit that f's image is being read off!)

It's more common to see the R>3\mathbb{R}_{>3} simply replaced with R\mathbb{R}, as both are suitable codomains; and since it's often easier to see that a function has a real output than it is to compute it's image, it's often sensible to stop once you've determined a codomain.

So:

f:R>e3Rf:\mathbb{R}_{>e^3} \to \mathbb{R};
xlnxx\mapsto \ln x

will do as a definition for the function.

But only R>3\mathbb{R}_{>3} (or equivalents) is a suitable candidate for an explicitly-requested range.


Thanks. All of this makes much more sense now. I'm glad I know about this, but I'll probably stick to the simple method for the exam!

Quick Reply

Latest