## Real functions --- ## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. $f:X\to Y$ has *domain* $X$, the set of inputs, *codomain* $Y$, the set that all the outputs belong to, *range* (or *image*) $f(X)=\\{y\in Y$ such that $y=f(x)$ for some $x\in X\\}$. Can use a table, a rule, a formula to define a function. | $x$ | \| | $2$ | $4$ | $6$ | $8$ | $10$ | $12$ | |-----|-|----|-----|-----|---|----|----| | $f(x)$ | \| | $13$ | $\pi$ | $\frac12$ | $1$ | $1$ | $3$ | --- ## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. $f:X\to Y$ has *domain* $X$, the set of inputs, *codomain* $Y$, the set that all the outputs belong to, *range* (or *image*) $f(X)=\\{y\in Y$ such that $y=f(x)$ for some $x\in X\\}$. Can use a table, a rule, a formula to define a function. $f(x) = x$ if $x$ is an integer, and $f(x) = t$ such that $t$ is the number of pixels used to render the number $x$ in this font, if $x$ is not an integer. --- ## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. $f:X\to Y$ has *domain* $X$, the set of inputs, *codomain* $Y$, the set that all the outputs belong to, *range* (or *image*) $f(X)=\\{y\in Y$ such that $y=f(x)$ for some $x\in X\\}$. Can use a table, a rule, a formula to define a function. $f(x) = x^2 - \sin(x)$ --- ## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. $f:X\to Y$ has *domain* $X$, the set of inputs, *codomain* $Y$, the set that all the outputs belong to, *range* (or *image*) $f(X)=\\{y\in Y$ such that $y=f(x)$ for some $x\in X\\}$. Can use a table, a rule, a formula to define a function. $f(x) = x^2 - \sin(x)$ Most of our functions will be defined by formulae. --- ## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. $f$ is the function, $f(x)$ means "the function $f$ evaluated at the input $x$" means "the output of $f$ which corresponds to the input $x$". A function always gives the same output for the same input. If $x$ is fixed, then $f(x)$ is fixed. --- ## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. A function always gives the same output for the same input. If $x$ is fixed, then $f(x)$ is fixed. But different inputs could give the same output. #### Example $f:\mathbb R\to\mathbb R$ defined by $f(x) = x^2$ has $f(-x)=f(x)$ for all $x$, so $f$ is not injective. #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. --- ## Functions: injectivity and surjectivity A function is a machine that takes in things and puts out things. Usually, the things are real numbers. A function always gives the same output for the same input. If $x$ is fixed, then $f(x)$ is fixed. #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective. --- ## Functions: injectivity and surjectivity #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective. #### Examples Which of the following are injective, surjective, bijective on domain $\mathbb R$ and codomain $\mathbb R$? $f(x) = x^3, \\;\\; g(x) = x^3-x, \\;\\; h(x) = \frac1{\lvert x \rvert +1}, \\;\\; p(x) = \sin(x)$, $q(x) = 5, \\;\\; r(x) = x+\lceil x \rceil$. (How) can you restrict their domains and codomains to make them bijective? --- ## Functions: injectivity and surjectivity #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective.
#### Examples $f(x) = x^3$. Every horizontal line crosses the curve $\leq1$ time, so $f$ is injective. Every horizontal line crosses the curve $\geq1$ time, so $f$ is surjective. $f$ is both injective and surjective, so bijective.

--- ## Functions: injectivity and surjectivity #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective.
#### Examples $g(x) = x^3-x$. Some horizontal lines cross the curve $>1$ time, so $g$ is not injective. Every horizontal line crosses the curve $\geq1$ time, so $g$ is surjective. $g$ is not injective, so it is not bijective.

--- ## Functions: injectivity and surjectivity #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective.
#### Examples $h:\mathbb R\to\mathbb R$ given by $h(x) = \frac1{\lvert x \rvert +1}$ is neither injective nor surjective. But $h:[0,\infty)\to(0,1]$ would be bijective. $h:(-\infty,0]\to(0,1]$ would be bijective.
")
--- ## Functions: injectivity and surjectivity #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective.
#### Examples $p:\mathbb R\to\mathbb R$ given by $p(x) = \sin(x)$ is neither injective nor surjective. But $p:[\frac{-\pi}2,\frac\pi2]\to[-1,1]$ would be bijective. $p:[\frac{-3\pi}2,\frac{-\pi}2]\to[-1,1]$ would be bijective. $p:[-\pi,0]\to[-1,0]$ would be surjective but not injective.
")
--- ## Functions: injectivity and surjectivity #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective.
#### Examples $q:\mathbb R\to\mathbb R$ given by $q(x) = 5$ is neither injective nor surjective. To make $q$ bijective, we would have to its domain and codomain to single points.
--- ## Functions: injectivity and surjectivity #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective.
#### Examples $r:\mathbb R\to\mathbb R$ given by $r(x) = x+\lceil x\rceil$ is injective but not surjective. But $r:(0,1]\to(1,2]$ would be bijective. $r:(0,2]\to(1,2]\cup(3,4]$ is bijective. $r:(0,2]\to(1,4]$ is injective but not surjective.
")