此条目介绍的是数学中的函数。关于程序设计中的函数,请见“
子程序 ”。
函数 (英语:Function )是数学 描述对应关系的一种特殊集合 ;粗略地说,从集合X 到集合Y 的函数将Y 的一个元素恰好分配给X 的每个元素[2] 。集合X 称为函数的定义域 [3] ,集合Y 称为函数的到达域 。[4]
函数f {\displaystyle f} 就像机器或黑箱 ,给予输入值x {\displaystyle x} 便产生唯一输出值f ( x ) {\displaystyle f(x)} 函数最初是一个变化的量如何依赖另一个量的理想化。例如,特定时间行星的位置可以视为是行星的位置对时间的函数。从历史上看,这个概念是在 17 世纪末用无穷微积分来阐述的,直到 19 世纪,所考虑的函数都是可微的。函数的概念于19世纪末在集合论中被形式化,这大大扩展了这个概念的应用领域。
将形状映射到其颜色的函数
若x {\displaystyle x} 是实数 ,以有序对 ( x , x 2 ) {\displaystyle (x,\,x^{2})} 为元素所构成的集合就是一个函数。直观上代表"输入" x {\displaystyle x} 就可以得到唯一值 x 2 {\displaystyle x^{2}} 的对应关系。
一般会以英文字母 f , g , h {\displaystyle f,\,g,\,h} 表示函数,并把 x {\displaystyle x} 依据函数 f {\displaystyle f} 的对应规则所得到的值写作f ( x ) {\displaystyle f(x)} ,并读作"f of x" 。函数的概念不限于数之间的对应关系,例定义函数 Capital {\displaystyle \operatorname {Capital} } 为世界上所有国家跟它现在的首都的对应关系,那输入英国 就会输出唯一值伦敦 :Capital ( U . K . ) = L o n d o n {\displaystyle \operatorname {Capital} (\mathrm {U.K.} )=\mathrm {London} } 。
直观上的“多变量函数”其实也可以概括到一般函数的定义里。例如算式 x × y {\displaystyle x\times y} 有两个实数参数 x {\displaystyle x} 和 y {\displaystyle y} 。可以将这两个参数看作一个实数有序对 ( x , y ) {\displaystyle (x,y)} ,然后定义一个以 ( ( x , y ) , x × y ) {\displaystyle ((x,\,y),\,x\times y)} 为元素所构成的函数 f {\displaystyle f} ,然后把 f [ ( x , y ) ] = x × y {\displaystyle f[(x,\,y)]=x\times y} 简记成符合直观的 f ( x , y ) = x × y {\displaystyle f(x,\,y)=x\times y} 。
数学中,对应 、映射 、变换 通常都是函数的别称,但也可能有别的意思,如在拓扑学 的映射有时代表的是连续函数 。
在类型论 的λ演算 中,“对应关系”可以是作为一个原始概念(也就是无定义名词),而不像上述的定义把函数视为集合 的衍伸物。
函数的值域 或像 是定义域 中所有元素的像 之集合。[5] [6] [7] [8]
函数这个数学名词是莱布尼兹 在1694年开始使用的,用来描述跟曲线 相关的一个量,如曲线的斜率 或者曲线上的某一点。莱布尼兹所指的函数现在被称作可导函数 ,数学家之外的普通人一般接触到的函数即属此类。对于可导函数可以讨论它的极限 和导数 ,此两者描述了函数输出值的变化同输入值变化的关系,是微积分学 的基础。中文的“函数 ”一词由清朝 数学家李善兰 译出。其《代数学》书中解释:“凡此变量中函(包含)彼变量者,则此为彼之函数”。
1718年,约翰·伯努利 把函数定义为“一个变量的函数是指由这个变量和常量以任何一种方式组成的一种量。”
1748年,伯努利的学生欧拉 在《无穷分析引论》一书中说:“一个变量 的函数是由该变量和一些数或常量 以任何一种方式构成的解析表达式 ”,例如f ( x ) = sin ( x ) + x 2 {\displaystyle f(x)=\sin(x)+x^{2}} 。
1775年,欧拉在《微分学原理》一书中又提出了函数的一个定义:“如果某些量以如下方式依赖于另一些量,即当后者变化时,前者本身也发生变化,则称前一些量是后一些量的函数。”
19世纪的数学家开始对数学的各个分支进行形式化。维尔斯特拉斯 倡议将微积分学建立在算术 ,而不是几何 的基础上,这种主张较趋向于欧拉的定义。
函数的定义得以扩展之后,数学家便能对一些“奇怪”的数学对象 进行研究,例如处处不可导的连续函数。这些函数曾经被认为只具有理论价值,迟至20世纪初时它们仍被视作“怪物”。稍后,人们发现这些函数在对如布朗运动 之类的物理现象进行建模时有重要的作用。
到19世纪末,数学家开始尝试利用集合论 来进行数学的形式化。他们试图将每一个数学对象都定义为集合 。狄利克雷 给出了现代正式的函数定义(参见下文#正式定义 )。在他的定义下,函数被视作数学关系 的特例。然而对于实际应用的情况,现代定义和欧拉定义的区别可以忽略不计。 正式定义
编辑
函数f 的部分图像。每个实数的x 都与f (x ) = x 3 − 9x 相联系
定义 — 二元关系 f {\displaystyle f} 若满足:
( ∀ x ) ( ∀ y ) ( ∀ y ′ ) { [ ( ⟨ x , y ⟩ ∈ f ) ∧ ( ⟨ x , y ′ ⟩ ∈ f ) ] ⇒ ( y = y ′ ) } {\displaystyle (\forall x)(\forall y)(\forall y^{\prime })\{\,[\,(\langle x,\,y\rangle \in f)\wedge (\langle x,\,y^{\prime }\rangle \in f)\,]\Rightarrow (y=y^{\prime })\,\}} 则称为 f {\displaystyle f} 为一函数。
(为了避免 ( x , y ) {\displaystyle (x,\,y)} 的括弧与逻辑 叙述的括弧混淆,也会用 ⟨ x , y ⟩ {\displaystyle \langle x,\,y\rangle } 来表示有序对 )
也就是直观上,有序对 ( x , y ) {\displaystyle (x,\,y)} 代表 (输入值 , 输出值 );而 f {\displaystyle f} 本身是以穷举所有 (输入值 , 输出值 ) 来详尽定义的对应规则,且每个输入值只能对应一个输出值 。
函数值的简记
编辑
习惯上把 ( x , y ) ∈ f {\displaystyle (x,\,y)\in f} “等价地”记为 y = f ( x ) {\displaystyle y=f(x)} 。但严谨来说, f ( x ) {\displaystyle f(x)} 是在一阶逻辑 公理化集合论 下额外新增的双元函数符号 ( 因为 x {\displaystyle x} 与 f {\displaystyle f} 各为一个变量) ,而它的“定义”就是以下连带额外增加的公理:
公理 —
[ ¬ ( B ∧ C ) ∧ ( f ( x ) = ∅ ) ] ∨ [ ( B ∧ C ) ∧ ( ⟨ x , f ( x ) ⟩ ∈ f ) ] {\displaystyle [\,\neg ({\mathcal {B}}\wedge {\mathcal {C}})\wedge (f(x)=\varnothing )\,]\vee [\,({\mathcal {B}}\wedge {\mathcal {C}})\wedge (\langle x,\,f(x)\rangle \in f)\,]}
其中:
B := ( ∀ x ) ( ∀ y ) ( ∀ y ′ ) { [ ( ⟨ x , y ⟩ ∈ f ) ∧ ( ⟨ x , y ′ ⟩ ∈ f ) ] ⇒ ( y = y ′ ) } {\displaystyle {\mathcal {B}}:=(\forall x)(\forall y)(\forall y^{\prime })\{\,[\,(\langle x,\,y\rangle \in f)\wedge (\langle x,\,y^{\prime }\rangle \in f)\,]\Rightarrow (y=y^{\prime })\,\}} (f {\displaystyle f} 的每个输入值只能对应一个输出值)
C := ( ∃ y ) ( ⟨ x , y ⟩ ∈ f ) {\displaystyle {\mathcal {C}}:=(\exists y)(\langle x,\,y\rangle \in f)} (x {\displaystyle x} 在 f {\displaystyle f} 规定的输入值范围内)
新增公理的合理性
假设有 B ∧ C {\displaystyle {\mathcal {B}}\wedge {\mathcal {C}}} ,此时对公式 B {\displaystyle {\mathcal {B}}} 套用量词公理A4 有:
( ∀ y ) ( ∀ y ′ ) { [ ( ⟨ x , y ⟩ ∈ f ) ∧ ( ⟨ x , y ′ ⟩ ∈ f ) ] ⇒ ( y = y ′ ) } {\displaystyle (\forall y)(\forall y^{\prime })\{\,[\,(\langle x,\,y\rangle \in f)\wedge (\langle x,\,y^{\prime }\rangle \in f)\,]\Rightarrow (y=y^{\prime })\,\}} 这样综合上式和 C {\displaystyle {\mathcal {C}}} 就有:
( ∃ ! y ) ( ⟨ x , y ⟩ ∈ f ) {\displaystyle (\exists !y)(\langle x,\,y\rangle \in f)} 换句话说:
B ∧ C ⊢ ( ∃ ! y ) ( ⟨ x , y ⟩ ∈ f ) {\displaystyle {\mathcal {B}}\wedge {\mathcal {C}}\vdash (\exists !y)(\langle x,\,y\rangle \in f)} 这样根据特定条件下的存在性 就有:
⊢ ( ∃ ! y ) { [ ¬ ( B ∧ C ) ∧ ( y = ∅ ) ] ∨ [ ( B ∧ C ) ∧ ( ⟨ x , y ⟩ ∈ f ) ] } {\displaystyle \vdash (\exists !y)\{\,[\,\neg ({\mathcal {B}}\wedge {\mathcal {C}})\wedge (y=\varnothing )\,]\vee [\,({\mathcal {B}}\wedge {\mathcal {C}})\wedge (\langle x,\,y\rangle \in f)\,]\,\}} 这样根据函数符号与唯一性 的内容,就可以于策梅洛-弗兰克尔集合论 增加上述的公理与双元函数符号 f ( x ) {\displaystyle f(x)} ,且新增这个公理的新理论等效于原来的理论。
直观上,这个公理表示“若 f {\displaystyle f} 为一函数且 x {\displaystyle x} 在 f {\displaystyle f} 的输入值范围,则 ⟨ x , f ( x ) ⟩ ∈ f {\displaystyle \langle x,\,f(x)\rangle \in f} ;否则规定 f ( x ) {\displaystyle f(x)} 为空集 ”。
这样根据函数符号与唯一性的定理(E) ,就会有本节一开始所说的直观性质:
B ∧ C ⊢ ( ∀ y ) { [ y = f ( x ) ] ⇔ [ ⟨ x , y ⟩ ∈ f ] } {\displaystyle {\mathcal {B}}\land {\mathcal {C}}\vdash (\forall y)\{\,[\,y=f(x)\,]\Leftrightarrow [\,\langle x,\,y\rangle \in f\,]\,\}} 也就是“若 f {\displaystyle f} 为一函数且 x {\displaystyle x} 在 f {\displaystyle f} 的输入值范围,则对所有的 y {\displaystyle y} , ⟨ x , y ⟩ ∈ f {\displaystyle \langle x,\,y\rangle \in f} 等价于 y = f ( x ) {\displaystyle y=f(x)} ”。
对于“n变量”的函数,也就是以
( ( x 1 , ⋯ , x n ) , y ) {\displaystyle ((x_{1},\,\cdots ,\,x_{n}),\,y)} 为元素的函数 f {\displaystyle {\mathcal {f}}} ,习惯上会把以下的项
f [ ( x 1 , ⋯ , x n ) ] {\displaystyle f[(x_{1},\cdots ,\,x_{n})]} 进一步简写为
f ( x 1 , ⋯ , x n ) {\displaystyle f(x_{1},\cdots ,\,x_{n})} 定义域与值域
编辑
如果能指出函数 f {\displaystyle f} 的 "输入值范围" 跟 "输出值范围" ,对数学的讨论是相当方便的;事实上公理化集合论 中,分类公理 确保对任意集合 A {\displaystyle A} 有唯一的集合 D A {\displaystyle D_{A}} 和 I A {\displaystyle I_{A}} (严格来说,单元函数符号 )分别满足
( ∀ x ) { ( x ∈ D A ) ⇔ ( ∃ y ) [ ( x , y ) ∈ A ] } {\displaystyle (\forall x)\{(x\in D_{A})\Leftrightarrow (\exists y)[\,(x,\,y)\in A\,]\}} (“输入值范围”)
( ∀ y ) { ( y ∈ I A ) ⇔ ( ∃ x ) [ ( x , y ) ∈ A ] } {\displaystyle (\forall y)\{(y\in I_{A})\Leftrightarrow (\exists x)[\,(x,\,y)\in A\,]\}} (“输出值范围”)直观上, D A {\displaystyle D_{A}} 是搜集所有 A {\displaystyle A} 里所有有序对 的第一个所构成的集合; I A {\displaystyle I_{A}} 是搜集所有 A {\displaystyle A} 里所有有序对 的第二个所构成的集合。这样的话,如果 A {\displaystyle A} 本身就是函数的话, D A {\displaystyle D_{A}} 就是所谓的“输入值范围”,所以被称为定义域 ;类似地, I A {\displaystyle I_{A}} 就是所谓的 “输出值范围”,所以被称为值域 。
通常情况下,有以下惯用的记号
f : X → Y := [ ( f is a function ) ∧ ( D f = X ) ∧ ( I f ⊆ Y ) ] {\displaystyle f:X\to Y:=[\,(f{\text{ is a function}})\wedge (D_{f}=X)\wedge (I_{f}\subseteq Y)\,]} 也就是直观上,f : X → Y {\displaystyle f:X\to Y} 表示“ f {\displaystyle f} 是函数且其定义域 为 X {\displaystyle X} ,且值域 包含于 Y {\displaystyle Y} 。”。这种情况下, Y {\displaystyle Y} 通常被俗称为到达域 。
属于定义域 D f {\displaystyle D_{f}} 的元素 x {\displaystyle x} 常被俗称为自变量 (independent variable),而项 f ( x ) {\displaystyle f(x)} 则被俗称为因变量( dependent variable),但是这跟实验上的自变量和因变量 是稍有不同的,因为前者是现实得到的实验值之间的关联,但另一个是源于集合论的概念。
定义 —
函数 f {\displaystyle f} 若满足
( ∀ y ) ( ∀ x ) ( ∀ x ′ ) { [ ( ⟨ x , y ⟩ ∈ f ) ∧ ( ⟨ x ′ , y ⟩ ∈ f ) ] ⇒ ( x = x ′ ) } {\displaystyle (\forall y)(\forall x)(\forall x^{\prime })\{\,[\,(\langle x,\,y\rangle \in f)\wedge (\langle x^{\prime },\,y\rangle \in f)\,]\Rightarrow (x=x^{\prime })\,\}}
则被称为一对一的 (one-to-one)或是单射 (injective function)。
直观上,若函数 f {\displaystyle f} 的输出值都只能被唯一个输入值对应,则称 f {\displaystyle f} 是一对一的。
若 f {\displaystyle f} 是单射,那(根据分类公理 所取的)以下的集合:
f − 1 := { p | ( ∃ x ) ( ∃ y ) [ p = ( y , x ) ∧ y = f ( x ) ] } {\displaystyle f^{-1}:=\{\,p\,|\,(\exists x)(\exists y)[\,p=(y,\,x)\,\wedge \,y=f(x)\,]\,\}} 也是一个函数,被称为 f {\displaystyle f} 的反函数 。
f : X → Y {\displaystyle f:X\to Y} 这个简记只能指出“输出值不会超出 Y {\displaystyle Y} ”,为了弥补这个简记的缺陷,口语上会将满射 (surjective function)定义为“ f : X → Y {\displaystyle f:X\to Y} 且值域 就是 Y {\displaystyle Y} ” 的函数。
(1)一对多。X 中的元素3与Y 中的两个元素b 和c 相关。因此这是多值函数 ,而不是函数。
(2)一对一但非完全对应。X 的元素1未与Y 的任一元素相关。因此这是偏函数 ,而不是 函数。
(3)完全对应且多对一,因此这是从
X 到
Y 的函数。此函数可以表示为
f = { ( 1 , d ) , ( 2 , d ) , ( 3 , c ) } {\displaystyle f=\{\,(1,d),(2,d),(3,c)\}} ,或
f ( x ) = { d , if x = 1 d , if x = 2 c , if x = 3 {\displaystyle f(x)=\left\{{\begin{matrix}d,&{\mbox{if }}x=1\\d,&{\mbox{if }}x=2\\c,&{\mbox{if }}x=3\end{matrix}}\right.}
函数的简记
编辑
除了正式定义 一节所规范的集合论表示法,一般的数学书籍会采用比较通俗的函数表记方法,下面将一一介绍。
函数记号
编辑
一般的函数都是取实数 为输出值和输入值,也就是严格地说,一般的函数都是 f : A → R {\displaystyle f:A\to \mathbb {R} } (A ⊆ R {\displaystyle A\subseteq \mathbb {R} } )。而实数四则运算的结果通常都是唯一的,比如说,对于任意实数 a , b ∈ R {\displaystyle a,\,b\in \mathbb {R} } ,都有唯一的 c ∈ R {\displaystyle c\in \mathbb {R} } 使得 c = a + b {\displaystyle c=a+b} 。但考虑到实数加法 可由皮亚诺公理 里的单元函数符号 S ( x ) {\displaystyle S(x)} (直观上代表“x {\displaystyle x} 的下一个”,或说“x + 1 {\displaystyle x+1} ”)所延伸出来的,或是本身就是实数公理系统 里的双元函数符号 P ( x , y ) {\displaystyle P(x,\,y)} (通常简记为 x + y {\displaystyle x+y} ),不管如何,它们都是一阶逻辑 下的项 ;类似地,乘法本身也来自于函数符号 ,所以一般所谓的运算式其实是函数符号 的组合,换句话说,就是项 。所以直观上定义实数 函数的时候,都希望一条项(直观上的运算式)能唯一决定一个函数,比如说,对于项 :
x + 1 {\displaystyle x+1} 以下的集合:
h := { p | ( ∃ x ∈ R ) [ p = ( x , x + 1 ) ] } {\displaystyle h:={\bigg \{}p\,{\bigg |}\,(\exists x\in \mathbb {R} )[p=(x,\,x+1)]{\bigg \}}} 是一个函数。为了让这个符号表示更加简洁,就衍伸出以下的表记方式:
这个表记方式被称为函数记号 (functional notation),直观上表示“若所有 X {\displaystyle X} 的元素 x {\displaystyle x} 输入运算式 T x {\displaystyle T_{x}} 里,都可以得到唯一的输出值,那可以定义一个 f ( x ) = T x {\displaystyle f(x)=T_{x}} 的函数”。
像是取 T x {\displaystyle T_{x}} 为 x + 1 {\displaystyle x+1} 的话,因为实数加法的性质而有:
( ∀ x ∈ R ) ( ∃ ! y ) ( y = x + 1 ) {\displaystyle (\forall x\in \mathbb {R} )(\exists !y)(y=x+1)} 这样就可以把前面的函数 h {\displaystyle h} 简记为:
h ( x ) = x + 1 ( x ∈ R ) {\displaystyle h(x)=x+1\;(x\in \mathbb {R} )} 如果 X {\displaystyle X} 可以从上下文推断出来,函数记号可以更不正式的写为:
f ( x ) = T x {\displaystyle f(x)=T_{x}} 比如说函数 h {\displaystyle h} 就可以进一步简记为:
h ( x ) = x + 1 {\displaystyle h(x)=x+1} 这个记号是1734年第一次被莱昂哈德·欧拉 所采用[9] 。 但当时并没有清楚地区分函数、项 与幂级数 ,因为当时并没有一阶逻辑 这种清楚研究语言推理的系统;也并不知道有些物理学 上的实用对应关系不能用幂级数 展开[10] 。
箭号表示
编辑
以上的函数记号也可以稍作修改,来明确的指出“输出值”的范围:
这个表记方式被称为箭号表示 (arrow notation),直观上表示“若所有 X {\displaystyle X} 的元素 x {\displaystyle x} 输入运算式 T x {\displaystyle T_{x}} 里,都可以得到 Y {\displaystyle Y} 里的某个唯一的输出值,那可以定义一个从X {\displaystyle X} 到 Y {\displaystyle Y} ,对应规则为 x ↦ T x {\displaystyle x\mapsto T_{x}} 的函数 f {\displaystyle f} ”
比如说,取 T x {\displaystyle T_{x}} 为 x + 1 {\displaystyle x+1} 的话,因为实数加法的性质而有:
( ∀ x ∈ R ) ( ∃ ! y ) [ ( y ∈ R ) ∧ ( y = x + 1 ) ] {\displaystyle (\forall x\in \mathbb {R} )(\exists !y)[(y\in \mathbb {R} )\wedge (y=x+1)]} 这样就可以把以下的函数 h {\displaystyle h} :
h = { p | ( ∃ x ∈ R ) [ ( p = ⟨ x , x + 1 ⟩ ) ] } {\displaystyle h={\bigg \{}p\,{\bigg |}\,(\exists x\in \mathbb {R} )[(p=\langle x,\,x+1\rangle )]{\bigg \}}} (因为 x ∈ R {\displaystyle x\in \mathbb {R} } 可以自动推出 x + 1 ∈ R {\displaystyle x+1\in \mathbb {R} } )表示成:
h : R → R ; x ↦ x + 1 {\displaystyle h:\mathbb {R} \to \mathbb {R} ;\;x\mapsto x+1} 箭号表示常用来“固定”某个变量,来得到新的函数;假设 T x t {\displaystyle T_{xt}} 是含有变量 x {\displaystyle x} 和 t {\displaystyle t} 的项 ,如果:
f : X × T → Y ; ( x , t ) ↦ T x t {\displaystyle f:X\times T\to Y;\;(x,t)\mapsto T_{xt}}
τ ∈ T {\displaystyle \tau \in T} 那根据:
( ∀ x ) ( ∀ y ) ( ∀ x ′ ) ( ∀ y ′ ) { ( ⟨ x , y ⟩ = ⟨ x ′ , y ′ ⟩ ) ⇔ [ ( x = x ) ∧ ( y ′ = y ′ ) ] } {\displaystyle (\forall x)(\forall y)(\forall x^{\prime })(\forall y^{\prime })\{(\langle x,y\rangle =\langle x^{\prime },y^{\prime }\rangle )\Leftrightarrow [(x=x)\wedge (y^{\prime }=y^{\prime })]\}} 若假设 T x τ {\displaystyle T_{x\tau }} 是将 T x t {\displaystyle T_{xt}} 里的 t {\displaystyle t} 都代换成 τ {\displaystyle \tau } 所形成的新项 ,那以下的符号简写也是可行的:
f τ : X → Y ; x ↦ T x τ {\displaystyle f_{\tau }:X\to Y;\;x\mapsto T_{x\tau }} 直观上来说, f τ {\displaystyle f_{\tau }} 是把 f {\displaystyle f} 第二个变量 t {\displaystyle t} “固定”成特定的 τ {\displaystyle \tau } 所得到的新函数,英文上也可称为partial applied function 。
间隔号表示
编辑
可以把箭号表示里的 x {\displaystyle x} 都取代成间隔号 ,变成更通俗直观的间隔号表示 ,比如说:
f : R → R ; x ↦ x 2 {\displaystyle f:\mathbb {R} \to \mathbb {R} ;\;x\mapsto x^{2}} 可以记为:
( ⋅ ) 2 {\displaystyle {(\cdot )}^{2}} 或是对于 [ a , b ] {\displaystyle [a,\,b]} 可积 的f : [ a , b ] → R {\displaystyle f:[a,\,b]\to \mathbb {R} } ,作如下定义的话:
g : [ a , b ] → R ; x ↦ ∫ a x f ( u ) d u {\displaystyle g:[a,\,b]\to \mathbb {R} ;\;x\mapsto \int _{a}^{x}f(u)\,du} 函数 g {\displaystyle g} 的定义亦可不正式的记为:
∫ a ( ⋅ ) f ( u ) d u {\displaystyle \int _{a}^{(\cdot )}f(u)\,du} 但这个表记方法的明显缺点是无法指出定义域,因为函数于哪个区间 可积 会决定以上的函数 g {\displaystyle g} 的定义可不可行。
函数图形
编辑
如果函数 f {\displaystyle f} 的值域跟定义域都是实数集合(俗称 f {\displaystyle f} 为实函数 ),可以x轴代表定义域的范围;y轴代表值域的范围,把函数的每个元素标示在平面直角坐标 上,这被称为实函数 f {\displaystyle f} 在平面上的函数图形 。
对于"双变量"的实函数 g {\displaystyle g} ,也就是以 (x , y , z ∈ R {\displaystyle x,\,y,\,z\in \mathbb {R} } )
( ( x , y ) , z ) {\displaystyle ((x,\,y),\,z)} 为元素的函数,可以取
D x = { x | ( ∃ y ) ( ∃ z ) [ g ( x , y ) = z ] } {\displaystyle D_{x}=\{\,x\,|\,(\exists y)(\exists z)[\,g(x,\,y)=z\,]\,\}} D y = { x | ( ∃ x ) ( ∃ z ) [ g ( x , y ) = z ] } {\displaystyle D_{y}=\{\,x\,|\,(\exists x)(\exists z)[\,g(x,\,y)=z\,]\,\}} 然后以 x 轴为 D x {\displaystyle D_{x}} 变化范围;y 轴为 D y {\displaystyle D_{y}} 变化范围;最后取z 轴为 g {\displaystyle g} 的值域变化范围,这样就可以在三维直角坐标 绘出 g {\displaystyle g} 的函数图形 。
实函数的判别
编辑
平面上的任意图形可用竖直判别法 判断是否为实函数 的图形,即图形与任何一条平行于 y 轴的直线不能有一个以上的交点。但实际上这仅仅是函数正式定义的一种应用,因为平行于 y 轴的直线代表的是形如
{ p ∈ R 2 | ( ∃ y ∈ R ) [ p = ( c , y ) ] } {\displaystyle \{\,p\in {\mathbb {R} }^{2}\,|\,(\exists y\in \mathbb {R} )[\,p=(c,\,y)\,]\,\}} 的集合,也就是此直线交 x 轴于 ( c , 0 ) {\displaystyle (c,\,0)} ,那这样直线与实函数 f {\displaystyle f} 的交集就是
{ p ∈ R 2 | ( ∃ y ∈ R ) [ p = ( c , y ) ∧ y = f ( c ) ] } {\displaystyle \{\,p\in {\mathbb {R} }^{2}\,|\,(\exists y\in \mathbb {R} )[\,p=(c,\,y)\wedge y=f(c)\,]\,\}} 而属于这个交集里的平面点最多只能有一个 ,否则就会跟每个 x ∈ D f {\displaystyle x\in D_{f}} 只能对应一个 f ( x ) {\displaystyle f(x)} 的基本定义矛盾。
像和原像
编辑
像 可以指两种不同的概念
第一种是形如 f ( x ) {\displaystyle f(x)} 的项 ,直观上代表的是依照函数 f {\displaystyle f} 的对应规则,使 x {\displaystyle x} 能对应到的那个"值"。(严谨的意义请回去参考函数值的简记 )
第二种指的是集合 A {\displaystyle A} 在函数 f {\displaystyle f} 下定义的集合 f ( A ) {\displaystyle f(A)}
f ( A ) := { y | ( ∃ x ∈ A ) [ y = f ( x ) ] } {\displaystyle f(A):=\{\,y\,|\,(\exists x\in A)[\,y=f(x)\,]\,\}} 注意 f {\displaystyle f} 的值域就是定义域 D f {\displaystyle D_{f}} 的像 f ( D f ) {\displaystyle f(D_{f})} 。在正式定义 一节的最后例子中, { 2 , 3 } {\displaystyle \{2,3\}} 在 f {\displaystyle f} 的像是 f ( { 2 , 3 } ) = { c , d } {\displaystyle f(\{2,3\})=\{c,d\}} ,而 f {\displaystyle f} 的值域是 { c , d } {\displaystyle \{c,d\}} 。
类似的,集合 B {\displaystyle B} 在函数 f {\displaystyle f} 下的原像 (或逆像 )定义为:
f − 1 ( B ) := { x | ( ∃ y ) [ y = f ( x ) ∧ y ∈ B ] } {\displaystyle f^{-1}(B):=\{\,x\,|\,(\exists y)[\,y=f(x)\wedge y\in B\,]\,\}} 沿用同一例子,可以看到 { a , b } {\displaystyle \{a,b\}} 的原像是 f − 1 ( { a , b } ) = ∅ {\displaystyle f^{-1}(\{a,b\})=\varnothing } ,即空集 。
以下是f {\displaystyle f} 及f − 1 {\displaystyle f^{-1}} 的一些特性:
f ( A 1 ∪ A 2 ) = f ( A 1 ) ∪ f ( A 2 ) {\displaystyle f(A_{1}\cup A_{2})=f(A_{1})\cup f(A_{2})} ;
f ( A 1 ∩ A 2 ) ⊆ f ( A 1 ) ∩ f ( A 2 ) {\displaystyle f(A_{1}\cap A_{2})\subseteq f(A_{1})\cap f(A_{2})} ;
f ( B 1 ∪ B 2 ) = f − 1 ( B 1 ) ∪ f − 1 ( B 2 ) {\displaystyle f(B_{1}\cup B_{2})=f^{-1}(B_{1})\cup f^{-1}(B_{2})} ;
f − 1 ( B 1 ∩ B 2 ) = f − 1 ( B 1 ) ∩ f − 1 ( B 2 ) {\displaystyle f^{-1}(B_{1}\cap B_{2})=f^{-1}(B_{1})\cap f^{-1}(B_{2})} ;
f − 1 ( f ( B ) ) ⊆ B {\displaystyle f^{-1}(f(B))\subseteq B} ;
f − 1 ( f ( A ) ) ⊇ A {\displaystyle f^{-1}(f(A))\supseteq A} 。这些特性适合定义域的任意子集A , A 1 {\displaystyle A,A_{1}} 及A 2 {\displaystyle A_{2}} 和到达域的任意子集 B , B 1 {\displaystyle B,B_{1}} 及B 2 {\displaystyle B_{2}} ,甚至可推广到任意子集群的交集 和并集 。
函数的限制及扩张
编辑
点态运算
编辑
设 f : X → R {\displaystyle f:X\to R} 且 g : X → R {\displaystyle g:X\to R} 且 ( R , + , × ) {\displaystyle (R,\,+,\,\times )} 为环 。这样可以定义"函数和" f + g {\displaystyle f+g} 与"函数积" f × g {\displaystyle f\times g} 如下:
f + g := { ( x , y ) | ( x ∈ X ) ∧ [ y = f ( x ) + g ( x ) ] } {\displaystyle {\begin{aligned}f+g:={\bigg \{}\,(x,\,y)\,{\bigg |}\,(x\in X)\wedge [\,y=f(x)+g(x)\,]\,{\bigg \}}\\\end{aligned}}}
f + g := { ( x , y ) | ( x ∈ X ) ∧ [ y = f ( x ) × g ( x ) ] } {\displaystyle {\begin{aligned}f+g:={\bigg \{}\,(x,\,y)\,{\bigg |}\,(x\in X)\wedge [\,y=f(x)\times g(x)\,]\,{\bigg \}}\\\end{aligned}}} 很容易证明以上两者也是函数,类似的对任意的 r ∈ R {\displaystyle r\in R} 可以定义下面这两个集合
r R := { ( x , y ) | ( x ∈ X ) ∧ ( y = r ) } {\displaystyle {\begin{aligned}r_{R}:={\bigg \{}\,(x,\,y)\,{\bigg |}\,(x\in X)\wedge (y=r)\,{\bigg \}}\\\end{aligned}}}
r ⋅ f := { ( x , y ) | ( x ∈ X ) ∧ [ y = r × f ( x ) ] } {\displaystyle {\begin{aligned}r\cdot f:={\bigg \{}\,(x,\,y)\,{\bigg |}\,(x\in X)\wedge [\,y=r\times f(x)\,]\,{\bigg \}}\\\end{aligned}}} 也是函数,其中 r R {\displaystyle r_{R}} 被称为常数函数 。
函数范例
编辑
函数的分类
编辑
范畴论观点下的函数
编辑
在范畴论 中,函数的槪念被推广为态射 的槪念。
一个范畴 包括一组对象与一组态射,每一个态射是个三元组(X , Y , f ),X 称为源对象(定义域的类比),Y 称为目标对象(到达域的类比),而源对象与目标对象是范畴内的对象。基于这种解释,可以把函数看作集合范畴 里面的态射。
参考文献
编辑
^ 1.0 1.1 Halmos, Paul R. Naive Set Theory . Springer-Verlag. 1970. ISBN 978-0-387-90092-6 .
^ Halmos 1970 ,第30页[1] ; the words map , mapping , transformation , correspondence , and operator are often used synonymously.
^ Halmos 1970 [1]
^ Hazewinkel, Michiel (编), Mapping , 数学百科全书 , Springer , 2001, ISBN 978-1-55608-010-4
^ Hazewinkel, Michiel (编), Function , 数学百科全书 , Springer , 2001, ISBN 978-1-55608-010-4
^ Taalman, Laura; Kohn, Peter. Calculus . New York City : W. H. Freeman and Company . 2014. ISBN 978-1-4292-4186-1 . LCCN 2012947365 . OCLC 856545590 . OL 27544563M (英语) .
^ Trench, William F. Introduction to Real Analysis 2.04th. Pearson Education (originally; self-republished by the author). 2013 [2023-12-08 ] . ISBN 0-13-045786-8 . LCCN 2002032369 . OCLC 953799815 . Zbl 1204.00023 . (原始内容存档 于2023-11-23) (英语) .
^ Thomson, Brian S.; Bruckner, Judith B.; Bruckner, Andrew M. Elementary Real Analysis (PDF) 2nd. Prentice Hall (originally; 2nd ed. self-republished by the authors). 2008 [2023-12-08 ] . ISBN 978-1-4348-4367-8 . OCLC 1105855173 . OL 31844948M . Zbl 0872.26001 . (原始内容存档 (PDF) 于2023-05-26) (英语) .
^ Larson, Ron; Edwards, Bruce H. Calculus of a Single Variable. Cengage Learning. 2010: 19. ISBN 978-0-538-73552-0 .
^ 曹, 亮吉. 數學導論. 科学月科社. 1988: 270–270, 277–277.
延伸阅读
编辑
Anton, Howard. Calculus with Analytical Geometry . Wiley . 1980. ISBN 978-0-471-03248-9 .
Bartle, Robert G. The Elements of Real Analysis 2nd. Wiley. 1976. ISBN 978-0-471-05464-1 .
Dubinsky, Ed; Harel, Guershon. The Concept of Function: Aspects of Epistemology and Pedagogy. Mathematical Association of America. 1992. ISBN 978-0-88385-081-7 .
Hammack, Richard. 12. Functions (PDF) . Book of Proof . Virginia Commonwealth University . 2009 [2012-08-01 ] .
Husch, Lawrence S. Visual Calculus . University of Tennessee . 2001 [2007-09-27 ] .
Katz, Robert. Axiomatic Analysis. D. C. Heath and Company . 1964.
Kleiner, Israel. Evolution of the Function Concept: A Brief Survey . The College Mathematics Journal. 1989, 20 (4): 282–300. CiteSeerX 10.1.1.113.6352 . JSTOR 2686848 . doi:10.2307/2686848 .
Lützen, Jesper. Between rigor and applications: Developments in the concept of function in mathematical analysis . Porter, Roy (编). The Cambridge History of Science: The modern physical and mathematical sciences. Cambridge University Press. 2003. ISBN 978-0-521-57199-9 . An approachable and diverting historical presentation.
Malik, M. A. Historical and pedagogical aspects of the definition of function. International Journal of Mathematical Education in Science and Technology. 1980, 11 (4): 489–492. doi:10.1080/0020739800110404 .
Reichenbach, Hans. Elements of Symbolic Logic. Dover. 1947. ISBN 0-486-24004-5 .
Ruthing, D. Old Intelligencer: Some definitions of the concept of function from Bernoulli, Joh. to Bourbaki, N. . Mathematical Intelligencer. 1984, 6 (4): 71–78. S2CID 189883712 . doi:10.1007/BF03026743 .
Thomas, George B.; Finney, Ross L. Calculus and Analytic Geometry 9th. Addison-Wesley . 1995. ISBN 978-0-201-53174-9 .
外部链接
编辑