${\displaystyle f}$ is a function from domain ${\displaystyle X}$ to codomain ${\displaystyle Y.}$ The yellow oval inside ${\displaystyle Y}$ is the image of ${\displaystyle f.}$

In mathematics, the image of a function is the set of all output values it may produce.

More generally, evaluating a given function ${\displaystyle f}$ at each element of a given subset ${\displaystyle A}$ of its domain produces a set, called the "image of ${\displaystyle A}$ under (or through) ${\displaystyle f}$". Similarly, the inverse image (or preimage) of a given subset ${\displaystyle B}$ of the codomain of ${\displaystyle f,}$ is the set of all elements of the domain that map to the members of ${\displaystyle B.}$

Image and inverse image may also be defined for general binary relations, not just functions.

## Definition

The word "image" is used in three related ways. In these definitions, ${\displaystyle f:X\to Y}$ is a function from the set ${\displaystyle X}$ to the set ${\displaystyle Y.}$

### Image of an element

If ${\displaystyle x}$ is a member of ${\displaystyle X,}$ then the image of ${\displaystyle x}$ under ${\displaystyle f,}$ denoted ${\displaystyle f(x),}$ is the value of ${\displaystyle f}$ when applied to ${\displaystyle x.}$ ${\displaystyle f(x)}$ is alternatively known as the output of ${\displaystyle f}$ for argument ${\displaystyle x.}$

Given ${\displaystyle y,}$ the function ${\displaystyle f}$ is said to "take the value ${\displaystyle y}$" or "take ${\displaystyle y}$ as a value" if there exists some ${\displaystyle x}$ in the function's domain such that ${\displaystyle f(x)=y.}$ Similarly, given a set ${\displaystyle S,}$ ${\displaystyle f}$ is said to "take a value in ${\displaystyle S}$" if there exists some ${\displaystyle x}$ in the function's domain such that ${\displaystyle f(x)\in S.}$ However, "${\displaystyle f}$ takes [all] values in ${\displaystyle S}$" and "${\displaystyle f}$ is valued in ${\displaystyle S}$" means that ${\displaystyle f(x)\in S}$ for every point ${\displaystyle x}$ in ${\displaystyle f}$'s domain.

### Image of a subset

Throughout, let ${\displaystyle f:X\to Y}$ be a function. The image under ${\displaystyle f}$ of a subset ${\displaystyle A}$ of ${\displaystyle X}$ is the set of all ${\displaystyle f(a)}$ for ${\displaystyle a\in A.}$ It is denoted by ${\displaystyle f[A],}$ or by ${\displaystyle f(A),}$ when there is no risk of confusion. Using set-builder notation, this definition can be written as [1] [2]

${\displaystyle f[A]=\{f(a):a\in A\}.}$

This induces a function ${\displaystyle f[\,\cdot \,]:{\mathcal {P}}(X)\to {\mathcal {P}}(Y),}$ where ${\displaystyle {\mathcal {P}}(S)}$ denotes the power set of a set ${\displaystyle S;}$ that is the set of all subsets of ${\displaystyle S.}$ See § Notation below for more.

### Image of a function

The image of a function is the image of its entire domain, also known as the range of the function. [3] This last usage should be avoided because the word "range" is also commonly used to mean the codomain of ${\displaystyle f.}$

### Generalization to binary relations

If ${\displaystyle R}$ is an arbitrary binary relation on ${\displaystyle X\times Y,}$ then the set ${\displaystyle \{y\in Y:xRy{\text{ for some }}x\in X\}}$ is called the image, or the range, of ${\displaystyle R.}$ Dually, the set ${\displaystyle \{x\in X:xRy{\text{ for some }}y\in Y\}}$ is called the domain of ${\displaystyle R.}$

## Inverse image

Let ${\displaystyle f}$ be a function from ${\displaystyle X}$ to ${\displaystyle Y.}$ The preimage or inverse image of a set ${\displaystyle B\subseteq Y}$ under ${\displaystyle f,}$ denoted by ${\displaystyle f^{-1}[B],}$ is the subset of ${\displaystyle X}$ defined by

${\displaystyle f^{-1}[B]=\{x\in X\,:\,f(x)\in B\}.}$

Other notations include ${\displaystyle f^{-1}(B)}$ and ${\displaystyle f^{-}(B).}$ [4] The inverse image of a singleton set, denoted by ${\displaystyle f^{-1}[\{y\}]}$ or by ${\displaystyle f^{-1}[y],}$ is also called the fiber or fiber over ${\displaystyle y}$ or the level set of ${\displaystyle y.}$ The set of all the fibers over the elements of ${\displaystyle Y}$ is a family of sets indexed by ${\displaystyle Y.}$

For example, for the function ${\displaystyle f(x)=x^{2},}$ the inverse image of ${\displaystyle \{4\}}$ would be ${\displaystyle \{-2,2\}.}$ Again, if there is no risk of confusion, ${\displaystyle f^{-1}[B]}$ can be denoted by ${\displaystyle f^{-1}(B),}$ and ${\displaystyle f^{-1}}$ can also be thought of as a function from the power set of ${\displaystyle Y}$ to the power set of ${\displaystyle X.}$ The notation ${\displaystyle f^{-1}}$ should not be confused with that for inverse function, although it coincides with the usual one for bijections in that the inverse image of ${\displaystyle B}$ under ${\displaystyle f}$ is the image of ${\displaystyle B}$ under ${\displaystyle f^{-1}.}$

## Notation for image and inverse image

The traditional notations used in the previous section do not distinguish the original function ${\displaystyle f:X\to Y}$ from the image-of-sets function ${\displaystyle f:{\mathcal {P}}(X)\to {\mathcal {P}}(Y)}$; likewise they do not distinguish the inverse function (assuming one exists) from the inverse image function (which again relates the powersets). Given the right context, this keeps the notation light and usually does not cause confusion. But if needed, an alternative [5] is to give explicit names for the image and preimage as functions between power sets:

### Arrow notation

• ${\displaystyle f^{\rightarrow }:{\mathcal {P}}(X)\to {\mathcal {P}}(Y)}$ with ${\displaystyle f^{\rightarrow }(A)=\{f(a)\;|\;a\in A\}}$
• ${\displaystyle f^{\leftarrow }:{\mathcal {P}}(Y)\to {\mathcal {P}}(X)}$ with ${\displaystyle f^{\leftarrow }(B)=\{a\in X\;|\;f(a)\in B\}}$

### Star notation

• ${\displaystyle f_{\star }:{\mathcal {P}}(X)\to {\mathcal {P}}(Y)}$ instead of ${\displaystyle f^{\rightarrow }}$
• ${\displaystyle f^{\star }:{\mathcal {P}}(Y)\to {\mathcal {P}}(X)}$ instead of ${\displaystyle f^{\leftarrow }}$

### Other terminology

• An alternative notation for ${\displaystyle f[A]}$ used in mathematical logic and set theory is ${\displaystyle f\,''A.}$ [6] [7]
• Some texts refer to the image of ${\displaystyle f}$ as the range of ${\displaystyle f,}$ [8] but this usage should be avoided because the word "range" is also commonly used to mean the codomain of ${\displaystyle f.}$

## Examples

1. ${\displaystyle f:\{1,2,3\}\to \{a,b,c,d\}}$ defined by ${\displaystyle \left\{{\begin{matrix}1\mapsto a,\\2\mapsto a,\\3\mapsto c.\end{matrix}}\right.}$
The image of the set ${\displaystyle \{2,3\}}$ under ${\displaystyle f}$ is ${\displaystyle f(\{2,3\})=\{a,c\}.}$ The image of the function ${\displaystyle f}$ is ${\displaystyle \{a,c\}.}$ The preimage of ${\displaystyle a}$ is ${\displaystyle f^{-1}(\{a\})=\{1,2\}.}$ The preimage of ${\displaystyle \{a,b\}}$ is also ${\displaystyle f^{-1}(\{a,b\})=\{1,2\}.}$ The preimage of ${\displaystyle \{b,d\}}$ under ${\displaystyle f}$ is the empty set ${\displaystyle \{\ \}=\emptyset .}$
2. ${\displaystyle f:\mathbb {R} \to \mathbb {R} }$ defined by ${\displaystyle f(x)=x^{2}.}$
The image of ${\displaystyle \{-2,3\}}$ under ${\displaystyle f}$ is ${\displaystyle f(\{-2,3\})=\{4,9\},}$ and the image of ${\displaystyle f}$ is ${\displaystyle \mathbb {R} ^{+}}$ (the set of all positive real numbers and zero). The preimage of ${\displaystyle \{4,9\}}$ under ${\displaystyle f}$ is ${\displaystyle f^{-1}(\{4,9\})=\{-3,-2,2,3\}.}$ The preimage of set ${\displaystyle N=\{n\in \mathbb {R} :n<0\}}$ under ${\displaystyle f}$ is the empty set, because the negative numbers do not have square roots in the set of reals.
3. ${\displaystyle f:\mathbb {R} ^{2}\to \mathbb {R} }$ defined by ${\displaystyle f(x,y)=x^{2}+y^{2}.}$
The fibers ${\displaystyle f^{-1}(\{a\})}$ are concentric circles about the origin, the origin itself, and the empty set (respectively), depending on whether ${\displaystyle a>0,\ a=0,{\text{ or }}\ a<0}$ (respectively). (If ${\displaystyle a\geq 0,}$ then the fiber ${\displaystyle f^{-1}(\{a\})}$ is the set of all ${\displaystyle (x,y)\in \mathbb {R} ^{2}}$ satisfying the equation ${\displaystyle x^{2}+y^{2}=a,}$ that is, the origin-centered circle with radius ${\displaystyle {\sqrt {a}}.}$)
4. If ${\displaystyle M}$ is a manifold and ${\displaystyle \pi :TM\to M}$ is the canonical projection from the tangent bundle ${\displaystyle TM}$ to ${\displaystyle M,}$ then the fibers of ${\displaystyle \pi }$ are the tangent spaces ${\displaystyle T_{x}(M){\text{ for }}x\in M.}$ This is also an example of a fiber bundle.
5. A quotient group is a homomorphic image.

## Properties

Counter-examples based on the real numbers ${\displaystyle \mathbb {R} ,}$
${\displaystyle f:\mathbb {R} \to \mathbb {R} }$ defined by ${\displaystyle x\mapsto x^{2},}$
showing that equality generally need
not hold for some laws:
Image showing non-equal sets: ${\displaystyle f\left(A\cap B\right)\subsetneq f(A)\cap f(B).}$ The sets ${\displaystyle A=[-4,2]}$ and ${\displaystyle B=[-2,4]}$ are shown in blue immediately below the ${\displaystyle x}$-axis while their intersection ${\displaystyle A_{3}=[-2,2]}$ is shown in green.
${\displaystyle f\left(f^{-1}\left(B_{3}\right)\right)\subsetneq B_{3}.}$
${\displaystyle f^{-1}\left(f\left(A_{4}\right)\right)\supsetneq A_{4}.}$

### General

For every function ${\displaystyle f:X\to Y}$ and all subsets ${\displaystyle A\subseteq X}$ and ${\displaystyle B\subseteq Y,}$ the following properties hold:

Image Preimage
${\displaystyle f(X)\subseteq Y}$ ${\displaystyle f^{-1}(Y)=X}$
${\displaystyle f\left(f^{-1}(Y)\right)=f(X)}$ ${\displaystyle f^{-1}(f(X))=X}$
${\displaystyle f\left(f^{-1}(B)\right)\subseteq B}$
(equal if ${\displaystyle B\subseteq f(X);}$ for instance, if ${\displaystyle f}$ is surjective) [9] [10]
${\displaystyle f^{-1}(f(A))\supseteq A}$
(equal if ${\displaystyle f}$ is injective) [9] [10]
${\displaystyle f(f^{-1}(B))=B\cap f(X)}$ ${\displaystyle \left(f\vert _{A}\right)^{-1}(B)=A\cap f^{-1}(B)}$
${\displaystyle f\left(f^{-1}(f(A))\right)=f(A)}$ ${\displaystyle f^{-1}\left(f\left(f^{-1}(B)\right)\right)=f^{-1}(B)}$
${\displaystyle f(A)=\varnothing \,{\text{ if and only if }}\,A=\varnothing }$ ${\displaystyle f^{-1}(B)=\varnothing \,{\text{ if and only if }}\,B\subseteq Y\setminus f(X)}$
${\displaystyle f(A)\supseteq B\,{\text{ if and only if }}{\text{ there exists }}C\subseteq A{\text{ such that }}f(C)=B}$ ${\displaystyle f^{-1}(B)\supseteq A\,{\text{ if and only if }}\,f(A)\subseteq B}$
${\displaystyle f(A)\supseteq f(X\setminus A)\,{\text{ if and only if }}\,f(A)=f(X)}$ ${\displaystyle f^{-1}(B)\supseteq f^{-1}(Y\setminus B)\,{\text{ if and only if }}\,f^{-1}(B)=X}$
${\displaystyle f(X\setminus A)\supseteq f(X)\setminus f(A)}$ ${\displaystyle f^{-1}(Y\setminus B)=X\setminus f^{-1}(B)}$ [9]
${\displaystyle f\left(A\cup f^{-1}(B)\right)\subseteq f(A)\cup B}$ [11] ${\displaystyle f^{-1}(f(A)\cup B)\supseteq A\cup f^{-1}(B)}$ [11]
${\displaystyle f\left(A\cap f^{-1}(B)\right)=f(A)\cap B}$ [11] ${\displaystyle f^{-1}(f(A)\cap B)\supseteq A\cap f^{-1}(B)}$ [11]

Also:

• ${\displaystyle f(A)\cap B=\varnothing \,{\text{ if and only if }}\,A\cap f^{-1}(B)=\varnothing }$

### Multiple functions

For functions ${\displaystyle f:X\to Y}$ and ${\displaystyle g:Y\to Z}$ with subsets ${\displaystyle A\subseteq X}$ and ${\displaystyle C\subseteq Z,}$ the following properties hold:

• ${\displaystyle (g\circ f)(A)=g(f(A))}$
• ${\displaystyle (g\circ f)^{-1}(C)=f^{-1}(g^{-1}(C))}$

### Multiple subsets of domain or codomain

For function ${\displaystyle f:X\to Y}$ and subsets ${\displaystyle A,B\subseteq X}$ and ${\displaystyle S,T\subseteq Y,}$ the following properties hold:

Image Preimage
${\displaystyle A\subseteq B\,{\text{ implies }}\,f(A)\subseteq f(B)}$ ${\displaystyle S\subseteq T\,{\text{ implies }}\,f^{-1}(S)\subseteq f^{-1}(T)}$
${\displaystyle f(A\cup B)=f(A)\cup f(B)}$ [11] [12] ${\displaystyle f^{-1}(S\cup T)=f^{-1}(S)\cup f^{-1}(T)}$
${\displaystyle f(A\cap B)\subseteq f(A)\cap f(B)}$ [11] [12]
(equal if ${\displaystyle f}$ is injective [13])
${\displaystyle f^{-1}(S\cap T)=f^{-1}(S)\cap f^{-1}(T)}$
${\displaystyle f(A\setminus B)\supseteq f(A)\setminus f(B)}$ [11]
(equal if ${\displaystyle f}$ is injective [13])
${\displaystyle f^{-1}(S\setminus T)=f^{-1}(S)\setminus f^{-1}(T)}$ [11]
${\displaystyle f\left(A\triangle B\right)\supseteq f(A)\triangle f(B)}$
(equal if ${\displaystyle f}$ is injective)
${\displaystyle f^{-1}\left(S\triangle T\right)=f^{-1}(S)\triangle f^{-1}(T)}$

The results relating images and preimages to the ( Boolean) algebra of intersection and union work for any collection of subsets, not just for pairs of subsets:

• ${\displaystyle f\left(\bigcup _{s\in S}A_{s}\right)=\bigcup _{s\in S}f\left(A_{s}\right)}$
• ${\displaystyle f\left(\bigcap _{s\in S}A_{s}\right)\subseteq \bigcap _{s\in S}f\left(A_{s}\right)}$
• ${\displaystyle f^{-1}\left(\bigcup _{s\in S}B_{s}\right)=\bigcup _{s\in S}f^{-1}\left(B_{s}\right)}$
• ${\displaystyle f^{-1}\left(\bigcap _{s\in S}B_{s}\right)=\bigcap _{s\in S}f^{-1}\left(B_{s}\right)}$

(Here, ${\displaystyle S}$ can be infinite, even uncountably infinite.)

With respect to the algebra of subsets described above, the inverse image function is a lattice homomorphism, while the image function is only a semilattice homomorphism (that is, it does not always preserve intersections).

## Notes

1. ^ "5.4: Onto Functions and Images/Preimages of Sets". Mathematics LibreTexts. 2019-11-05. Retrieved 2020-08-28.
2. ^ Paul R. Halmos (1968). Naive Set Theory. Princeton: Nostrand. Here: Sect.8
3. ^ Weisstein, Eric W. "Image". mathworld.wolfram.com. Retrieved 2020-08-28.
4. ^ Dolecki & Mynard 2016, pp. 4–5.
5. ^ Blyth 2005, p. 5.
6. ^ Jean E. Rubin (1967). . Holden-Day. p. xix. ASIN  B0006BQH7S.
7. ^ M. Randall Holmes: Inhomogeneity of the urelements in the usual models of NFU, December 29, 2005, on: Semantic Scholar, p. 2
8. ^ Hoffman, Kenneth (1971). Linear Algebra (2nd ed.). Prentice-Hall. p. 388.
9. ^ a b c See Halmos 1960, p. 39
10. ^ a b See Munkres 2000, p. 19
11. See p.388 of Lee, John M. (2010). Introduction to Topological Manifolds, 2nd Ed.
12. ^ a b Kelley 1985, p.  85
13. ^ a b See Munkres 2000, p. 21