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
2 answers

Redistributing Money in Monopoly

Is there a class of functions that satisfies the following properties? $\lim_{x \to -\infty}f(x)=-k, \lim_{x \to \infty}f(x)=k$ $f(x)
Vincent Tjeng
  • 3,304
  • 2
  • 21
  • 34
1
vote
1 answer

Please, help me with this definition of a function

Let $A$ be a set. $y \in f(A)$ iff $f(x) = y$ for some $x \in A$. Suppose $A = \{2, 3\}$ and $f(x) = x^2$. Then $f(A) = \{4, 9\}. f(-2) \in f(A)$, but $-2 \notin A$. Is it contradicting the definition or is it just a case where the image of $f \neq$…
PornStar
  • 25
  • 2
1
vote
3 answers

Clarification of Functions

Let $f: \mathbb{Z}^2 \to \mathbb{Z}^2$ be defined as $f(m, n) = (m + n, 2m − 5n)$ . Is $f$ a bijection, i.e., one-to-one and onto? Since my function is mapped on the domain consisting of all integers I was wondering if it is valid to have $m$ and…
t3rrh42d2
  • 151
1
vote
2 answers

A function of type $[0,1] \to [0,1]$

I need suggestions on a continuous function with domain $[0,1]$ and range $[0,1]$ which shows large variation in output on minor variation in the input and small variation in output on large variation in the input. I know the function will be some…
1
vote
1 answer

Does function have two meanings: both a relation and the function value?

“In mathematics, a function1 is a relation between a set of inputs and a set of permissible outputs with the property that each input is related to exactly one output. An example is the function that relates each real number x to its square x2. The…
1
vote
3 answers

Why does evaluating negative numbers in brackets make them positive, whilst with brackets, they are not?

For example, if I evaluate $(-2)^2$ in my calculator, I get 4. However, if I evaluate $-2^2$ I get -4. I noticed this when doing my homework on functions, relating to this question: Find the range of the function $y = x^2 - 1$ in the restricted…
astgeh
  • 71
1
vote
2 answers

Finding the range of a function given a specific domain

The question is to "Find the range of each function over the given domain $f(x) = 1 / (2x + 5)$ for $-2 \le x \le 2$. I'm not sure what this is asking me to do , specifically the part over the given domain.
Ishamel
  • 57
1
vote
1 answer

Study of injectivity and surjectivity in function of parametres

I've to study injectivity and surjectivity of $f:\mathbb{Z}\to\mathbb{Z}$, with $f(n)=an^2+bn+c$, in function of $a,b,c\in\mathbb{Z}$. How can I start? Here's what I've tried, with injectivity: From definition, given $n_1,n_2\in\mathbb{Z}$ I have to…
Allonsy
  • 659
1
vote
2 answers

Determining quadratic coefficients without function

I was given the graph : and was asked to say whether the coefficients $(a,b,c)$ of the function $ax^2+bx+c$ for each of the 2 graphs was either positive or negative. We are supposed to find these coefficients just looking at the graph. I figured…
jn025
  • 989
1
vote
1 answer

Proof that the exists a bijective function

$S$ be a set. Consider the set of all functions from $S$ into $\{0,1\}$. The set is $2^S$ How do I proof that there exists a bijective function from $P(S)$ to $2^S$
1
vote
1 answer

Using a rotated function directly

I want to be able to directly use the resulting function of rotating a sine function. My original function is: f(x) = B * sin(x) My domain for x is -pi to pi. My domain for B is -1 to 1. When I rotate it by theta degrees I have (actually my theta is…
1
vote
2 answers

f(a) = b, a to b or b to a?

I'm reading a book, I quote from it: "" A function assigns an element of one set, called the domain, to elements of another set, called the codomain. The notation $f: A \to B$ indicates that $f$ is a function with domain, $A$, and codomain, $B$. The…
1
vote
2 answers

Find the minimal value of a function

Say we have function: $ f(r) = \frac{b}{r} (n + 2^r), r > 0 $ where $b$ and $n$ are some constants large than $0$. How can we determine the minimal value of this function? Compute the derivative: $f'(r) = \frac{-b}{r^2} (n + 2^r) + \frac{b}{r}(2^r…
cinvro
  • 329
1
vote
3 answers

Which function increase faster?

I have these functions $$f_{1}= \frac{n^{100}}{2^{n}}$$ $$f_{2}=2^{2^{n}}$$ $$f_{3}=n$$ $$f_{4}=10^{n}$$ how to put them in order from smaller to bigger? My first thought is to divide for example $f_{4}$ with $f_{3}$ and then find the limit.
1
vote
1 answer

What function can produce the same output as this code snippet?

If input >= 32 And input < 64 Then output = 126 - input ElseIf input >= 64 And input < 96 Then output = 126 + 64 - input ElseIf input >= 96 And input <= 126 Then output = 126 + 32 - input End If It looks like it has something to do with…