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
10
votes
1 answer

Functional equation $f(x)=\frac{1}{1+f(\frac{1}{1+f(x)})}$

Problem: Find all continuous real-valued functions $f$ such that $$f(x)=\frac{1}{1+f(\frac{1}{1+f(x)})}.\tag{1}$$ Here $f$ is allowed to be defined only on a subset of $\mathbb{R}$. The only solutions I found are the constant…
Patrick
  • 101
10
votes
3 answers

Can there exist a non-constant continuous function that has a derivative of zero everywhere?

Somebody told me that there exists a continuous function with a derivative of zero everywhere that is not constant. I cannot imagine how that is possible and I am starting to doubt whether it's actually true. If it is true, could you show me an…
Peter Olson
  • 2,253
9
votes
3 answers

What does this dollar sign over arrow in function mapping mean?

In a certain function mapping like this, $x \xleftarrow{\$} \{0,1\}^k$ (Lecture Notes on Cryptography by S. Goldwasser and M. Bellare, page 18) I fail to understand what exactly does this \$ sign mean. This has been put here without any…
Masroor
  • 1,811
9
votes
7 answers

Rigorous Definition of "Function of"

When I was learning statistics I noticed that a lot of things in the textbook I was using were phrased in vague terms of "this is a function of that" e.g. a statistic is a function of a sample from a distribution. I realized that while I know the…
mgriisser
  • 131
9
votes
5 answers

Is $f(x)=x+\sin(x)$ a one to one or many to one function?

If we differentiate the function, we get $$f'(x)=1+\cos(x)$$ Hence, $f'(x)$ varies from $0$ to $2$. So, I think it is a one to one function because the function is never decreasing, and the function never becomes consecutively constant for more…
Yash Swaraj
  • 107
  • 1
  • 9
9
votes
3 answers

How to find range of a rational function?

How to find range of $$f(x) = x^2 + \frac{1}{x^2+1} \quad ?$$ Its domain is all real numbers. If I use calculus it is very lengthy but if I put RHS of equation equal to y I get a quadratic equation in $x^2$ but I cannot find range of y by imposing…
Matt
  • 1,150
9
votes
4 answers

Are the graphs of inverse functions always reflections of the function's graph in the line $y = x$?

For an invertible function, is the graph of its inverse always the mirror image of the function's graph in the line $y=x$? And, if yes, then why is it so?
9
votes
2 answers

Existence of $\vee$ or $\wedge$ for non-monotonic functions

This question is inspired by a discussion in chat with wj32. We allow for equality in the definition of increasing and decreasing and call a function monotonic if it is increasing or decreasing. If $f:\mathbb R\to \mathbb R$ is not monotonic, are…
user4594
9
votes
1 answer

Comparing the growth rates

How can I go about comparing the growth rate of the following functions? $$\sqrt n,\quad 10^n,\quad n^{1.5},\quad 2^{\sqrt{\log n}},\quad n^{5/3}.$$ I am looking for a more generic answer on how do we go about comparing growth rate of functions and…
9
votes
6 answers

Show that $f(x) = \log(x + \sqrt {x^2+1})$ is an odd function

I need to show that $f(x) = \log(x + \sqrt{x^2+1})$ is an odd function and from what I can understand from this question (found while searching): What is an odd function?, I have to show that$f(-x)=-f(x)$. I have struggled to figure it out for hours…
H G Sur
  • 597
9
votes
1 answer

Arithmetic function to return lowest in-parameter

Is there a mathematical function such that; f(3, 5) = 3 f(10, 2) = 2 f(14, 15) = 14 f(9, 9) = 9 It would be even more cool if there's a function that takes three (3) parameters, but that one could be solved by using recursive functionality; f(…
Björn
  • 193
9
votes
2 answers

Is a function changed into another function by a change of variables?

If I have a function $ u(x,t) = p(x+ct) + q(x-ct) $ (which is the d'Alembert solution to the $1D$-wave equation), I can make the substitutions $$ \xi(x,t) = x + ct\\ \eta(x,t) = x - ct $$ So I am now left with $$ u(x,t) = p(\xi) + q(\eta) $$ I…
funklute
  • 555
8
votes
1 answer

Integer functions

For $x>0$ consider the following three functions: $$\begin{align} f(x)&=x+1;\\g(x)&=2x;\\t(x)&=3x \end{align}$$ Let $A(x)$ be the minimum number of operations using only functions $f(x)$ and $g(x)$ needed to get $X$ from $0$. Let $B(x)$ be the…
Andrew
  • 303
  • 1
  • 11
8
votes
1 answer

Solving $f(x+y) = f(x)f(y)f(xy)$

Find all continuous functions such that $f(x+y) = f(x)f(y)f(xy)$ I solved it and got the two very obvious solutions, $f(x) = 0$ and $f(x) = 1$. Any other such functions?
8
votes
4 answers

What are the real-valued functions?

Is $f(x)=\frac{1}{x}$ a real-valued function? I think the definition of a real-valued function is that the range is in the real numbers. Is that right? Hence, I think $f(x)=\frac{1}{x}$ is not a real-valued function. If then, what are the other…
aaa
  • 185