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

How to convert data points into an equation

Very often, I can easily see that my data has a "pattern". This pattern usually resembles something as simple as multiplying the previous point by 1.2 or 1.3. But it can also appear to be exponential or parabolic. The problem is when I know that…
4
votes
1 answer

Let $f(x)=x \cdot \sqrt {x-1}$ is $f(0)=0$ or $f(0)$ undefined?

Let $f(x)=x \cdot \sqrt {x-1}$ Normally, do you consider $f(0)=0$ or undefined? Thanks in advance
Ahmed Ali
  • 1,116
  • 3
  • 13
  • 29
4
votes
1 answer

Question about function notation

I'm learning function notation and will soon be doing Calculus - having trouble with this question: Question: Find the x- and y- intercept of each function: $f(x) = x^2 + 3x$ If I set x to 0, I find out that Y would be obviously equal to 0. I'm not…
Garena
  • 55
4
votes
3 answers

Prove that $f[f^{-1} [f[X]]] = f[X]$

I'm trying to prove that $f[f^{-1} [f[X]]] = f[X]$, where $f: A\to B $ and $ X \subset A$. I have already proved that $X \subset f^{-1}[f[X]]$. My thoughts: First, I know that $ f[X] = \{f(x):x \in X\} =\{f(x) : x \in f^{-1}[f[X]]\} $ (because $X …
Lstoi
  • 199
4
votes
3 answers

Find 2 functions so that fg = 0

The full question : Find 2 functions $f,g: \mathbb R \to \mathbb R$ $f,g \neq 0 $ so that $fg = 0$ The confusing part is the way it is written, as far as I can tell there is no product of anything other than $0$ which yields $0$, is there?? Perhaps…
new one
  • 91
4
votes
1 answer

About nonlinear functions $f$ and $g$ such that $f(x+y)=g(x)+g(y)$

Does there exist nonlinear functions $f$ and $g$ such that $f(x+y)=g(x)+g(y)$ for every $x$ and $y$? Maybe there is a trivial solution but I can't see it. Thank you.
Patrick
  • 141
4
votes
2 answers

How to create a one to one correspondence between two sets?

I am stuck with, Give a one to one correspondence between Z+ and positive even integers. Now, I don't have an idea how to show that there is a one to one correspondence between the two. I would be thankful for some hints.
user2857
4
votes
1 answer

How do these two contorted functions, $F(x)(f)=f(x)$ and $\mathscr{F}(f)=(x\mapsto (t\mapsto f(t)(x)))$, work?

First off: I haven't taken a functional analysis course yet, so please keep that in mind when explaining. I just rather randomly read about this stuff and it started to interest me. I'm having trouble understanding how the following contorted…
resu
  • 1,782
4
votes
5 answers

Injection $\mathbb N \times \mathbb N \times \mathbb N \to \mathbb N$

I have to give an example of an injection $\mathbb N \times \mathbb N \times \mathbb N \to \mathbb N$. Would something like $f(x)=x^3$ be an answer to this question?
user112495
  • 384
  • 4
  • 13
4
votes
3 answers

is there anywhere i can search online for functions by domain and range?

The other day while doing a sort of mathy/arty animation I wanted a real-valued function over the open interval (0,1) of a single variable. Any function would have done. I just needed some values to animate the object I was working with. (At the…
4
votes
3 answers

Logarithmic function

Compute the value of $f\bigl(\frac{1}{400}\bigr)$ if the function is defined as follows : $f(xy) = f(x) + f(y)$ and $f(4)= 16$
4
votes
1 answer

Cauchy distribution instead of Coulomb law?

A recent question by alexv - and his comment that the answer will eventually be used in Gravity modeling - has triggered the following in my mind. It's about Electric modeling instead of Gravity modeling, but the inverse square law is similar.The…
Han de Bruijn
  • 17,070
4
votes
2 answers

How to find the range of $\sqrt {x^2-5x+4}$ where x is real.

How to find the range of $$\sqrt {x^2-5x+4}$$ where $x$ is real. What I've tried: Let $\sqrt {x^2-5x+4}=y$, solving for real $x$, as $x$ is real discriminant must be $D\geq0$. Solving I get $y^2\geq\frac{-9}{4}$. Which I suppose implies all real .…
user97245
4
votes
1 answer

Given an inductive function, how to calculate?

Currently having slight difficulty figuring out how to solve this. Given is; $$\begin{align}f(0) &= -3\\ f(1)&= 2 \\ f(n) &= f( n - 2 ) + 2 f( n - 1)\end{align}$$ Now, I need to calculate $f(5)$. I'm not sure how to handle a function like…
4
votes
6 answers

Function Converts Even numbers to preceding Odd

I feel like this is far simpler than I am making it. I am looking for a function $y=f(x)$ such that: $f(1) = 1$ $f(2) = 1 $ $f(3) = 3 $ $f(4) = 3 $ $f(5) = 5 $ $f(6) = 5$ That is to say, all the evens become the preceding odd number. Does this…
mwjohnson
  • 301