1.2. Functions

此篇笔记是【实分析笔记】系列的第2篇,记录了如何用“一石一鸟”的比喻来理解函数的严格定义和根据其定义域(Domain)与取值范围(Codomain)的关联方式所区分的三类映射,即满射 (Surjection or onto)单射(Injection or one-to-one)双射(Bijection) ;以及函数的像(Image)和原像(Pre-Image) 的相关性质及其证明。

1. Functions are not just Formulas

A function $f$ as a formula or a rule that enables us to compute the function value $f(x)$ given any specific value for $x$.
函数 $f$ 可以被理解为一种公式规则,它使我们能够根据 $x$ 的具体值计算出函数值

\[f(x)\]

For example, if we have the formula $f(x) = x^2 + 3$,
例如,如果我们有公式

\[f(x) = x^2 + 3\]

Thinking of a function in this way as a formula is helpful in many contexts,
以这种方式将函数理解为一个公式在许多情况下是有帮助的,

In searching for a more general understanding of a function, we need to hold on to the idea of a correspondence between sets,
在寻找对函数更普遍的理解时,我们需要坚持集合之间对应的概念

What is important is that a given element in the first set cannot correspond to two different elements in the second set.
重要的是,第一集合中的某个元素不能对应于第二集合中的两个不同元素

Definition

Let $A$ and $B$ be sets.
设 $A$ 和 $B$ 为集合。

A function from $A$ to $B$ is a nonempty relation $f \subseteq A \times B$ that satisfies the following two conditions:
从 $A$ 到 $B$ 的一个函数是一个非空关系 $f \subseteq A \times B$,满足以下两个条件:

  1. Existence: For all $a$ in $A$, there exists a $b$ in $B$ such that $(a, b) \in f$.
    存在性:对于 $A$ 中的所有 $a$,在 $B$ 中存在一个 $b$,使得 $(a, b) \in f$。

  2. Uniqueness: If $(a, b) \in f$ and $(a, c) \in f$, then $b = c$.
    唯一性:如果 $(a, b) \in f$ 且 $(a, c) \in f$,则 $b = c$。

The Analogy of Stones and Birds

If we think of elements in $A$ as stones and elements in $B$ as birds, a function from $A$ to $B$ can be understood as a rule for throwing stones to hit birds.
如果我们将 $A$ 中的元素类比为石头,将 $B$ 中的元素类比为鸟,那么从 $A$ 到 $B$ 的函数可以理解为一种将石头击中鸟的规则。

  1. Existence: Every stone in $A$ must hit one bird in $B$.
    存在性:$A$ 中的每块石头必须击中 $B$ 中一只鸟。

  2. Uniqueness: No stone in $A$ can hit more than one bird in $B$.
    唯一性:$A$ 中的任何一块石头都不能同时击中 $B$ 中的多只鸟。

Some Terminology

Set $A$ is called the domain of $f$ and is denoted by $\text{dom } f$.
集合 $A$ 被称为 $f$ 的定义域,记为 $\text{dom } f$。

Set $B$ is referred to as the codomain of $f$.
集合 $B$ 被称为 $f$ 的取值空间

The range of $f$, denoted $\text{rng } f$, is the set of all second elements of members of $f$. That is,
$f$ 的值域(实际值域),记为 $\text{rng } f$,是 $f$ 中所有成员的第二个元素的集合。 即:

\[\text{rng } f = \{b \in B : \exists a \in A, \ (a, b) \in f\}.\]

If $(x, y)$ is a member of $f$, we often say that $f$ maps $x$ onto $y$ or that $y$ is the image of $x$ under $f$.
如果 $(x, y)$ 是 $f$ 的成员,我们通常说 $f$ 将 $x$ 映射到 $y$,或者 $y$ 是在 $f$ 下 $x$ 的映像

Functions vs Ordered Pairs

We should note that the notation $f: A \to B$ is slightly more restrictive than the ordered pair definition because it specifies a particular codomain.
需要注意的是,符号 $f: A \to B$ 比有序对定义稍微严格一些,因为它指定了一个特定的取值范围

Example

We want to consider the functions
比如,以下两个函数:
\(f: \mathbb{R} \to \mathbb{R} \quad \text{such that } f(x) = x^2\)
\(g: \mathbb{R} \to [0, \infty) \quad \text{such that } g(x) = x^2\)

to be different functions (with different properties) even though their ordered pairs are identical.
即使它们的有序对相同,我们仍然认为它们是不同的函数(具有不同的性质)

2. Surjective, Injective and Bijective Functions

Definition

A function $f: A \to B$ is called surjective (or is said to map $A$ onto $B$) if $B = \text{rng } f$.
如果 $f: A \to B$ 满足 $B = \text{rng } f$,则称其为满射(或称 $f$ 将 $A$ 映射到 $B$)。

A function $f: A \to B$ is called injective (or one-to-one) if, for all $a$ and $a’$ in $A$, $f(a) = f(a’)$ implies that $a = a’$.
如果对于 $A$ 中的任意 $a$ 和 $a’$,$f(a) = f(a’)$ 蕴涵 $a = a’$,则称 $f: A \to B$ 为单射(或一一对应)。

A function $f: A \to B$ is called bijective or a bijection if it is both surjective and injective.
如果 $f: A \to B$ 既是满射又是单射,则称其为双射双射映射

Example

Consider the function given by the formula:
考虑函数

\[f(x) = x^2\]

3. Image and Pre-Image

When thinking of a function as transforming its domain into its range, we may wish to consider what happens to certain subsets of the domain.
当我们将一个函数看作将其定义域映射到其值域时,我们可能希望考虑定义域中某些子集会发生什么变化

To do this we use the following notation: 为此,我们使用以下符号表示法:

Notation

Suppose that $f: A \to B$.
假设 $f: A \to B$。

Images and pre-images

Note: The symbol $f^{-1}$ is not to be thought of as an inverse function applied to points in the range of $f$.
注意:符号 $f^{-1}$ 不应被认为是应用于 $f$ 值域中点的逆函数

Properties (Theorem)

Suppose that $f: A \to B$.
假设 $f: A \to B$。

(a) \(C \subseteq f^{-1}[f(C)]\)
Proof:

(b) \(f[f^{-1}(D)] \subseteq D\)
Proof:

(c) \(f(C_1 \cap C_2) \subseteq f(C_1) \cap f(C_2)\)
Proof:

(d) \(f(C_1 \cup C_2) = f(C_1) \cup f(C_2)\)
Proof:

(e)

\(f^{-1}(D_1 \cap D_2) = f^{-1}(D_1) \cap f^{-1}(D_2)\)
Proof:

(f) \(f^{-1}(D_1 \cup D_2) = f^{-1}(D_1) \cup f^{-1}(D_2)\)

Proof:

(g)

\(f^{-1}(B \setminus D) = A \setminus f^{-1}(D)\)
Proof:

4. Properties of Functions with Images and Pre-Images

Theorem

Suppose that $f: A \to B$. Let $C, C_1$ and $C_2$ be subsets of $A$, and let $D$ be a subset of $B$. Then the following hold:

(a) If $f$ is injective, then

\[f^{-1}[f(C)] = C\]

Proof:

(b) If $f$ is surjective, then

\[f[f^{-1}(D)] = D\]

Proof:

(c) If $f$ is injective, then

\[f(C_1 \cap C_2) = f(C_1) \cap f(C_2)\]

Proof:

Resources

[1] Steven R. Lay, Analysis with an Introduction to Proof, 5th edition (Pearson, 2012)

[2] Raffi Grinberg, The real analysis lifesaver (Princeton University Press, 2012)