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

What does y=y(x) mean?

In many diciplines that utlizes mathematics, we often see the equation $$y=y(x)$$ where $y$ might be other replaced by whichever letter that makes the most sense in context. My question is what does $y$ mean in this case. I think that $y$ means both…
Kun
  • 2,496
2
votes
1 answer

Assume that $f : X \rightarrow Y $ is surjective. Show that $f(A^c) = (f(A))^c \ \forall A\subset X$ iff f is also injective.

Assume that $f : X \rightarrow Y $ is surjective. Show that $f(A^c) = (f(A))^c \ \forall A\subset X$ iff $f$ is also injective. So I tried starting with the right implication $\Rightarrow$ Since $f$ is surjective we know that every $ y\in Y$…
Olba12
  • 2,579
2
votes
3 answers

What function produces the pictured graph?

Quite simply, I need a function that will produce a graph similar to the one below. Important to note: 1) Y switches from negative to positive at X=1/3 2) Y ranges from -0.1 to +0.1, not to and from infinity 3) Y should be very close to 0 by X=1/6…
Taehl
2
votes
1 answer

Suppose $f(9)=2$.For each of the part below,find a point that must be on the graph of the given equation.

Suppose $f(9)=2$.For each of the part below,find a point that must be on the graph of the given equation. $a) \space y=f(x-3)+5 \\b)y=2f(x/4)\\ c)\space y=2f(3x-1)+7$ My attempt Part $(a)$ I have that $(9,f(9))$ is a point on the original…
Mr. Y
  • 2,637
2
votes
3 answers

A function $f(x)$ that increases from $0$ to $1$ when $x$ increases from $-\infty$ to $\infty$.

I am looking for a function $f(x) \in [0,1]$ when $x \in (-\infty, +\infty)$. $f(x)$ increases very fast when $x$ is small starting from $-\infty$, and then very slow and eventually approach $1$ when $x$ is infinity.
2
votes
3 answers

Calculate the range of $f$.

Calculate the range of the function $f$ with $f(x) = x^2 - 2x$, $x\in\Bbb{R}$. My book has solved solutions but I don't get what is done: $$f(x) = x^2 - 2x + (1^2) - (1^2)= (x-1)^2 -1$$ edit: sorry for wasting all of the people who've answered time,…
2
votes
1 answer

Algorithm for computing chances of 5 goals in a football match

I'm trying to write an algorithm for calculating percentages for an amount of goals of a football match. I'm a programmer, but Stackoverflow doesn't like math things, so I came here. How does it look like: We have 5 'chances' for 1 goal, 2 goals, 3,…
Kuba
2
votes
2 answers

Determine if $x=y^3+y+|y|$ is a function

We have this relation: $$x=y^3+y+|y|$$ Problem: Determine if $y$ is a function of $x$. If there were no $|y|$, I could prove that $y$ is a function of $x$: $$x_1=x_2 \Rightarrow y_1^3 + y_1 = y_2^3 + y_2 \Rightarrow y_1^3 - y_2^3 + y_1 - y_2 =0…
2
votes
1 answer

One-to-one to prove onto

I stumbled across a problem where I have to prove that a given function is one-to-one and onto. This is part (b) of problem 22 in chapter 7 of Velleman's How to Prove It, 2nd edition. It asks the reader to show that the set of all total orders on a…
brandao
  • 195
2
votes
2 answers

If $f(x)$ is defined on $(0,1)$,then prove that the domain of definition of $f(e^x)+f(\ln|x|)$ is $(-e,-1)$

If $f(x)$ is defined on $(0,1)$,then prove that the domain of definition of $f(e^x)+f(\ln|x|)$ is $(-e,-1)$ As given in the question,$0
diya
  • 3,589
2
votes
4 answers

When a function is implicitly or explicitly?

I am confused with the term "implicit and explicit function". In several texts, I read that a function is explicitly when a variable is set in terms of other that is, when you have something like $y = 3x$ or $z = 3x-2y + 8$, and so on. I solved…
Tomi
  • 793
2
votes
2 answers

Left Inverse and Surjectivness

I just needed to clarify something. I read the following proposition and something didn't make sense: "The map $f$ is injective if and only if $f$ has a left inverse" Now $f$ having a left inverse implies there is a function $g$ whose domain is the…
J.Gudal
  • 1,313
2
votes
3 answers

Calculate $f(3)$ such that $f(f(x))=x^2-5x+9$

How can one calculate $f(3)$ when $f(f(x))=x^2-5x+9$ I tried this: $f(f(3))=3$ I'm stuck here.
user233658
  • 1,254
2
votes
1 answer

When are arbitrary constants defining function families independent?

I'm not sure what the proper terms are here, so I figure it's better to illustrate with examples. If I look at the family of polynomials of a certain degree (e.g cubics), the coefficients in front of each term are independent. So a general cubic…