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
3
votes
6 answers

How to "invent" a function?

I'm currently making a game. I was given some numbers the leader wants me to stick close to. They are used for leveling; level 1, for example, needs 100 experience points, level 2 needs 250 experience points, etc. Is there any way, maybe with a…
3
votes
3 answers

How to show that $\max(a,b)^2+\max(a,b)+a-b$ is bijective?

How can I show that $f:\mathbb{N}^2 \to \mathbb{N}$ given by $$f(a,b)=\max(a,b)^2+\max(a,b)+a-b$$ is bijective? How could I show it to be injective and surjective? Or does it suffice to give a explicit inverse function? If so, what is the process of…
Ultor
  • 51
3
votes
3 answers

Are the graphs of these two functions equal to each other?

The functions are: $y=\frac{x^2-4}{x+2}$ and $(x+2)y=x^2-4$. I've seen this problem some time ago, and the official answer was that they are not. My question is: Is that really true? The functions obviously misbehave when $x = -2$, but aren't both…
3
votes
3 answers

How do I find a function $f(3n) = 3n$ such that it is different from the identity function?

This is my first time posting. I'm sorry if I'm neglecting some good etiquette practices; I tried to read everything that's been sent my way, but I probably missed something anyway. Also, English is not my first language, so I'm relying on Google to…
GLB
  • 33
3
votes
2 answers

Determine if a function or not.

$f(x) = 1 / (x-1)$ is not a function because for $x = 1$ there is a vertical asymptote which means infinte number of values of $y$ for $x = 1$. It is a function for $\mathbf{R}- \{1\}$. I want someone to just tell me if I am getting it right.
ryan1
  • 351
3
votes
1 answer

Additive function differentiable at 0

Let $f:\mathbb{R}\to \mathbb{R}$ be a function such that $f(x+y)=f(x)+f(y)$ where $x,y\in \mathbb{R}$. If $f(x)$ is differentiable at $x=0$, then $f(x)$ is differentiable only in a finite interval containing zero $f’(x)$ is constant for all $x\in…
Aditya
  • 6,191
3
votes
1 answer

Order 5 rational map?

$p(z) = 1-\frac{1}{z}$ has order 3: $p(p(p(z))) = z$ Is there an order 5 rational map with rational coefficients?
user581023
3
votes
3 answers

Explanation on $1-1$ functions and onto functions

$ f : \Bbb{Z} \to \Bbb{Z}$ (integers), $f(n) = 3n + 2$ is $1-1$ $ f : \Bbb{R} \to \Bbb{R}$ (real number), $f(x) = 2x - 3$ is onto can someone explain $1-1$ and onto functions? I don't really understand the idea behind $1-1$ and onto
ilovetolearn
  • 1,341
3
votes
2 answers

Is there a way to find functions specifically with $n$ zeros?

I was reading about some root-finding algorithms and wondered if there is a way to find functions specifically with n zeros, for example: finding a function (or a set of functions) that has 378 zeros. Is that possible?
Red Banana
  • 23,956
  • 20
  • 91
  • 192
3
votes
1 answer

Find the values of $x,y$ and $z$ in these equations

I'm stuck with these equations. Can somebody help me with solving it? If $$(a+b) = \frac{x(y+z)}{x+y+z},\quad (b+c) = \frac{y(x+z)}{x+y+z} ,\quad (a+c) = \frac{z(x+y)}{x+y+z}$$ then find $x,y,z$.
Grazel
  • 501
  • 5
  • 17
3
votes
1 answer

Are invertible functions more or less common than non-invertible functions?

I was curious whether functions that have an inverse are more or less common than functions that don't. My intuition tells me there are more functions without an inverse.
Ziggy
  • 631
3
votes
0 answers

What can I say about this "black box" function?

Situation I have a function $f(t)$ with the following known properties: $f(t)$ is defined for $t \ge 0$ (i.e. ignore $t < 0$). $t_2 \ge t_1 \implies f(t_2) \ge f(t_1)$ (i.e. the function is monotonically decreasing). There exists some $t_\alpha$,…
Matthew
  • 147
3
votes
2 answers

Find the domain of $y=\cos^{-1}\left(\frac{1-2|x|}{3}\right)+\log_{|x-1|}x$

Find the domain of $y=\cos^{-1}\left(\dfrac{1-2|x|}{3}\right)+\log_{|x-1|}x$. Since domain of $\cos^{-1}x$ is $[-1,1]$, therefore $-1 \leq (\frac{1-2|x|}{3}) \leq 1$ $$-3 \leq (1-2|x|) \leq 3 \Rightarrow -4 \leq -2|x| \leq 2 \Rightarrow -2 \leq…
Sachin
  • 9,896
  • 16
  • 91
  • 182
3
votes
1 answer

Looking for class of functions $f_n$ with $n$ variables $(x_1,...,x_n)$ and $f_n=k_n a^{n−1}$ if $x_i=a\;\forall i$

Is there a class of functions that fulfills or partly fulfills following conditions? For any $n\in\mathbb{N}_{>1}$ there is a function $f_n$ with following properties: $f_n$ is a function of $n$ variables, i.e. $f_n=f_n(x_1,...,x_n)$ with $x_i\ge0…
3
votes
1 answer

Addition of functions question

What is the difference between: $(f + g)(x)$ and $f(x) + g(x)$ ?
Joe
  • 325