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

Prove there exists a positive integer $N$, such that for every integer $n\ge N$, $f(n)=n$

Let $f:\mathbb Z^+\to\mathbb Z^+$ be a function satisfying the following conditions: (i): For any positive integers $m$ and $n$, $$\gcd\bigl((f(m),f(n)\bigr)\leq\bigl(\gcd(m,n)\bigr)^{2014}\,;$$ (ii): For any positive integer $n$, we have $$n\le…
math110
  • 93,304
5
votes
2 answers

Are all continuous functions from a closed interval to $\mathbb R$ bounded?

For all continuous functions it is true that $f:[a,b] \mapsto \mathbb{R}$ (with $a < b$) is bounded from above. The question is to use the opposite position of that statement as well as to use the Weierstrass Interval technique for a suitable…
Mamba
  • 803
5
votes
2 answers

Proving if function is one to one

This is not a homework, I'm just doing some revision and I saw this exercise: Consider the function $f :$ $N× N$ $\rightarrow$ $N× N$ given by: $f(m, n) = (3m+n, n^2)$ (a) Is $f$ one-to-one? (b) Is $f$ onto? What should I do in this case $(3m+n,…
5
votes
1 answer

Linear functions with rounding

If I convert 47°F to Celsius, rounding to the nearest integer, I get 8°C. If I then convert back to Fahrenheit, again rounding, I get 46°F. Back to Celsius, 8°C. Now of course if I continue this process it will remain stable, going back and forth…
5
votes
1 answer

Can a multivariate function be represented as finite combination of one-variable functions?

Suppose we have a function $f\colon \mathbb{R}^n\to\mathbb{R}$, which is analytic almost everywhere. Can one say that there exists a finite sequence of operations, which will evaluate $f$ for any argument, if the operations are limited…
Ruslan
  • 6,775
5
votes
2 answers

A problem on function of a function

I am stuck with this problem, A function $f(x)$ is defined as $f(x) = \sinh(x)$. Another function $g(x)$ is such that $f(g(x)) = x$. Find the value of $\large g(\frac{e^{2012}-1}{2e^{1006}})$ I tried representing $f(x) =\large…
Quixotic
  • 22,431
5
votes
3 answers

Why does a function need a fixed number of arguments?

I was thinking about how common commutative and associative operations can be thought of as acting on several numbers even though we do it in many separate binary steps, such as $a+b+c+d$ being expressible as $a+(b+(c+d))$ and we call the value that…
user37577
  • 745
5
votes
3 answers

Function for concatenated semicircles

I am looking for a closed-form formula for something like this: Can anybody help - Thank you!
vonjd
  • 8,810
5
votes
2 answers

find all rational functions $f(x)$ such that $(f(x))^2-f(x^2)=constant$,

Find all $f(x)$ such that $$(f(x))^2-f(x^2)=constant$$
math110
  • 93,304
5
votes
3 answers

How do I transform $f(x)=\log(1+e^x)$ such that graph rotates $90^{\circ}$ on the $x$-$y$ axis

I am looking for a function $f(x)$ that is of a specific shape on the $x$-$y$ axis. I have a function $f(x)=\log(1+e^x)$ that has right shape. I want it rotated $90^\circ$ on $x$-$y$ axis. How can I get an $f(x)$ that is essentially a $90^\circ$…
5
votes
3 answers

Function with many values in a sequence

Cool problem I was reading but couldn't solve! Problem: Let $f(n)$ be a function satisfying the following conditions: a) $f(1) = 1$. b) $f(a) \leq f(b)$ where $a$ and $b$ are positive integers with $a \leq b$. c) $f(2a) = f(a) + 1$ for all positive…
5
votes
4 answers

Range of: $\sqrt{\sin(\cos x)}+\sqrt{\cos(\sin x)}$

Range of: $$\sqrt{\sin(\cos x)}+\sqrt{\cos(\sin x)}$$ Any help will be appreciated.
MathGeek
  • 611
5
votes
1 answer

Solve in rational numbers, the equation, $x\lfloor x\rfloor\{x\}=58$

Solve in rational numbers, the equation, $$x\lfloor x\rfloor\{x\}=58$$ where $\lfloor x\rfloor$ and $\{x\}$ are the greatest integer less than or equal to $x$ and the fractional part of $x$ respectively. I tried to make an equation…
user682793
5
votes
1 answer

Relation between $f(x)$ and $f(\sqrt{x})$

This might be silly, but if $f(\sqrt{x})=\frac{0.1}{a}x$, is $f(x)=\frac{0.1}{a}x^2$?
PGupta
  • 609
5
votes
3 answers

Formula to assign weights to expert reviewers based on ratio between total votes and helpful votes

I'm working on a computer program but I need help coming up with a formula. This program has list of customers that wrote reviews for products. For each review written by this customers there is a number of votes and also a number indicating how…
Ulises
  • 187