Questions tagged [functions]

For elementary questions about functions, notation, properties, and operations such as function composition. Consider also using the (graphing-functions) tag.

A function $f$ defined on a set $X$ is an assignment of an element in some set $Y$ to each element of $X$. The set $X$ is called the domain of the function and $Y$ is called the codomain. The elements of $X$ are the inputs to the function and the elements of $Y$ are the potential outputs. For some input $x \in X$, its corresponding output in $Y$ is denoted $f(x)$. Not every element of $Y$ needs to be the output corresponding to some input though: the subset of $Y$ containing the elements that are an output of the function is called the range of $f$. When a function $f$ has domain $X$ and codomain $Y$, this is signified by writing $f \colon X \to Y$, and the assignments of inputs to outputs is signified by writing $f\colon x \mapsto f(x)$.

If you have a function whose codomain is the domain of another function, you can compose those two functions. In symbols if you have a function $f\colon X \to Y$ and a function $g \colon Y \to Z$, their composite is a function $g\circ f\colon X\to Z$ defined by the assignment $g\circ f\colon x \mapsto g(f(x))$.

For many examples of functions, the domain and range of the function are topological spaces, meaning that they are equipped with some notion of geometry. In this case we like to think of the function $f\colon X\to Y$ geometrically as the subset of the points $(x,f(x))$ in the topological space $X \times Y$. This subset of all the input-output pairs is called the graph of $f$.

Often mathematics textbooks will define a function slightly more rigorously than this though. They'll say that a function $f \colon X \to Y$ is a relation $R$ on the set $X \times Y$ such that

  1. For each $x \in X$ there is some $y \in Y$ such that $xRy$. Each input needs an output.
  2. If $xRy$ and $xRz$, then $y=z$. Each input needs exactly one output.

Here are a bunch of examples of functions:

  • Many examples of functions covered in elementary and high school have as their domain and codomain the real numbers $\mathbf{R}$. A basic example is the function $f \colon \mathbf{R} \to \mathbf{R}$ defined by the rule $f(x) = x^2$. Thinking geometrically, the graph of $f$ is the set of all points $(x,x^2)$ in the plane $\mathbf{R}^2$, and this forms a parabola. Note that while the codomain of this function is $\mathbf{R}$, the range consists of only the non-negative real numbers.

  • Here's a silly example. For any set $X$ we can define an identity function $\mathbf{1}_X$ with domain and codomain $X$ such that $\mathbf{1}_X \colon x \mapsto x$.

  • Let $W$ denote the set of all strings of letters of the alphabet, so like $\text{npr}$ or $\text{asdfasdf}$ or $\text{butt}$ for example. And let $\mathbf{N}$ denote the set of natural numbers. We can define a function $\ell\colon W \to \mathbf{N}$ such that $\ell$ assigns to each word it's length. So $\ell(\text{defenestration}) = 14$. Also $\ell(\text{butt})=4$.

  • Using the same set $W$ in the last example, let's define another function $\tau\colon W \to W$ such that $\tau$ "reverses" a word. So $\tau(\text{defenestration}) = \text{noitartsenefed}$, and $\tau(\text{butt}) = \text{ttub}$. A few neat properties of $\tau$ that deserve to be pointed out, $\tau \circ \tau = \mathbf{1}_W$, and also $\ell\circ\tau = \ell$.

33723 questions
1
vote
1 answer

Diagonal of a two variables function and its partial derivative

$L(x,y)$ is a nice function (we can assume nice properties of it if needed), now suppose $$\frac{\partial L(x,y)}{\partial y}|_{y=x}\equiv H(x)$$ is a known function, then what can we learn about the diagonal function $L(x,x)$? Thanks a lot.
1
vote
2 answers

find a such function $f(x)$

How to find a function $f(x)$ that satisfies: $f(x)$ defines only on the positive axis of X; when $x\to 0$, $f(x)\to +\infty$. For a positive real number $k$, when $x\to k$, $f(x)\to 0$. for $x\geq k$, $f(x)=0$. $f'(x)<0$ for all $x\leq…
Martial
  • 1,694
1
vote
1 answer

Find total number of surjective mappings

Let $A$ and $B$ two sets with $|A|=n$ and $|B|=m$. Then find total number of injective mappings from $A$ to $B$ if $n\leq m$. find total number of surjective mappings from $A$ to $B$ if $n\geq m$. In the first case the total number of…
user181598
  • 21
  • 2
1
vote
1 answer

Can a function be the domain of another function?

Is this the correct way to express a function whose domain is another function?: Let $n$ be any given natural number. Let $s$ be the square root of $n$. Using $s$ as the domain of the prime counting function, I express the prime counting function as…
1
vote
1 answer

Number of linear functions from $\{0,1\}^n$ to $\{0,1\}$

For $x,y \in \{0,1\}^n$, let $x \oplus y$ be the element of $\{0,1\}^n$ obtained by the component-wise exclusive or of $x$ and $y$. A boolean function $F:\{0,1\}^n \to \{0,1\}$ is said to be linear if $F(x \oplus y) = F(x) \oplus F(y)$, for all…
jaya
  • 11
1
vote
2 answers

What is the definition of functions like $\cos()$, $\exp()$ etc..

Every function has an expression by $X$, like: $f(x) = x^2 + 2x + 1$ What about cosinus, $\exp$, $\log$ functions ? What is $\log(x) =$ ? $\cos(x) =$ ? What happens when we pass a value to these functions in our computers ?
1
vote
2 answers

Left inverse implies right inverse

If f is an injection from $A$ to $B$, then it follows that there is a left inverse, $g$, from $B$ to $A$ where $g(f(a)) = a$. 1) Can I say that f is a right inverse of $g$? 2) How do I justify that?
1
vote
1 answer

Transient and Steady-State Response

What is the transient and steady-state response in the next equation: $$2 + 5t + 3\exp(-0.1t)$$ I am looking to understand how to identify both responses just looking the equations....Please Help me!
1
vote
3 answers

finding a function from given function

here is a function for: $f(x-\frac{\pi}{2})=\sin(x)-2f(\frac{\pi}{3})$ what is the $f(x)$? I calculate $f(x)$ as follows: $$\begin{align} x-\frac{\pi}{2} &= \frac{\pi}{3} \Rightarrow x= \frac{5\pi}{6} \\ f(\frac{\pi}{3})…
user123
  • 251
1
vote
2 answers

Do we simplify the Proof by Contradiction?

Prove the following by contradiction: Suppose $a,b\in\mathbb{Z}$. If $4|\left(a^2+b^2\right)$, then $a$ and $b$ are not both odd (in other words, $a$ and $b$ are even) So, I did this: Assume $a$ and $b$ are odd Let $a={2k+1}$ Let…
1
vote
1 answer

Is there a way to re-write $\min(a,b)$ in terms of an analytical function?

Is there a way to re-write $\min(a,b)$ in terms of an analytical function? Also, if not, is there a nice analytic function that is a tight upper bound? This question is related to this question.
Boby
  • 5,985
1
vote
2 answers

There is not such function in $\mathbb{R}$ such that $f>0$, $f'>0$ and $f''<0$.

Prove that there isn't a function $f \colon \mathbb{R} \to \mathbb{R}$ such that $f>0$, $f'>0$ and $f''<0$. Any suggestion will be appreciated.
1
vote
1 answer

Continuous functions, its inverse (if exists) and intersections graphically

I have a question regarding graphical intersection between a continuous function and its inverse (if exists). Suppose $f$ is a real continuous function and $f^{-1}$ exists. Can anyone assist in proving the following problem: If $f$ and $f^{-1}$…
Novice
  • 719
1
vote
1 answer

Showing the surjectivity of a function

$f:\mathbb{Z}\to\mathbb{Z}\times\mathbb{Z}$ is defined as $f(n)=(2n,n+3)$ $\mathbb{Z}$ means integers. I showed the injectivity but i'm confused with the surjectivity. Suppose that $(x,y)\in\mathbb{Z}\times\mathbb{Z}$. We need to show that there is…
AYARcom
  • 364
1
vote
2 answers

A function $f:\mathbb{R}\to\mathbb{R}$ such that $f^{-1}(x)=\frac{1}{f(x)}$

Does there exist a non trivial function $f:\mathbb{R}\to\mathbb{R}$ such that $f^{-1}(x)=\frac{1}{f(x)}$ ?
creative
  • 3,539