ML@矩阵微积分@Matrix calculus@Part1
文章目录
矩阵微积分@Matrix calculus
参考资料@教材
-
深度学习中的矩阵微积分学 - Dezeming Family https://dezeming.top › uploads › 2022/02 › 深度…
-
- **作者:**方保镕,周继东,李医民编著 **页数:**401 **出版社:**北京:清华大学出版社 **出版日期:**2013.12
- 简介:本书比较全面、系统地介绍了矩阵的基本理论、方法及其应用。
- 全书分上、下两篇,上篇为基础篇,下篇为应用篇。
亚导数(次导数)
-
亚导数(subderivative)是实数域上凸函数的一个重要概念。
-
如果一个凸函数在某个点不可导,那么可以通过亚导数来描述该点的导数值范围。
-
Let f : I → R {\displaystyle f:I\to \mathbb {R} } f:I→R be a real-valued convex function defined on an open interval of the real line. Such a function need not be differentiable at all points: For example, the absolute value function f ( x ) = ∣ x ∣ f(x)=|x| f(x)=∣x∣ is non-differentiable when x = 0 x=0 x=0. However, as seen in the graph on the right (where f ( x ) f(x) f(x) in blue has non-differentiable kinks similar to the absolute value function), for any x 0 x_{0} x0 in the domain of the function one can draw a line which goes through the point ( x 0 , f ( x 0 ) ) {\displaystyle (x_{0},f(x_{0}))} (x0,f(x0)) and which is everywhere either touching or below the graph of f. The slope of such a line is called a subderivative.
-
Definition🎈
Rigorously, a subderivative of a convex function f : I → R {\displaystyle f:I\to \mathbb {R} } f:I→R at a point x 0 x_{0} x0 in the open interval I I I is a real number c c c such that
- f ( x ) − f ( x 0 ) ≥ c ( x − x 0 ) {\displaystyle f(x)-f(x_{0})\geq c(x-x_{0})} f(x)−f(x0)≥c(x−x0)
for all x ∈ I x\in I x∈I. By the converse of the mean value theorem, the set of subderivatives at x 0 x_{0} x0 for a convex function is a nonempty closed interval [ a , b ] [a,b] [a,b], where a a a and b b b are the one-sided limits
-
a = lim x → x 0 − f ( x ) − f ( x 0 ) x − x 0 , {\displaystyle a=\lim _{x\to x_{0}^{-}}{\frac {f(x)-f(x_{0})}{x-x_{0}}},} a=x→x0−limx−x0f(x)−f(x0),
-
b = lim x → x 0 + f ( x ) − f ( x 0 ) x − x 0 . {\displaystyle b=\lim _{x\to x_{0}^{+}}{\frac {f(x)-f(x_{0})}{x-x_{0}}}.} b=x→x0+limx−x0f(x)−f(x0).
-
The set [ a , b ] [a,b] [a,b] of all subderivatives is called the subdifferential of the function f f f at x 0 x_{0} x0, denoted by ∂ f ( x 0 ) {\displaystyle \partial f(x_{0})} ∂f(x0). 🎈
-
If f f f is convex, then its subdifferential at any point is non-empty.
-
Moreover, if its subdifferential at x 0 x_{0} x0 contains exactly one subderivative, then ∂ f ( x 0 ) = { f ′ ( x 0 ) } {\displaystyle \partial f(x_{0})=\{f'(x_{0})\}} ∂f(x0)={f′(x0)} and f f f is differentiable at x 0 x_{0} x0.
-
例
- ∂ ∣ x ∣ ∂ x = { 1 if x > 0 − 1 if x < 0 a if x = 0 , a ∈ [ − 1 , 1 ] \dfrac{\partial|x|}{\partial x}= \begin{cases}1&\text{if}\;x>0\\ -1&\text{if}\;{x<0}\\ a&\text{if}\;{x=0},&a\in[-1,1]\end{cases} ∂x∂∣x∣=⎩ ⎨ ⎧1−1aifx>0ifx<0ifx=0,a∈[−1,1]
-
亚导数有以下几个重要性质:
- 亚导数是一个实数或者无穷大。
- 亚导数是函数在该点处可能存在的最小斜率值。
- 如果函数在某个点可导,则该点的亚导数等于导数。
- 如果函数在某个点连续,则该点的亚导数等于函数在该点的导数值。
亚导数在凸函数的优化问题中有重要应用,能够帮助求解不可导点处的最优解。
凸函数@convex function
-
常见的凸函数比如 x 2 x^2 x2(类似于U形的函数)
-
In mathematics, a real-valued function is called convex if the line segment between any two distinct points on the graph of the function lies above the graph between the two points.
-
Equivalently, a function is convex if its epigraph (the set of points on or above the graph of the function) is a convex set. A twice-differentiable function of a single variable is convex if and only if its second derivative is nonnegative on its entire domain.
-
Well-known examples of convex functions of a single variable include the quadratic function x 2 x^{2} x2 and the exponential function e x e^{x} ex. In simple terms, a convex function refers to a function whose graph is shaped like a cup ∪ \cup ∪, while a concave function’s graph is shaped like a cap ∩ \cap ∩.
凸分析
-
凸分析是数学的一个分支,研究凸集和凸函数的性质。
- 凸集是一种集合,其中连接集合内任意两点的线段上的所有点也在该集合内。
凸分析在许多领域都有应用,包括优化、经济学、运筹学和计算机科学。在优化中,凸分析用于开发有效算法来解决凸优化问题,这些问题的目标函数和约束条件均为凸函数。在经济学中,凸分析用于研究消费者偏好和生产技术,这些通常被建模为凸集或凸函数。在运筹学中,凸分析用于建模和解决运输、物流和供应链管理中的问题。在计算机科学中,凸分析用于机器学习、计算机视觉和机器人技术,用于开发用于模式识别、图像处理和运动规划的算法。
凸分析的一些关键概念包括凸包,这是包含给定点集的最小凸集;凸锥,这是一组矢量,其线性组合具有非负系数;和Fenchel共轭,这是一种将凸函数转换为另一个易于处理的凸函数的方法。凸分析中的其他重要主题包括次梯度,这是导数对于不可导函数的概括;对偶理论,它将优化问题与它们的对偶问题相关联;以及凸优化算法,这些是用于有效解决凸优化问题的算法。
总的来说,凸分析为各种领域中的建模和解决问题提供了强大的工具,随着新的应用被发现,其重要性可能会继续增长。
记法
- 在表示向量和矩阵时,通过用单个变量(字母)来表示许多变量的方式,把矩阵记法的效用发挥到最大。
- 可以用不同字体来区分标量、向量和矩阵。
- 我们使用
M
(
n
,
m
)
M(n,m)
M(n,m)来表示包含n行m列的
n
×
m
n×m
n×m实矩阵的空间。
- 该空间中的一般矩阵用大写字母表示,例如A,X,Y等。
- 而若该矩阵属于 M ( n , 1 ) M(n,1) M(n,1),即列向量,则用粗体小写字母表示,如a,x,y等。(但有时为例放便,不以粗体书写)
- 特别地,M(1,1)中的元素为标量,用小写斜体字母表示,如a,t,x等。
- X T X^T XT 表示矩阵转置, t r ( X ) tr(X) tr(X)表示矩阵的迹,而 det ( X ) \det(X) det(X)或 ∣ X ∣ |X| ∣X∣表示行列式。
- 除非专门注明,所有函数都默认属于光滑函数。
- 通常字母表前半部分的字母 ( a , b , c , … ) (a, b, c, …) (a,b,c,…)用于表示常量
- 而后半部分的字母
(
t
,
x
,
y
,
…
)
(t, x, y, …)
(t,x,y,…)用于表示变量。
- 变量可以是标量,也可以是向量
- 标量可能是常数,也可能是变量
布局
-
这一部分讨论了利用矩阵微积分的各个领域中使用的符号约定的相似之处和不同之处。虽然通常存在两种一致的约定,但一些作者发现在下文所讨论的形式中混合使用两种约定很方便。在本节之后,方程式将分别列出两种竞争形式。
-
The fundamental issue is that the derivative of a vector with respect to a vector, i.e. ∂ y ∂ x \frac{\partial \mathbf{y}}{\partial \mathbf{x}} ∂x∂y, is often written in two competing ways. If the numerator y \mathbf{y} y is of size m m m and the denominator x \mathbf{x} x of size n n n, then the result can be laid out as either an m×n matrix or n×m matrix, i.e. the elements of y \mathbf{y} y laid out in columns and the elements of x \mathbf{x} x laid out in rows, or vice versa.
- y = ( y 1 y 2 ⋮ y m ) x = ( x 1 x 2 ⋯ x n ) \mathbf{y}= \begin{pmatrix} y_1\\ y_2\\ \vdots \\ y_m \end{pmatrix} \\ \mathbf{x}= \begin{pmatrix} x_1&x_2&\cdots&x_n \end{pmatrix} y= y1y2⋮ym x=(x1x2⋯xn)
-
This leads to the following possibilities:
雅可比公式
- Numerator layout, i.e. lay out according to
y
\mathbf{y}
y and
x
T
\mathbf{x}^T
xT (i.e. contrarily to x). This is sometimes known as the
Jacobian
formulation. This corresponds to the m×n layout in the previous example.
海森公式
- Denominator layout, i.e. lay out according to
y
T
\mathbf{y}^T
yT and
x
\mathbf{x}
x (i.e. contrarily to y). This is sometimes known as the
Hessian
formulation.- Some authors term this layout the gradient, in distinction to the Jacobian (numerator layout), which is its transpose. (However, gradient more commonly means the derivative ∂ y ∂ x , \frac{\partial y}{\partial \mathbf{x}}, ∂x∂y, regardless of layout.). This corresponds to the n×m layout in the previous example.
- A third possibility sometimes seen is to insist on writing the derivative as
∂
y
∂
x
′
,
\frac{\partial \mathbf{y}}{\partial \mathbf{x}'},
∂x′∂y, (i.e. the derivative is taken with respect to the transpose of x) and follow the numerator layout. This makes it possible to claim that the matrix is laid out according to both numerator and denominator. In practice this produces results the same as the numerator layout.
-
一些作者将这种布局称为梯度,与雅可比公式(分子布局)相对应,它是其转置。
-
(然而,“梯度”更常见的意思是导数 ∂ y ∂ x \frac{\partial y}{\partial \mathbf{x}} ∂x∂y,无论布局如何。)这对应于上一个例子中的 n×m 布局。
-
- 有时还会看到第三种可能性,坚持将导数写成 ∂ y ∂ x ′ \frac{\partial \mathbf{y}}{\partial \mathbf{x}'} ∂x′∂y(即导数是相对于 x 的转置取的),并遵循分子布局。这使得可以声称矩阵是根据分子和分母进行布局的。在实践中,这产生的结果与分子布局相同。
小结
- 对于分子布局将,将
Y
\mathbf{Y}
Y的行数m作为结果矩阵的行数(如果
Y
\mathbf{Y}
Y是一个向量或标量,则认为m=1)
- 同时,将 X \mathbf{X} X的列数n作为结果矩阵的列数(如果 X \mathbf{X} X是一个向量或标量,则认为n=1)
- 分母记法于分子记法相反(他们互为转置矩阵)
分子记法@分子布局
-
- 设 x , y \mathbf{x},\mathbf{y} x,y都是列向量, x , y x,y x,y都是标量
- 示意图中的 ∂ y ∂ x \frac{\partial\mathbf{y}}{\partial{x}} ∂x∂y, ∂ y ∂ x \frac{\partial{y}}{\partial{\mathbf{x}}} ∂x∂y色块形状对应于列向量和行向量
-
这个矩阵我们称为雅克比矩阵 (Jacobian matrix),以下是分子记法(分子布局 (numerator layout))
- J = [ ∇ f ( x , y ) ∇ g ( x , y ) ] = [ ∂ f ( x , y ) ∂ x ∂ f ( x , y ) ∂ y ∂ g ( x , y ) ∂ x ∂ g ( x , y ) ∂ y ] \mathcal{J}=\left[\begin{array}{l} \nabla f(x, y) \\ \nabla g(x, y) \end{array}\right]=\left[\begin{array}{ll} \frac{\partial f(x, y)}{\partial x} & \frac{\partial f(x, y)}{\partial y} \\ \frac{\partial g(x, y)}{\partial x} & \frac{\partial g(x, y)}{\partial y} \end{array}\right] J=[∇f(x,y)∇g(x,y)]=[∂x∂f(x,y)∂x∂g(x,y)∂y∂f(x,y)∂y∂g(x,y)]
-
∂ y ∂ x = [ ∂ y ∂ x 1 ∂ y ∂ x 2 ⋯ ∂ y ∂ x n ] . ∂ y ∂ x = [ ∂ y 1 ∂ x ∂ y 2 ∂ x ⋮ ∂ y m ∂ x ] . ∂ y ∂ x = [ ∂ y 1 ∂ x 1 ∂ y 1 ∂ x 2 ⋯ ∂ y 1 ∂ x n ∂ y 2 ∂ x 1 ∂ y 2 ∂ x 2 ⋯ ∂ y 2 ∂ x n ⋮ ⋮ ⋱ ⋮ ∂ y m ∂ x 1 ∂ y m ∂ x 2 ⋯ ∂ y m ∂ x n ] . ∂ y ∂ X = [ ∂ y ∂ x 11 ∂ y ∂ x 21 ⋯ ∂ y ∂ x p 1 ∂ y ∂ x 12 ∂ y ∂ x 22 ⋯ ∂ y ∂ x p 2 ⋮ ⋮ ⋱ ⋮ ∂ y ∂ x 1 q ∂ y ∂ x 2 q ⋯ ∂ y ∂ x p q ] . {\displaystyle {\begin{aligned}{\frac {\partial y}{\partial \mathbf {x} }}&={\begin{bmatrix}{\frac {\partial y}{\partial x_{1}}}&{\frac {\partial y}{\partial x_{2}}}&\cdots &{\frac {\partial y}{\partial x_{n}}}\end{bmatrix}}.\\ {\frac {\partial \mathbf {y} }{\partial x}}&={\begin{bmatrix}{\frac {\partial y_{1}}{\partial x}}\\ {\frac {\partial y_{2}}{\partial x}}\\ \vdots \\ {\frac {\partial y_{m}}{\partial x}}\\ \end{bmatrix}}.\\ {\frac {\partial \mathbf {y} }{\partial \mathbf {x} }}&={\begin{bmatrix}{\frac {\partial y_{1}}{\partial x_{1}}}&{\frac {\partial y_{1}}{\partial x_{2}}}&\cdots &{\frac {\partial y_{1}}{\partial x_{n}}}\\ {\frac {\partial y_{2}}{\partial x_{1}}}&{\frac {\partial y_{2}}{\partial x_{2}}}&\cdots &{\frac {\partial y_{2}}{\partial x_{n}}}\\ \vdots &\vdots &\ddots &\vdots \\ {\frac {\partial y_{m}}{\partial x_{1}}}&{\frac {\partial y_{m}}{\partial x_{2}}}&\cdots &{\frac {\partial y_{m}}{\partial x_{n}}}\\ \end{bmatrix}}.\\ {\frac {\partial y}{\partial \mathbf {X} }}&={\begin{bmatrix}{\frac {\partial y}{\partial x_{11}}}&{\frac {\partial y}{\partial x_{21}}}&\cdots &{\frac {\partial y}{\partial x_{p1}}}\\ {\frac {\partial y}{\partial x_{12}}}&{\frac {\partial y}{\partial x_{22}}}&\cdots &{\frac {\partial y}{\partial x_{p2}}}\\ \vdots &\vdots &\ddots &\vdots \\ {\frac {\partial y}{\partial x_{1q}}}&{\frac {\partial y}{\partial x_{2q}}}&\cdots &{\frac {\partial y}{\partial x_{pq}}}\\ \end{bmatrix}}.\end{aligned}}} ∂x∂y∂x∂y∂x∂y∂X∂y=[∂x1∂y∂x2∂y⋯∂xn∂y].= ∂x∂y1∂x∂y2⋮∂x∂ym .= ∂x1∂y1∂x1∂y2⋮∂x1∂ym∂x2∂y1∂x2∂y2⋮∂x2∂ym⋯⋯⋱⋯∂xn∂y1∂xn∂y2⋮∂xn∂ym .= ∂x11∂y∂x12∂y⋮∂x1q∂y∂x21∂y∂x22∂y⋮∂x2q∂y⋯⋯⋱⋯∂xp1∂y∂xp2∂y⋮∂xpq∂y .
分母记法
-
有许多著作和软件会使用分母布局 (denominator layout),其实这就是分子布局的矩阵转置:
- [ ∂ f ( x , y ) ∂ x ∂ f ( x , y ) ∂ y ∂ g ( x , y ) ∂ x ∂ g ( x , y ) ∂ y ] T = [ ∂ f ( x , y ) ∂ x ∂ g ( x , y ) ∂ x ∂ f ( x , y ) ∂ y ∂ g ( x , y ) ∂ y ] \left[\begin{array}{ll} \frac{\partial f(x, y)}{\partial x} & \frac{\partial f(x, y)}{\partial y} \\ \frac{\partial g(x, y)}{\partial x} & \frac{\partial g(x, y)}{\partial y} \end{array}\right]^{T}=\left[\begin{array}{ll} \frac{\partial f(x, y)}{\partial x} & \frac{\partial g(x, y)}{\partial x} \\ \frac{\partial f(x, y)}{\partial y} & \frac{\partial g(x, y)}{\partial y} \end{array}\right] [∂x∂f(x,y)∂x∂g(x,y)∂y∂f(x,y)∂y∂g(x,y)]T=[∂x∂f(x,y)∂y∂f(x,y)∂x∂g(x,y)∂y∂g(x,y)]
-
The following definitions are only provided in numerator-layout notation:
∂ Y ∂ x = [ ∂ y 11 ∂ x ∂ y 12 ∂ x ⋯ ∂ y 1 n ∂ x ∂ y 21 ∂ x ∂ y 22 ∂ x ⋯ ∂ y 2 n ∂ x ⋮ ⋮ ⋱ ⋮ ∂ y m 1 ∂ x ∂ y m 2 ∂ x ⋯ ∂ y m n ∂ x ] . d X = [ d x 11 d x 12 ⋯ d x 1 n d x 21 d x 22 ⋯ d x 2 n ⋮ ⋮ ⋱ ⋮ d x m 1 d x m 2 ⋯ d x m n ] . {\displaystyle {\begin{aligned}{\frac {\partial \mathbf {Y} }{\partial x}}&={\begin{bmatrix}{\frac {\partial y_{11}}{\partial x}}&{\frac {\partial y_{12}}{\partial x}}&\cdots &{\frac {\partial y_{1n}}{\partial x}}\\ {\frac {\partial y_{21}}{\partial x}}&{\frac {\partial y_{22}}{\partial x}}&\cdots &{\frac {\partial y_{2n}}{\partial x}}\\ \vdots &\vdots &\ddots &\vdots \\ {\frac {\partial y_{m1}}{\partial x}}&{\frac {\partial y_{m2}}{\partial x}}&\cdots &{\frac {\partial y_{mn}}{\partial x}}\\ \end{bmatrix}}.\\ d\mathbf {X} &={\begin{bmatrix}dx_{11}&dx_{12}&\cdots &dx_{1n}\\ dx_{21}&dx_{22}&\cdots &dx_{2n}\\ \vdots &\vdots &\ddots &\vdots \\ dx_{m1}&dx_{m2}&\cdots &dx_{mn}\\ \end{bmatrix}}.\end{aligned}}} ∂x∂YdX= ∂x∂y11∂x∂y21⋮∂x∂ym1∂x∂y12∂x∂y22⋮∂x∂ym2⋯⋯⋱⋯∂x∂y1n∂x∂y2n⋮∂x∂ymn .= dx11dx21⋮dxm1dx12dx22⋮dxm2⋯⋯⋱⋯dx1ndx2n⋮dxmn . -
Denominator-layout notation🎈
Using denominator-layout notation, we have:[2]
∂ y ∂ x = [ ∂ y ∂ x 1 ∂ y ∂ x 2 ⋮ ∂ y ∂ x n ] . ∂ y ∂ x = [ ∂ y 1 ∂ x ∂ y 2 ∂ x ⋯ ∂ y m ∂ x ] . ∂ y ∂ x = [ ∂ y 1 ∂ x 1 ∂ y 2 ∂ x 1 ⋯ ∂ y m ∂ x 1 ∂ y 1 ∂ x 2 ∂ y 2 ∂ x 2 ⋯ ∂ y m ∂ x 2 ⋮ ⋮ ⋱ ⋮ ∂ y 1 ∂ x n ∂ y 2 ∂ x n ⋯ ∂ y m ∂ x n ] . ∂ y ∂ X = [ ∂ y ∂ x 11 ∂ y ∂ x 12 ⋯ ∂ y ∂ x 1 q ∂ y ∂ x 21 ∂ y ∂ x 22 ⋯ ∂ y ∂ x 2 q ⋮ ⋮ ⋱ ⋮ ∂ y ∂ x p 1 ∂ y ∂ x p 2 ⋯ ∂ y ∂ x p q ] . {\displaystyle {\begin{aligned}{\frac {\partial y}{\partial \mathbf {x} }}&={\begin{bmatrix}{\frac {\partial y}{\partial x_{1}}}\\ {\frac {\partial y}{\partial x_{2}}}\\ \vdots \\ {\frac {\partial y}{\partial x_{n}}}\\ \end{bmatrix}}.\\ {\frac {\partial \mathbf {y} }{\partial x}}&={\begin{bmatrix}{\frac {\partial y_{1}}{\partial x}}&{\frac {\partial y_{2}}{\partial x}}&\cdots &{\frac {\partial y_{m}}{\partial x}}\end{bmatrix}}.\\ {\frac {\partial \mathbf {y} }{\partial \mathbf {x} }}&={\begin{bmatrix}{\frac {\partial y_{1}}{\partial x_{1}}}&{\frac {\partial y_{2}}{\partial x_{1}}}&\cdots &{\frac {\partial y_{m}}{\partial x_{1}}}\\ {\frac {\partial y_{1}}{\partial x_{2}}}&{\frac {\partial y_{2}}{\partial x_{2}}}&\cdots &{\frac {\partial y_{m}}{\partial x_{2}}}\\ \vdots &\vdots &\ddots &\vdots \\ {\frac {\partial y_{1}}{\partial x_{n}}}&{\frac {\partial y_{2}}{\partial x_{n}}}&\cdots &{\frac {\partial y_{m}}{\partial x_{n}}}\\ \end{bmatrix}}.\\ {\frac {\partial y}{\partial \mathbf {X} }}&={\begin{bmatrix}{\frac {\partial y}{\partial x_{11}}}&{\frac {\partial y}{\partial x_{12}}}&\cdots &{\frac {\partial y}{\partial x_{1q}}}\\ {\frac {\partial y}{\partial x_{21}}}&{\frac {\partial y}{\partial x_{22}}}&\cdots &{\frac {\partial y}{\partial x_{2q}}}\\ \vdots &\vdots &\ddots &\vdots \\ {\frac {\partial y}{\partial x_{p1}}}&{\frac {\partial y}{\partial x_{p2}}}&\cdots &{\frac {\partial y}{\partial x_{pq}}}\\ \end{bmatrix}}.\end{aligned}}} ∂x∂y∂x∂y∂x∂y∂X∂y= ∂x1∂y∂x2∂y⋮∂xn∂y .=[∂x∂y1∂x∂y2⋯∂x∂ym].= ∂x1∂y1∂x2∂y1⋮∂xn∂y1∂x1∂y2∂x2∂y2⋮∂xn∂y2⋯⋯⋱⋯∂x1∂ym∂x2∂ym⋮∂xn∂ym .= ∂x11∂y∂x21∂y⋮∂xp1∂y∂x12∂y∂x22∂y⋮∂xp2∂y⋯⋯⋱⋯∂x1q∂y∂x2q∂y⋮∂xpq∂y .
一般形式的Jacobi Matrix🎈
-
对于多个标量函数,讲它们组合到一个向量中:
-
令 y = f ( x ) \mathbf{y}=\mathbf{f(x)} y=f(x)是一个由若干(设为m个)多元(设为n元)标量函数构成的向量
-
把n维向量 x \mathbf{x} x作为输入, f i ( x ) f_i(\mathbf{x}) fi(x)返回一个标量值( R n → R R^n\to{R} Rn→R)
-
y = ( y 1 y 2 ⋮ y m ) = f ( x ) = ( f 1 ( x ) f 2 ( x ) ⋮ f m ( x ) ) \mathbf{y}=\begin{pmatrix} y_{1}\\ y_{2}\\ \vdots\\ y_{m}\\ \end{pmatrix} =\mathbf{f(x)} =\begin{pmatrix} f_{1}(\mathbf{x})\\ f_{2}(\mathbf{x})\\ \vdots\\ f_{m}(\mathbf{x})\\ \end{pmatrix} y= y1y2⋮ym =f(x)= f1(x)f2(x)⋮fm(x)
-
m = n m=n m=n的情况是很常见的
-
Jacobi矩阵就是与 x \mathbf{x} x函数相关的的m个梯度
-
∂ y ∂ x = ( ∇ f 1 ( x ) ∇ f 2 ( x ) ⋮ ∇ f m ( x ) ) = ( ∂ ∂ x f 1 ( x ) ∂ ∂ x f 2 ( x ) ⋮ ∂ ∂ x f m ( x ) ) = ( ∂ ∂ x 1 f 1 ( x ) ∂ ∂ x 2 f 1 ( x ) ⋯ ∂ ∂ x n f 1 ( x ) ∂ ∂ x 1 f 2 ( x ) ∂ ∂ x 2 f 2 ( x ) ⋯ ∂ ∂ x n f 2 ( x ) ⋮ ∂ ∂ x 1 f m ( x ) ∂ ∂ x 2 f m ( x ) ⋯ ∂ ∂ x n f m ( x ) ) m × n X ∈ R n ∇ f i ( x ) = ∂ ∂ x f i ( x ) = [ ∂ ∂ x 1 f i ( x ) , ∂ ∂ x 2 f i ( x ) , ⋯ , ∂ ∂ x n f i ( x ) ] \frac{\partial\mathbf{y}}{\partial{\mathbf{x}}} =\begin{pmatrix} \nabla f_{1}{(\mathbf{x})}\\ \nabla f_{2}{(\mathbf{x})}\\ \vdots\\ \nabla f_{m}{(\mathbf{x})}\\ \end{pmatrix} =\begin{pmatrix} \frac{\partial}{\partial{\mathbf{x}}}f_{1}(\mathbf{x})\\ \frac{\partial}{\partial{\mathbf{x}}}f_{2}(\mathbf{x})\\ \vdots\\ \frac{\partial}{\partial{\mathbf{x}}}f_{m}(\mathbf{x})\\ \end{pmatrix}\\ =\begin{pmatrix} \frac{\partial}{\partial{{x_1}}}f_{1}(\mathbf{x})& \frac{\partial}{\partial{{x_2}}}f_{1}(\mathbf{x})& \cdots& \frac{\partial}{\partial{{x_n}}}f_{1}(\mathbf{x})\\ \frac{\partial}{\partial{{x_1}}}f_{2}(\mathbf{x})& \frac{\partial}{\partial{{x_2}}}f_{2}(\mathbf{x})& \cdots& \frac{\partial}{\partial{{x_n}}}f_{2}(\mathbf{x})\\ \vdots\\ \frac{\partial}{\partial{{x_1}}}f_{m}(\mathbf{x})& \frac{\partial}{\partial{{x_2}}}f_{m}(\mathbf{x})& \cdots& \frac{\partial}{\partial{{x_n}}}f_{m}(\mathbf{x})\\ \end{pmatrix}_{m\times{n}} \\ \mathbf{X}\in{R^n} \\ \nabla f_{i}{(\mathbf{x})}=\frac{\partial}{\partial{\mathbf{x}}}f_{i}(\mathbf{x}) = [\frac{\partial}{\partial{{x_1}}}f_{i}(\mathbf{x}), \frac{\partial}{\partial{{x_2}}}f_{i}(\mathbf{x}), \cdots, \frac{\partial}{\partial{{x_n}}}f_{i}(\mathbf{x})] ∂x∂y= ∇f1(x)∇f2(x)⋮∇fm(x) = ∂x∂f1(x)∂x∂f2(x)⋮∂x∂fm(x) = ∂x1∂f1(x)∂x1∂f2(x)⋮∂x1∂fm(x)∂x2∂f1(x)∂x2∂f2(x)∂x2∂fm(x)⋯⋯⋯∂xn∂f1(x)∂xn∂f2(x)∂xn∂fm(x) m×nX∈Rn∇fi(x)=∂x∂fi(x)=[∂x1∂fi(x),∂x2∂fi(x),⋯,∂xn∂fi(x)]
-
例
-
对于 f i ( x ) = f i ( [ x 1 , x 2 , ⋯ , x n ] ) = x i f_i(\mathbf{x})=f_i([x_1,x_2,\cdots,x_n])= x_i fi(x)=fi([x1,x2,⋯,xn])=xi (构成的)的恒等函数 f ( x ) = x \mathbf{f(x)} = \mathbf{x} f(x)=x,我们可以计算得到它的雅克比矩阵(这里的 m 等于 n)
-
y = f ( x ) = ( f 1 ( x ) , f 2 ( x ) , ⋯ , f n ( x ) ) = x \mathbf{y=f(x)}=(f_1(\mathbf{x}),f_2(\mathbf{x}),\cdots,f_n(\mathbf{x}))=\mathbf{x} y=f(x)=(f1(x),f2(x),⋯,fn(x))=x
-
注意这里的函数 f \mathbf{f} f是向量输入 x \mathbf{x} x,同时向量输出 y \mathbf{y} y
- 假设它么的维数分别是 n , m n,m n,m,且有 m = n m=n m=n
- 对上述恒等函数求jacobi matrix
-
∂ y ∂ x = ( ∂ ∂ x 1 f 1 ( x ) ∂ ∂ x 2 f 1 ( x ) ⋯ ∂ ∂ x n f 1 ( x ) ∂ ∂ x 1 f 2 ( x ) ∂ ∂ x 2 f 2 ( x ) ⋯ ∂ ∂ x n f 2 ( x ) ⋮ ∂ ∂ x 1 f m ( x ) ∂ ∂ x 2 f m ( x ) ⋯ ∂ ∂ x n f m ( x ) ) m × n \frac{\partial\mathbf{y}}{\partial{\mathbf{x}}} =\begin{pmatrix} \frac{\partial}{\partial{{x_1}}}f_{1}(\mathbf{x})& \frac{\partial}{\partial{{x_2}}}f_{1}(\mathbf{x})& \cdots& \frac{\partial}{\partial{{x_n}}}f_{1}(\mathbf{x})\\ \frac{\partial}{\partial{{x_1}}}f_{2}(\mathbf{x})& \frac{\partial}{\partial{{x_2}}}f_{2}(\mathbf{x})& \cdots& \frac{\partial}{\partial{{x_n}}}f_{2}(\mathbf{x})\\ \vdots\\ \frac{\partial}{\partial{{x_1}}}f_{m}(\mathbf{x})& \frac{\partial}{\partial{{x_2}}}f_{m}(\mathbf{x})& \cdots& \frac{\partial}{\partial{{x_n}}}f_{m}(\mathbf{x})\\ \end{pmatrix}_{m\times{n}} ∂x∂y= ∂x1∂f1(x)∂x1∂f2(x)⋮∂x1∂fm(x)∂x2∂f1(x)∂x2∂f2(x)∂x2∂fm(x)⋯⋯⋯∂xn∂f1(x)∂xn∂f2(x)∂xn∂fm(x) m×n
-
= ( ∂ ∂ x 1 x 1 ∂ ∂ x 2 x 1 ⋯ ∂ ∂ x n x 1 ∂ ∂ x 1 x 2 ∂ ∂ x 2 x 2 ⋯ ∂ ∂ x n x 2 ⋮ ∂ ∂ x 1 x m ∂ ∂ x 2 x m ⋯ ∂ ∂ x n x m ) m × n = n 2 = ( 1 0 ⋯ 0 0 1 ⋯ 0 ⋮ ⋮ ⋱ ⋮ 0 0 ⋯ 1 ) n × n \\ =\begin{pmatrix} \frac{\partial}{\partial{{x_1}}}x_1& \frac{\partial}{\partial{{x_2}}}x_1& \cdots& \frac{\partial}{\partial{{x_n}}}x_1\\ \frac{\partial}{\partial{{x_1}}}x_2& \frac{\partial}{\partial{{x_2}}}x_2& \cdots& \frac{\partial}{\partial{{x_n}}}x_2\\ \vdots\\ \frac{\partial}{\partial{{x_1}}}x_m& \frac{\partial}{\partial{{x_2}}}x_m& \cdots& \frac{\partial}{\partial{{x_n}}}x_m\\ \end{pmatrix}_{m\times{n}=n^2} =\begin{pmatrix} 1 &0 &\cdots&0 \\ 0 &1 &\cdots&0 \\ \vdots&\vdots&\ddots&\vdots\\ 0 &0 &\cdots&1 \\ \end{pmatrix}_{n\times{n}} = ∂x1∂x1∂x1∂x2⋮∂x1∂xm∂x2∂x1∂x2∂x2∂x2∂xm⋯⋯⋯∂xn∂x1∂xn∂x2∂xn∂xm m×n=n2= 10⋮001⋮0⋯⋯⋱⋯00⋮1 n×n
-
例
-
取 y = A x = ( a 11 a 12 ⋯ a 1 n a 21 a 22 ⋯ a 2 n ⋮ ⋮ ⋮ a m 1 a m 2 ⋯ a m n ) ( x 1 x 2 ⋮ x n ) y = ( c 1 c 2 ⋮ c m ) = ( ∑ k = 1 n a 1 k x k ∑ k = 1 n a 2 k x k ⋮ ∑ k = 1 n a m k x k ) f i ( x ) = c i = c i ( x ) = α i x = ∑ k = 1 n a i k x k c i ∈ R c i j = ∑ k = 1 n a i k x k i = 1 , 2 , ⋯ , m j = 1 , 2 , ⋯ , n 取\mathbf{y} =A\mathbf{x} =\begin{pmatrix} a_{11} &a_{12} &\cdots &a_{1n} \\ a_{21} &a_{22} &\cdots &a_{2n} \\ \vdots &\vdots & &\vdots \\ a_{m1} &a_{m2} &\cdots &a_{mn} \\ \end{pmatrix} \begin{pmatrix} x_{1} \\ x_{2} \\ \vdots \\ x_{n} \\ \end{pmatrix} \\ \mathbf{y}= \begin{pmatrix} c_1\\ c_2\\ \vdots\\ c_m\\ \end{pmatrix} =\displaystyle{ \begin{pmatrix} \sum\limits_{k=1}^{n}a_{1k}x_k\\ \sum\limits_{k=1}^{n}a_{2k}x_k\\ \vdots\\ \sum\limits_{k=1}^{n}a_{mk}x_k\\ \end{pmatrix} } \\ f_i(\mathbf{x})= c_{i}=c_i(\mathbf{x})=\alpha_i{\mathbf{x}} =\sum\limits_{k=1}^{n}a_{ik}x_k \quad{c_i\in{\mathbb{R}}} \\ c_{ij}=\sum\limits_{k=1}^{n}a_{ik}x_k\\ i=1,2,\cdots,m\\ j=1,2,\cdots,n 取y=Ax= a11a21⋮am1a12a22⋮am2⋯⋯⋯a1na2n⋮amn x1x2⋮xn y= c1c2⋮cm = k=1∑na1kxkk=1∑na2kxk⋮k=1∑namkxk fi(x)=ci=ci(x)=αix=k=1∑naikxkci∈Rcij=k=1∑naikxki=1,2,⋯,mj=1,2,⋯,n
-
∂ y ∂ x = ( ∂ ∂ x 1 f 1 ( x ) ∂ ∂ x 2 f 1 ( x ) ⋯ ∂ ∂ x n f 1 ( x ) ∂ ∂ x 1 f 2 ( x ) ∂ ∂ x 2 f 2 ( x ) ⋯ ∂ ∂ x n f 2 ( x ) ⋮ ∂ ∂ x 1 f m ( x ) ∂ ∂ x 2 f m ( x ) ⋯ ∂ ∂ x n f m ( x ) ) m × n y = A x ∂ ∂ x ( A x ) = ( ∂ ∂ x 1 ∑ k = 1 n a 1 k x k ∂ ∂ x 2 ∑ k = 1 n a 1 k x k ⋯ ∂ ∂ x n ∑ k = 1 n a 1 k x k ∂ ∂ x 1 ∑ k = 1 n a 2 k x k ∂ ∂ x 2 ∑ k = 1 n a 2 k x k ⋯ ∂ ∂ x n ∑ k = 1 n a 2 k x k ⋮ ∂ ∂ x 1 ∑ k = 1 n a m k x k ∂ ∂ x 2 ∑ k = 1 n a m k x k ⋯ ∂ ∂ x n ∑ k = 1 n a m k x k ) m × n \frac{\partial\mathbf{y}}{\partial{\mathbf{x}}} =\begin{pmatrix} \frac{\partial}{\partial{{x_1}}}f_{1}(\mathbf{x})& \frac{\partial}{\partial{{x_2}}}f_{1}(\mathbf{x})& \cdots& \frac{\partial}{\partial{{x_n}}}f_{1}(\mathbf{x})\\ \frac{\partial}{\partial{{x_1}}}f_{2}(\mathbf{x})& \frac{\partial}{\partial{{x_2}}}f_{2}(\mathbf{x})& \cdots& \frac{\partial}{\partial{{x_n}}}f_{2}(\mathbf{x})\\ \vdots\\ \frac{\partial}{\partial{{x_1}}}f_{m}(\mathbf{x})& \frac{\partial}{\partial{{x_2}}}f_{m}(\mathbf{x})& \cdots& \frac{\partial}{\partial{{x_n}}}f_{m}(\mathbf{x})\\ \end{pmatrix}_{m\times{n}} \\\\ y=A\mathbf{x} \\ \frac{\partial}{\partial{\mathbf{x}}}(\mathbf{Ax}) =\begin{pmatrix} \frac{\partial}{\partial{{x_1}}}\sum\limits_{k=1}^{n}a_{1k}x_k& \frac{\partial}{\partial{{x_2}}}\sum\limits_{k=1}^{n}a_{1k}x_k& \cdots& \frac{\partial}{\partial{{x_n}}}\sum\limits_{k=1}^{n}a_{1k}x_k \\ \frac{\partial}{\partial{{x_1}}}\sum\limits_{k=1}^{n}a_{2k}x_k& \frac{\partial}{\partial{{x_2}}}\sum\limits_{k=1}^{n}a_{2k}x_k& \cdots& \frac{\partial}{\partial{{x_n}}}\sum\limits_{k=1}^{n}a_{2k}x_k \\ \vdots\\ \frac{\partial}{\partial{{x_1}}}\sum\limits_{k=1}^{n}a_{mk}x_k& \frac{\partial}{\partial{{x_2}}}\sum\limits_{k=1}^{n}a_{mk}x_k& \cdots& \frac{\partial}{\partial{{x_n}}}\sum\limits_{k=1}^{n}a_{mk}x_k\\ \end{pmatrix}_{m\times{n}} ∂x∂y= ∂x1∂f1(x)∂x1∂f2(x)⋮∂x1∂fm(x)∂x2∂f1(x)∂x2∂f2(x)∂x2∂fm(x)⋯⋯⋯∂xn∂f1(x)∂xn∂f2(x)∂xn∂fm(x) m×ny=Ax∂x∂(Ax)= ∂x1∂k=1∑na1kxk∂x1∂k=1∑na2kxk⋮∂x1∂k=1∑namkxk∂x2∂k=1∑na1kxk∂x2∂k=1∑na2kxk∂x2∂k=1∑namkxk⋯⋯⋯∂xn∂k=1∑na1kxk∂xn∂k=1∑na2kxk∂xn∂k=1∑namkxk m×n
-
d i j = ∂ ∂ x j ∑ j = 1 n a i j x j = a i j i = 1 , 2 , ⋯ , m j = 1 , 2 , ⋯ , n ∴ ∂ ∂ x ( A x ) = ( d i j ) m × n = ( a i j ) m × n = A d_{ij}=\frac{\partial}{\partial{{x_j}}}\sum\limits_{j=1}^{n}a_{ij}x_j=a_{ij} \\ i=1,2,\cdots,m\\ j=1,2,\cdots,n \\ \therefore \frac{\partial}{\partial{\mathbf{x}}}(\mathbf{Ax}) =(d_{ij})_{m\times{n}}=(a_{ij})_{m\times{n}}=A dij=∂xj∂j=1∑naijxj=aiji=1,2,⋯,mj=1,2,⋯,n∴∂x∂(Ax)=(dij)m×n=(aij)m×n=A
例
-
x T ∈ R 1 × n ( 行向量row vector ) A ∈ R n × m C = X T A ∈ R 1 × m ( 列向量column vector ) C = ( ∑ k = 1 n a k 1 x k ∑ k = 1 n a k 2 x k ⋯ ∑ k = 1 n a k m x k ) = ( c 1 , c 2 , ⋯ , c m ) ∂ ∂ x ( x T A ) = ( ∂ ∂ x j c i ) m × n = ( ∂ ∂ x 1 c 1 ∂ ∂ x 2 c 1 ⋯ ∂ ∂ x n c 1 ∂ ∂ x 1 c 2 ∂ ∂ x 2 c 2 ⋯ ∂ ∂ x n c 2 ⋮ ⋮ ⋮ ∂ ∂ x 1 c m ∂ ∂ x 2 c m ⋯ ∂ ∂ x n c m ) = ( a 11 a 21 ⋯ a n 1 a 12 a 22 ⋯ a n 2 ⋮ ⋮ ⋮ a 1 m a 2 m ⋯ a n m ) = A T ∈ R m × n \mathbf{x}^T\in{\mathbb{R}^{1\times{n}}}(行向量\text{row vector}) \\ A\in{\mathbb{R}^{n\times{m}}}\\ C=X^TA\in{\mathbb{R}^{1\times{m}}}(列向量\text{column vector}) \\ C=\begin{pmatrix} \sum\limits_{k=1}^{n}a_{k1}x_k& \sum\limits_{k=1}^{n}a_{k2}x_k& \cdots& \sum\limits_{k=1}^{n}a_{km}x_k& \end{pmatrix} =(c_1,c_2,\cdots,c_m) \\ \frac{\partial}{\partial{\mathbf{x}}}(\mathbf{x}^TA) =(\frac{\partial}{\partial{x_j}}c_i)_{m\times{n}} =\begin{pmatrix} \frac{\partial}{\partial{x_1}}c_1 & \frac{\partial}{\partial{x_2}}c_1 & \cdots & \frac{\partial}{\partial{x_n}}c_1 \\ \frac{\partial}{\partial{x_1}}c_2 & \frac{\partial}{\partial{x_2}}c_2 & \cdots& \frac{\partial}{\partial{x_n}}c_2 \\ \vdots&\vdots&&\vdots \\ \frac{\partial}{\partial{x_1}}c_m & \frac{\partial}{\partial{x_2}}c_m & \cdots& \frac{\partial}{\partial{x_n}}c_m \end{pmatrix} \\ =\begin{pmatrix} a_{11}&a_{21}&\cdots&a_{n1}\\ a_{12}&a_{22}&\cdots&a_{n2}\\ \vdots&\vdots&&\vdots\\ a_{1m}&a_{2m}&\cdots&a_{nm}\\ \end{pmatrix} =A^T\in\mathbb{R}^{m\times{n}} xT∈R1×n(行向量row vector)A∈Rn×mC=XTA∈R1×m(列向量column vector)C=(k=1∑nak1xkk=1∑nak2xk⋯k=1∑nakmxk)=(c1,c2,⋯,cm)∂x∂(xTA)=(∂xj∂ci)m×n= ∂x1∂c1∂x1∂c2⋮∂x1∂cm∂x2∂c1∂x2∂c2⋮∂x2∂cm⋯⋯⋯∂xn∂c1∂xn∂c2⋮∂xn∂cm = a11a12⋮a1ma21a22⋮a2m⋯⋯⋯an1an2⋮anm =AT∈Rm×n
- ∂ ∂ x j ∑ k = 1 n a k i x k = a j i j = 1 , 2 , ⋯ , n i = 1 , 2 , ⋯ , m \frac{\partial}{\partial{x_j}}\sum\limits_{k=1}^{n}a_{ki}x_k=a_{ji} \\j=1,2,\cdots,n\\ i=1,2,\cdots,m ∂xj∂k=1∑nakixk=ajij=1,2,⋯,ni=1,2,⋯,m
小结
-
y a x A x x T A ∂ y ∂ x 0 I A A T \begin{array}{l|cccc} \mathbf{y} & \mathbf{a} & \mathbf{x} & \mathbf{A} \mathbf{x} & \mathbf{x}^{T} \mathbf{A} \\ \hline \frac{\partial \mathbf{y}}{\partial \mathbf{x}} & \mathbf{0} & \mathbf{I} & \mathbf{A} & \mathbf{A}^{T} \end{array} y∂x∂ya0xIAxAxTAAT
-
y a u A u u + v ∂ y ∂ x a ∂ u ∂ x A ∂ u ∂ x ∂ u ∂ x + ∂ v ∂ x \begin{array}{c|ccc} \mathbf{y} & a \mathbf{u} & \mathbf{A u} & \mathbf{u}+\mathbf{v} \\ \hline \frac{\partial \mathbf{y}}{\partial \mathbf{x}} & a \frac{\partial \mathbf{u}}{\partial \mathbf{x}} & \mathbf{A} \frac{\partial \mathbf{u}}{\partial \mathbf{x}} & \frac{\partial \mathbf{u}}{\partial \mathbf{x}}+\frac{\partial \mathbf{v}}{\partial \mathbf{x}} \end{array} y∂x∂yaua∂x∂uAuA∂x∂uu+v∂x∂u+∂x∂v
-
x ∈ R n \mathbf{x}\in{\mathbb{R}^n} x∈Rn, y ∈ R m \mathbf{y}\in{\mathbb{R}^m} y∈Rm, ∂ y ∂ x ∈ R m × n \frac{\partial{\mathbf{y}}}{\partial{\mathbf{x}}}\in{\mathbb{R}^{m\times{n}}} ∂x∂y∈Rm×n
- a , a a,\mathbf{a} a,a and A \mathbf{A} A are not functions of x \mathbf{x} x
- 0 \mathbf{0} 0 and I \mathbf{I} I are matrices
Types of matrix derivative
Types | Scalar | Vector | Matrix |
---|---|---|---|
Scalar | ∂ y ∂ x \frac{\partial y}{\partial x} ∂x∂y | ∂ y ∂ x \frac{\partial \mathbf{y}}{\partial x} ∂x∂y | ∂ Y ∂ x \frac{\partial \mathbf{Y}}{\partial x} ∂x∂Y |
vector | ∂ y ∂ x \frac{\partial y}{\partial \mathbf{x}} ∂x∂y | ∂ y ∂ x \frac{\partial \mathbf{y}}{\partial \mathbf{x}} ∂x∂y | |
Matrix | ∂ y ∂ X \frac{\partial y}{\partial \mathbf{X}} ∂X∂y |
-
表格中空缺的部分使用的较少
-
以下表格采用分子记法(来自d2l)
- 和wikipedia的分子记法有些许不同,可以进一步参考专业教材
-
-
Result of differentiating various kinds of aggregates with other kinds of aggregates
- Aggregates 可以翻译为“集合”、“聚合”、“汇总”等。在数学和计算机科学中,它通常指一组相关的数据或对象的集合,可以是标量、向量、矩阵、张量等。
- 在数学中,聚合通常用于描述对一组数值进行某种操作的过程,例如对一组数值进行求和、求平均、求最大值等。在计算机科学中,聚合通常用于描述对一组数据进行处理和分析的过程,例如对一组数据进行排序、过滤、统计等。
- 在机器学习和数据分析中,聚合是一种常见的操作,用于将数据进行汇总和归纳,例如计算数据的均值、方差、最大值、最小值等统计量,或者将数据进行分组、聚类等操作。
- 总之,聚合是一种重要的概念,广泛应用于数学、计算机科学、统计学、机器学习、数据分析等领域。
矩阵计算@矩阵微分refs
- 动手学深度学习课程 (d2l.ai)
- https://courses.d2l.ai/zh-v2/assets/pdfs/part-0_6.pdf
数量函数和向量函数
- 下面的内容将反复涉及到
数量函数
和向量函数
(以及矩阵函数
) - 由于本人不是数学专业的,通过搜索相关资料获取可能不太准确的解释
- 来源
- newbing AI
- wikipedia
- preface:
- 数量函数和向量函数之间的区分主要根据输出对象(是标量还是向量)
- 它们都可能接收向量作为输入
数量函数
- 数量函数是一个实值函数,它把每个空间点映射到一个实数或物理量。
- 例如, f ( x , y , z ) = x 2 + 4 y + 2 y z 5 f(x,y,z) = x^2 + 4y + 2yz^5 f(x,y,z)=x2+4y+2yz5 是一个数量函数
- 数量函数接收一个数或者一个向量等作为参数(而不一定是一个数),但其计算结果是一个数
向量函数
-
向量函数是一个把实数或向量映射到多维向量的函数
- 例如, f ( t ) = ( c o s t , s i n t , t ) f(t) = (cos t, sin t, t) f(t)=(cost,sint,t) 是一个在 R 3 R^3 R3中的向量函数
- 个人理解
- 向量函数接收一个数或者向量作为参数,其计算结果是一个向量(向量可以只包含一个数)
- 如此看来,数量函数是向量函数的一个特例
-
- 向量值函数,有时也称为向量函数,是一个单变量或多变量的、值域是多维向量或者无穷维向量的集合的函数。
- 向量值函数的输入可以是一个标量或者一个向量(定义域的维度可以是1或大于1);
- 定义域的维度不取决于值域的维度。
- A vector-valued function, also referred to as a vector function, is a mathematical function of one or more variables whose range is a set of multidimensional vectors or infinite-dimensional vectors.
- The input of a vector-valued function could be a scalar or a vector (that is, the dimension of the domain could be 1 or greater than 1);
- the dimension of the function’s domain has no relation to the dimension of its range.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了