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

Finding composition of a function

Let $f,g:\mathbb{R}\rightarrow\mathbb{R}$ be functions given by $$f(x)=(x-1)^2 \quad \text{and}\quad g(y) \ \begin{cases}0,\qquad \qquad y<0\\\sqrt{y}+1\quad\quad y\geq 0.\end{cases} $$ Show that $g\circ f = \mathfrak{i}_\mathbb{R}$ where…
Natash1
  • 1,379
2
votes
0 answers

image of a piecewise function

I am given the piecewise function $f: \mathbb{Z} \to \mathbb{Z},$ $ f(x) =\left\{ \begin{matrix} 2n, & \text{if }n \text{ is even} \\ n, & \text{if }n \text{ is odd} \end{matrix}\right.$ I need to find the image of this function.…
2
votes
2 answers

What is the difference between $f(x_1) \geq f(x_2)$ and $(f(x_1) > f(x_2))$?

I am studying for my math course and I come across this definition. I am really struggling to understand the difference the parentheses make in the inequality. Can somebody please explain and why? Thank you.
user443248
2
votes
2 answers

Find a function $h:\mathbb{R}\to(0,\infty)$ with the following property.

I need the proof of the existence of a bijective function $h$ with the following property, and if it is unique: $$\forall x,a\in\mathbb{R}:a\cdot h(x)=h(x+1)$$ I know that if the assumpion $h(x)=a^x$ is true then it is a valid solution, but I don't…
Garmekain
  • 3,124
  • 13
  • 26
2
votes
1 answer

Give examples of functions $f\colon X\to Y$ and $g\colon Y\to X$ such that $g\circ f=id_X$ but where $f$ is not invertible.

Give examples of functions $f\colon X\to Y$ and $g\colon Y\to X$ such that $g\circ f=id_X$ but where $f$ is not invertible. At first I thought I could simply make $f(x)=x^2$ and $g(x)=\sqrt{x}$ but then I realized that their composition would yield…
jma
  • 125
  • 1
  • 6
2
votes
2 answers

To prove given function is constant function

Suppose $f,g,h$ are functions from the set of positive real numbers into itself satisfying $$f(x)g(y)=h\left(\sqrt {x^2+y^2} \right)\ \ \forall \ x,y\in (0,\infty )$$ Show that the three functions $\frac…
2
votes
1 answer

Is this parametric curve space-filling? Why or why not?

Really, the curve in question is the polar plot $ r = cos( K * \theta) $, where $K$ is any irrational number (I use $\pi$), but the transformation to a parametric one on $x$ and $y$ with domain $t$ is an unsurprising one. It would appear that the…
Justin L.
  • 14,532
2
votes
3 answers

The composition of two involution functions

Is the composition of two involution functions always an involution? I think this is probably not the case but would like if someone could provide me with some counter-examples.
noodler
  • 21
2
votes
3 answers

function relationship proving

I have a function $f:\mathbb{R}\rightarrow\mathbb{R}$ for which is true: $$f(x+y)=f(x)+f(y)$$ I have already prove that $f(0)=0$ and $f$ is odd. Now I want to prove the $f$ is One-to-One . If $f(x)=0$ and $x=0$ is the only root , but I want some…
Leos Kotrop
  • 1,195
2
votes
2 answers

Given function $f:\Bbb R\to\Bbb R:f(x)=\cos x$, check which properties it has

Given function $f:\mathbb{R}\to \mathbb{R}:f(x)=\cos x$, check whether it is surjective injective increasing decreasing strictly increasing strictly decreasing My Idea: $f(0)=f(2\pi)$ but $0 \neq 2\pi$ this f is not one one consider $y=2 \in…
2
votes
4 answers

It is posible to have a function $f$ with the following property?

I am considering the function $f$ defined as $$f:\emptyset\to\emptyset$$ My thought is that a function maps elements from a set to another one, but the empty set has no elements to map, so I think there cannot exist a function $f$ that has this…
Garmekain
  • 3,124
  • 13
  • 26
2
votes
1 answer

Exactly two functions

Show that there exist exactly two functions $f : \Bbb Q → \Bbb Q$ with the property $f(x + y) = f(x) + f(y)$ and $f(x · y) = f(x) · f(y)$ for all $x, y \in \Bbb Q$. I am unsure how to prove that there are no more than two functions that meet…
2
votes
2 answers

How to tell if a function is surjective from its graph

I am trying to figure out a way to check a function if it is surjective from the graph of the function. I know that we can know about injective functions by drawing a line parallel to x-axis. I am new to this topic and this site as well. Is there…
Kangkan
  • 317
2
votes
2 answers

Help with marble problem

In a box, there are red and blue marbles. If you take away one red marble, 1/4 of all marbles are red. If, on the other hand, you add a red one, 1/3 of all marbles are red. How many blue marbles are in the box? If we say: x = Amount of red…
2
votes
6 answers

How to find the domain of a composition of rational functions

($8$ points) Suppose that $$f(x) = \frac1{x - 3} \quad \text{and} \quad g(x) = \frac{x - 7}{x + 5}$$ For each function $h$ given below, find a formula for $h(x)$ and the domain of $h$. Use interval notation. (A)$\hspace{0.2cm}$ $h(x) = (f \circ…
7vinBB
  • 39