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 domain of a function

Finding the domain of the function $$f(x)=\frac{3\sqrt{x}}{x^2-5x-14}$$ My working out First I factorise the denominator $$f(x)=\frac{3\sqrt{x}}{(x-7)(x+2)}$$ Therefore the Domain is bigger than 0 and not equal to 7. $(0,7], [7,\infty)$ Is my…
Ben
  • 495
  • 5
  • 12
2
votes
0 answers

Does a function need to map every element of its domain to elements in its co-domain.

I am troubled by the lack of consensus in the stack exchange post . Is it possible to get a definitive clarification. Does a function need to map every element in the domain to an element in the codomain? However if you define a function's domain…
john
  • 860
2
votes
1 answer

Is $f(x) = x^2$ a function of $Z \rightarrow Z^{+}$?

For some function $f: Z \rightarrow Z^{+}$ Is $f(x) = x^2$ a function that maps all integers to all positive integers? According to my textbook, it is, but I am unsure because for $x=0$, $f(0) = 0$ which is not in the target $Z^{+}$. So does that…
mathguy
  • 927
2
votes
2 answers

How to find a function using domain and range in math?

I want to find a function, given domain and range. Example: Domain Range 2 6 4 8 6 20 7 24 This is just an example. I want to know the method of creating functions regardless of the values in Domain and Range Then how can I…
2
votes
1 answer

I want to show that $A=\cup_{n=1}^{\infty} A_n$

Let $A=\{x\in X: \varphi(x)>0\}$ and $A_n=\{x\in X: \varphi(x)\geq1/n\}$ (increasing) I want to show that $A=\cup_{n=1}^{\infty} A_n$
Andrew
  • 21
2
votes
1 answer

Is variable substitution the same as function composition?

Is the process of variable substitution the same as function composition ? And if yes how do you write it in the case of multivariable functions ? For example a typical variable substitution is $$ x=r\cos(\theta), \ y=r\sin(\theta).$$ Given is…
2
votes
3 answers

For $x$ and $k$ real numbers, determine the values of $k$ for which the graphs of $f(x)=x^2-4$ and $g(x)=2|x|+k$ do not intersect

For $x$ and $k$ real numbers, determine the values of $k$ for which the graphs of $f(x)=x^2-4$ and $g(x)=2|x|+k$ do not intersect. For $x$ and $k$ real numbers, determine the values of $k$ for which the graphs of $f(x)=x^2-4$ and $g(x)=2|x|+k$ have…
2
votes
2 answers

Set Theory and surjective function exercise

Let $E$ a set and $f:E\rightarrow P(E)$ any function. If $$A=\{a\in E:a\notin f(a)\}$$ Prove that $A$ has no preimage under $f$.
2
votes
2 answers

A function of two variables question

Consider a function of two variables $h(x,y)$. If it's linear for $y$. Can I express it as $a(x)y + b(x)$ ? If positive, why ?
nerdy
  • 3,288
2
votes
5 answers

Is it legal to say $f(E)=\emptyset$ if set $E$ not in the function $f$ domain

In many inverse functions, I have seen $f^{-1}(E)=\emptyset$, where the set $E$ is not in the function $f$ range. So, is it also right to say $f(E)=\emptyset$ if set $E$ not in the function domain.
dawen
  • 395
2
votes
4 answers

Merging two functions

So I have two fuctions like this :- $f(x) = (x/5)^2$ and $g(x) = \sqrt{(x/5)}$ and a third fuction as a combination of both $ h(x) = \Biggl[ { }^{ x\; \lt \; 5 : \; f(x) }_{ x \;\ge \; 5: \; g(x)}\Biggr] $ When I put $x =5$ in the first function I…
2
votes
1 answer

For which of the following functions $f$ is $f(x)=f(2-x)$ for all $x$?

The options are: $A)$ $f(x) = x(x+2)$ $B)$ $f(x) = x-2$ $C)$ $f(x) = 2-x$ $D)$ $f(x) = 3x(x-2)$ $E)$ $f(x) = x^2(2-x)^2$ The answer given in my worksheet is $E)$ and I got it. My doubt is why it can't be $D)$ also? Solving thus: $f(x) =…
2
votes
2 answers

Find all positive integers x,y satisfying $ \frac{1}{\sqrt{x}} +\frac{1}{\sqrt{y}} =\frac{1}{\sqrt{20}}$

Find all positive integers $x$,$y$ satisfying $ \frac{1}{\sqrt{x}} +\frac{1}{\sqrt{y}} =\frac{1}{\sqrt{20}}$ $$ \frac{1}{\sqrt{x}} +\frac{1}{\sqrt{y}} =\frac{1}{\sqrt{20}}\\ \frac{1}{\sqrt{x}} +\frac{1}{\sqrt{y}} =\frac{1}{2\sqrt{5}}$$ By hit and…
Abhishek Kumar
  • 1,121
  • 9
  • 28
2
votes
2 answers

How do I find the range of a difficult function?

I find it really hard to find the range. I usually substitute the x's with y and then solve for y, but it does not always work for me. Do you have any advice? Function in question: $$f(x) = \frac{e^{-2x}}{x}$$
tyui
  • 71
2
votes
2 answers

Is it possible to model a subcollection as a function?

A subset of X can be viewed as injection $f :S \rightarrow X$, where $S$ is a structure whose only relation is equality. If we allow $f$ to be an arbitrary function, we get the notion of a multiset. If we furthermore assert that $S$ is a…
goblin GONE
  • 67,744