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

Proving onto of a two variable function

So I know how to prove a function is onto if it has 1 variable. But this one has two and I'm confused about how to approach it. $f: \mathbb{Z} \times \mathbb{Z} \to \mathbb{Z}$ such that for any $(x,y) \in \mathbb{Z} \times \mathbb{Z}$ $f(x,y) =…
E 4 6
  • 243
2
votes
1 answer

Function strictly increasing please help

Prove that $$ f(x)=x+(1/2)\cos(x) $$ is strictly increasing.
Denis
  • 187
2
votes
3 answers

Need a function that matches criteria

I am trying to find a function such that $x$ reaches 0 at a set point $x^*$ such that $x* > 0$ as $x \rightarrow 0 \implies y \rightarrow 1.$ The curvature of the function between $x = 0$ and $x = x*$ can be changed such that it looks like the red…
Babbage
  • 23
2
votes
1 answer

function of two variables

Sorry for the absolute rookie question. I need to find an example of f(x,y) =/= f(y,x), for all x, y. Of course f(a,b) = ka+mb*i, k, m real would be an example, but is it possible that another function exists, whose range is entirely real? if no,…
Sean
  • 145
2
votes
1 answer

How to denote a set of functions

Say there is an unknown function $h(x)$ $$\int_A^B h(x) = c$$ $A$, $B$ and $c$ are known. So $h(x)$ can have various forms on the range $[A,B]$. I want to know how to denote the set of functions for $h(x)$. I know the notation for a set is…
jiggunjer
  • 125
2
votes
2 answers

Finding a 2-dimensional smooth function

I am designing an autonomous agent whose behaviour depends on a function of two variables, say $f(x,y)$. The variables $x$, $y$ and $f$ are all in $[0,1]$, and I know that: $$f(0,y)=f(x,0)=0$$ $$f(1,y)=f(x,1)=1$$ (The values $f(0,1)$ and $f(1,0)$…
2
votes
1 answer

Modeling mathematical functions

Here's something that's been bothering me for a while now, what I don't understand is, if I have a function and I wish to constrain it to specific values... And let's say I have three pairs of x,y values, why do I have to have three constraints? Can…
Curiosity
  • 1,568
2
votes
1 answer

Graph of a function and it's inverse.

Prove that the real roots of equation $$f(x)=f^{-1}(x);x\in R$$ always lie on $y=x$. I know that $y=f(x)$ and $y=f^{-1}(x)$ are symmetric about $y=x$ so, I do have some intuitions on this but I can't seem to be able to prove it rigorously.
user99403
2
votes
1 answer

What does it mean for two functions to be equivalent?

What does it mean rigorously for two functions $f: \mathbb{R} \to \mathbb{R}$ and $g: \mathbb{R} \to \mathbb{R}$ to be equivalent? Does $f = g$ if and only if $\forall x \in \mathbb{R} \ \ f(x) = g(x)$?
2
votes
3 answers

Mathematical function to convert two numbers into one?

Is there a mathematical function that converts two numbers into one so that the two numbers can always be extracted again?
Pratik Singhal
  • 211
  • 2
  • 7
2
votes
4 answers

Difference between one to one function and one to one correspondence

I am confused in the difference between one to one function and one to one correspondence. Please help me out to distinguish between the two. Thanks
user2857
2
votes
2 answers

Bijection from ordered pairs of $[0,n]$

I am looking for a simple expression to convert ordered pairs from $[0,n]$ to the first smallest subset of $\mathbb N$. For example if $n = 3$: $$ (0, 1) \rightarrow 0$$ $$ (0, 2) \rightarrow 1$$ $$ (0, 3) \rightarrow 2$$ $$ (1, 2) \rightarrow…
Mikaël Mayer
  • 247
  • 1
  • 9
2
votes
3 answers

Solve $6^x=36\cdot (9.75)^{x-2}$

I try to solve the following equation: $6^x=36\cdot (9.75)^{x-2}$ I tried: $1=6\cdot (9.75)^{x-2}$ But this is obviously wrong! I think it would be smarter to bring the whole expression on one side. How should I proceed instead?
2
votes
1 answer

continuous and bounded function without maximum or minimum

Give an example that contradicts this sentence : $f:(0,1]\to\Bbb R$ is a continuous and bounded function in $(0,1]$ then : $f$ has maximum or minimum. I have understood that $\sin(1/x)$ could be a right contradiction but I can't understand why this…
2
votes
3 answers

Induction proof with recursion definition

I'm doing practise exam questions, and have got the following question : Consider the function $\operatorname{five}: \Bbb N \to \Bbb N$ defined recursively as follows: 1) Base case: $\operatorname{five}(0) = 10$ 2) Recursive case:…