# Writing a rule for a function: NOTATION

Consider the function $$f$$ such that $$a \in A$$, $$b \in B$$:

$$f : {A} \to {B} \quad$$

where $$A, B \subset \mathbb{R}$$. When writing down $$f(a)=b$$, how may we define what a rule is for $$f$$? I know we may write $$f(a)=b=a^2$$ but I feel like I get confused when describing to someone that $$a^2$$ is the image of $$a$$ and also how $$a$$ is being mapped to $$b$$. Can someone please help me clarify this or does it sound like I have the right idea?

• You often see the notation $x\mapsto x^2$ or $f:x\mapsto x^2$ to describe the rule of assignment; here $x$ represents an arbitrary element of the domain. Is that helpful? Are you confused about whether the notation $y=f(x)$ describes the general rule vs a particular value?
– MPW
Jul 31 '19 at 13:40
• Welcome to MSE. I like this question. Please do stick around. Jul 31 '19 at 13:46
• @MPW I believe I am confused about the latter of your statement. When describing the image of a particular element to someone, is $y=f(x)=x^2$ the image and $x^2$ is how $x$ is being mapped to its image? Jul 31 '19 at 13:58
• Suppose $A=\{a,b,c\}$ and $B=\{a^2,b^2,c^2\}$ where $a,b,c$ are specific real numbers. Then saying $f(a)=a^2$ is a statement about a particular value. But stating that the rule is $f(x)=x^2$ (or, alternatively, $x\mapsto x^2$ or $f:x\mapsto x^2$) in general doesn't refer to a specific value, but to how all domain elements are mapped to their images.
– MPW
Jul 31 '19 at 19:49
• Maybe a better example would be to say that $f(2)=4$ and $f(3)=9$ describe specific values, but in general $f(x)=x^2$ is the rule of assignment because it describes how $f$ "works" on any input $x$.
– MPW
Jul 31 '19 at 19:50

We don't "give the rule to the function". As a matter of fact, we first have a certain "rule" of interest to us. This rule can be some text describing how the image point of $$x$$ is found, it can be an expression defining how from an arbitrary number $$x$$ in the envisaged domain $$A$$ the function value $$y\in B$$ can be computed, the rule can be a certain geometric construction explained in a figure, etcetera. Such a rule then gets a name, e.g., $$f$$, and we sketch a flow diagram like $$f:\quad A\to {\mathbb R},\qquad x\mapsto f(x):={\cos x+e^{-x}\over 1-x^2}\ ,$$ where $$A\subset{\mathbb R}$$ is some interval containing only numbers $$x$$ for which the expression on the RHS can be computed, e.g., $$A=\>]{-1},1[\>$$.

• How come in texts I see statements such as "the function $f$ is defined by the following rule $f(x)=3x+1$? Thank you for your response, as well. Jul 31 '19 at 15:16
• Your example exactly confirms what I'm saying. You have the rule $x\mapsto 3x+1$ and call this rule $f$. Then $f(x)=3x+1$ for all $x\in{\mathbb R}$. Jul 31 '19 at 18:52
• Gotcha! Thank you sir for your time. Aug 1 '19 at 13:46

Well, the definition is $$f:A\rightarrow B:a\mapsto a^2$$, where the arrows have different meanings. The arrow $$\rightarrow$$ describes the relationship between sets, and the arrow $$\mapsto$$ provides the assignment of elements. You can also write $$f(a)=a^2$$ as usual.

• would it be correct to say the rule $a^2$ is what $f$ does when applied to an element in the domain? Jul 31 '19 at 14:19
• $a^2$ is just an expression. The function provides the assignment mapping $a$ to $a^2$. Jul 31 '19 at 14:23
• Right, so is $a^2$ the rule that we give to the function? Jul 31 '19 at 14:38
• Well, I wouldn't say rule but assignment $x\mapsto x^2$. Jul 31 '19 at 14:43
• @TaylorRendon. When you write "/.../ what $f$ does /.../" it sound like you think that a function is a calculation process, like in programming. In mathematics a function is a relation between the argument(s) and the value. One shouldn't think of the value as being calculated. Sometimes the relation between argument and value can be so complicated that it cannot be written as an expression, or even described using text; it can only be shown to exist. Jul 31 '19 at 22:18