Skip to content
ImagineWorld

Appendix A — Useful Facts from Algebra and Calculus

node_idnode-book_deep-generative-modeling_appendix-a-useful-facts-from-algebra-and-calculus
node_typebook-part
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_titleAppendix A — Useful Facts from Algebra and Calculus
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Appendix A — Useful Facts from Algebra and Calculus

Section titled “Appendix A — Useful Facts from Algebra and Calculus”

Appendix A Useful Facts from Algebra and Calculus

A.1 Norms & Inner Products

Norm Definition Norm is a function ∥⋅∥:X→R+\|\cdot\| : \mathbb{X} \to \mathbb{R}_+ with the following properties:

  1. ∥x∥=0⇔x=0\|\mathbf{x}\| = 0 \Leftrightarrow \mathbf{x} = \mathbf{0},
  2. ∥αx∥=∣α∣∥x∥\|\alpha \mathbf{x}\| = |\alpha| \|\mathbf{x}\|, where α∈R\alpha \in \mathbb{R},
  3. ∥x+y∥≤∥x∥+∥y∥\|\mathbf{x} + \mathbf{y}\| \leq \|\mathbf{x}\| + \|\mathbf{y}\|.

Inner Product Definition The inner product is a function ⟨⋅,⋅⟩:X×X→R\langle \cdot, \cdot \rangle : \mathbb{X} \times \mathbb{X} \to \mathbb{R} with the following properties:

  1. ⟨x,x⟩≥0\langle \mathbf{x}, \mathbf{x} \rangle \geq 0,
  2. ⟨x,y⟩=⟨y,x⟩\langle \mathbf{x}, \mathbf{y} \rangle = \langle \mathbf{y}, \mathbf{x} \rangle,
  3. ⟨αx,y⟩=α⟨x,y⟩\langle \alpha \mathbf{x}, \mathbf{y} \rangle = \alpha \langle \mathbf{x}, \mathbf{y} \rangle,
  4. ⟨x+z,y⟩=⟨x,y⟩+⟨z,y⟩\langle \mathbf{x} + \mathbf{z}, \mathbf{y} \rangle = \langle \mathbf{x}, \mathbf{y} \rangle + \langle \mathbf{z}, \mathbf{y} \rangle.

Chosen Properties of Norm and Inner Product

  • ⟨x,x⟩=∥x∥2\langle \mathbf{x}, \mathbf{x} \rangle = \|\mathbf{x}\|^2,
  • ∣⟨x,y⟩∣≤∥x∥∥y∥|\langle \mathbf{x}, \mathbf{y} \rangle| \leq \|\mathbf{x}\| \|\mathbf{y}\| (for a vector in RD\mathbb{R}^D ⟨x,y⟩=∥x∥∥y∥cos⁡θ\langle \mathbf{x}, \mathbf{y} \rangle = \|\mathbf{x}\| \|\mathbf{y}\| \cos \theta),
  • ∥x+y∥2=∥x∥2+2⟨x,y⟩+∥y∥2\|\mathbf{x} + \mathbf{y}\|^2 = \|\mathbf{x}\|^2 + 2 \langle \mathbf{x}, \mathbf{y} \rangle + \|\mathbf{y}\|^2.
  • ∥x−y∥2=∥x∥2−2⟨x,y⟩+∥y∥2\|\mathbf{x} - \mathbf{y}\|^2 = \|\mathbf{x}\|^2 - 2 \langle \mathbf{x}, \mathbf{y} \rangle + \|\mathbf{y}\|^2.

A.2 Matrix Calculus

Linear Dependency Let ϕm\phi_m be a non-linear transformation, and x∈RM\mathbf{x} \in \mathbb{R}^M. A linear product of these two vectors is:

© The Author(s), under exclusive license to Springer Nature Switzerland AG 2022 J. M. Tomczak, Deep Generative Modeling, https://doi.org/10.1007/978-3-030-93158-2

A Useful Facts from Algebra and Calculus

ϕ(x)Tw=w0ϕ0(x)+w1ϕ1(x)+…+wM−1ϕM−1(x)\phi(\mathbf{x})^{\mathrm{T}} \mathbf{w} = w_0 \phi_0(\mathbf{x}) + w_1 \phi_1(\mathbf{x}) + \ldots + w_{M-1} \phi_{M-1}(\mathbf{x}) =∑m=0M−1wmϕm(x),= \sum_{m=0}^{M-1} w_m \phi_m(\mathbf{x}),

where w=(w0  w1…wM−1)T\mathbf{w} = (w_0 \; w_1 \ldots w_{M-1})^{\mathrm{T}}, ϕ(x)=(ϕ0(x)  ϕ1(x)…ϕM−1(x))T\phi(\mathbf{x}) = (\phi_0(\mathbf{x}) \; \phi_1(\mathbf{x}) \ldots \phi_{M-1}(\mathbf{x}))^{\mathrm{T}}.

Orthogonal and Orthonormal Vectors

Vectors x\mathbf{x} and y\mathbf{y} are orthogonal vectors if ⟨x,y⟩=0\langle \mathbf{x}, \mathbf{y} \rangle = 0. Additionally, if ∥x∥=∥y∥=1\|\mathbf{x}\| = \|\mathbf{y}\| = 1, these vectors are called orthonormal.

Chosen Properties of Matrix Calculus

  • (AB)−1=B−1A−1(\mathbf{A}\mathbf{B})^{-1} = \mathbf{B}^{-1}\mathbf{A}^{-1}
  • (AB)T=BTAT(\mathbf{A}\mathbf{B})^{\mathrm{T}} = \mathbf{B}^{\mathrm{T}}\mathbf{A}^{\mathrm{T}}
  • Matrix A\mathbf{A} is positive definite ⇔\Leftrightarrow for all vectors such that x≠0\mathbf{x} \neq 0 the following inequality holds true xTAx>0\mathbf{x}^{\mathrm{T}}\mathbf{A}\mathbf{x} > 0
  • ∇xxTx=2x\nabla_{\mathbf{x}} \mathbf{x}^{\mathrm{T}} \mathbf{x} = 2\mathbf{x}
  • ∇x∥W12(b−Ax)∥22=−2ATW(b−Ax)\nabla_{\mathbf{x}} \|\mathbf{W}^{\frac{1}{2}}(\mathbf{b} - \mathbf{A}\mathbf{x})\|_2^2 = -2\mathbf{A}^{\mathrm{T}}\mathbf{W}(\mathbf{b} - \mathbf{A}\mathbf{x}), where W\mathbf{W} is a symmetric matrix

For given vectors x,y\mathbf{x}, \mathbf{y} and a matrix A\mathbf{A}, which is symmetric and positive definite, one gets

∂∂y(x−y)TA(x−y)=−2A(x−y)\frac{\partial}{\partial \mathbf{y}} (\mathbf{x} - \mathbf{y})^{\mathrm{T}} \mathbf{A} (\mathbf{x} - \mathbf{y}) = -2\mathbf{A}(\mathbf{x} - \mathbf{y}) ∂∂A(1ndet⁡(A))=A−1\frac{\partial}{\partial \mathbf{A}} \left( \frac{1}{n} \det(\mathbf{A}) \right) = \mathbf{A}^{-1}

Special Cases of Invertible Matrices

A−1=[abcd]−1=1ad−bc[d−b−ca]\mathbf{A}^{-1} = \begin{bmatrix} a & b \\ c & d \end{bmatrix}^{-1} = \frac{1}{ad - bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} A−1=[abcdefghk]−1=1det⁡A[(ek−fh)(ch−bk)(bf−ce)(fg−dk)(ak−cg)(cd−af)(dh−eg)(bg−ah)(ae−bd)]\mathbf{A}^{-1} = \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & k \end{bmatrix}^{-1} = \frac{1}{\det \mathbf{A}} \begin{bmatrix} (ek - fh) & (ch - bk) & (bf - ce) \\ (fg - dk) & (ak - cg) & (cd - af) \\ (dh - eg) & (bg - ah) & (ae - bd) \end{bmatrix}