Matrix Calculus

Total Page:16

File Type:pdf, Size:1020Kb

Matrix Calculus D Matrix Calculus D–1 Appendix D: MATRIX CALCULUS D–2 In this Appendix we collect some useful formulas of matrix calculus that often appear in finite element derivations. §D.1 THE DERIVATIVES OF VECTOR FUNCTIONS Let x and y be vectors of orders n and m respectively: x1 y1 x2 y2 x = . , y = . ,(D.1) . xn ym where each component yi may be a function of all the xj , a fact represented by saying that y is a function of x,or y = y(x). (D.2) If n = 1, x reduces to a scalar, which we call x.Ifm = 1, y reduces to a scalar, which we call y. Various applications are studied in the following subsections. §D.1.1 Derivative of Vector with Respect to Vector The derivative of the vector y with respect to vector x is the n × m matrix ∂y1 ∂y2 ∂ym ∂ ∂ ··· ∂ x1 x1 x1 ∂ ∂ ∂ ∂ y1 y2 ··· ym y def ∂x ∂x ∂x = 2 2 2 (D.3) ∂x . . .. ∂ ∂ ∂ y1 y2 ··· ym ∂xn ∂xn ∂xn §D.1.2 Derivative of a Scalar with Respect to Vector If y is a scalar, ∂y ∂x1 ∂ ∂ y y def ∂ = x2 .(D.4) ∂x . . ∂y ∂xn §D.1.3 Derivative of Vector with Respect to Scalar If x is a scalar, ∂y def ∂ ∂ ∂ = y1 y2 ... ym (D.5) ∂x ∂x ∂x ∂x D–2 D–3 §D.1 THE DERIVATIVES OF VECTOR FUNCTIONS REMARK D.1 Many authors, notably in statistics and economics, define the derivatives as the transposes of those given above.1 This has the advantage of better agreement of matrix products with composition schemes such as the chain rule. Evidently the notation is not yet stable. EXAMPLE D.1 Given x1 y1 y = , x = x2 (D.6) y2 x3 and 2 y1 = x − x 1 2 (D.7) = 2 + y2 x3 3x2 the partial derivative matrix ∂y/∂x is computed as follows: ∂ ∂ y1 y2 ∂x1 ∂x1 ∂y ∂ ∂ 2x1 0 = y1 y2 = − ( . ) ∂ ∂ 13 D 8 ∂x x2 x2 02x3 ∂y1 ∂y2 ∂x3 ∂x3 §D.1.4 Jacobian of a Variable Transformation In multivariate analysis, if x and y are of the same order, the determinant of the square matrix ∂x/∂y, that is ∂x J = (D.9) ∂y is called the Jacobian of the transformation determined by y = y(x). The inverse determinant is ∂ −1 y J = .(D.10) ∂x 1 One authors puts is this way: “When one does matrix calculus, one quickly finds that there are two kinds of people in this world: those who think the gradient is a row vector, and those who think it is a column vector.” D–3 Appendix D: MATRIX CALCULUS D–4 EXAMPLE D.2 The transformation from spherical to Cartesian coordinates is defined by x = r sin θ cos ψ, y = r sin θ sin ψ, z = r cos θ(D.11) where r > 0, 0 <θ<πand 0 ≤ ψ<2π. To obtain the Jacobian of the transformation, let x ≡ x , y ≡ x , z ≡ x 1 2 3 (D.12) r ≡ y1,θ≡ y2,ψ≡ y3 Then ∂ sin y2 cos y3 sin y2 sin y3 cos y2 = x = − J y1 cos y2 cos y3 y1 cos y2 sin y3 y1 sin y2 ∂y (D.13) −y1 sin y2 sin y3 y1 sin y2 cos y3 0 = 2 = 2 θ. y1 sin y2 r sin The foregoing definitions can be used to obtain derivatives to many frequently used expressions, including quadratic and bilinear forms. EXAMPLE D.3 Consider the quadratic form y = xT Ax (D.14) where A is a square matrix of order n. Using the definition (D.3) one obtains ∂y = Ax + AT x (D.15) ∂x and if A is symmetric, ∂y = 2Ax.(D.16) ∂x We can of course continue the differentiation process: ∂2 y ∂ ∂y = = A + AT ,(D.17) ∂x2 ∂x ∂x and if A is symmetric, ∂2 y = 2A.(D.18) ∂x2 The following table collects several useful vector derivative formulas. ∂y y ∂x Ax AT xT AA xT x 2x xT Ax Ax + AT x D–4 D–5 §D.2 THE CHAIN RULE FOR VECTOR FUNCTIONS §D.2 THE CHAIN RULE FOR VECTOR FUNCTIONS Let x1 y1 z1 x2 y2 z2 x = . , y = . and z = . (D.19) . xn yr zm where z is a function of y, which is in turn a function of x. Using the definition (D.2), we can write ∂ ∂ ∂ z1 z1 ... z1 ∂x1 ∂x2 ∂xn ∂ ∂ ∂ T z2 z2 ... z2 ∂z ∂x ∂x ∂x = 1 2 n ( . ) ∂ . D 20 x . ∂ ∂ ∂ zm zm ... zm ∂x1 ∂x2 ∂xn Each entry of this matrix may be expanded as r ∂zi ∂zi ∂yq i = 1, 2,...,m = (D.21) ∂ ∂ ∂ j = 1, 2,...,n. xj q=1 yq xj Then ∂ ∂y ∂ ∂y ∂ ∂y z1 q z1 q ... z2 q ∂ ∂ ∂ ∂ ∂ yq x1 yq x2 yq xn ∂ ∂y ∂ ∂y ∂ ∂y T z2 q z2 q ... z2 q ∂z ∂y ∂x ∂y ∂x ∂y ∂x = q 1 q 2 q n ∂ . x . ∂ ∂y ∂ ∂y ∂ ∂y zm q zm q ... zm q ∂yq ∂x1 ∂yq ∂x2 ∂yq ∂xn ∂ ∂ ∂ ∂ ∂ ∂ z1 z1 ... z1 y1 y1 ... y1 ∂y1 ∂y2 ∂yr ∂x1 ∂x2 ∂xn ∂ ∂ ∂ ∂ ∂ ∂ z2 z2 ... z2 y2 y2 ... y2 ∂ ∂ ∂ ∂ ∂ ∂ y1 y2 yr x1 x2 xn = . . . . ∂ ∂ ∂ ∂ ∂ ∂ zm zm ... zm yr yr ... yr ∂y ∂y ∂y ∂x ∂x ∂x 1 2 r 1 2 n ∂z T ∂y T ∂y ∂z T = = .(D.22) ∂y ∂x ∂x ∂y On transposing both sides, we finally obtain ∂z ∂y ∂z = ,(D.23) ∂x ∂x ∂y which is the chain rule for vectors. If all vectors reduce to scalars, ∂z ∂y ∂z ∂z ∂y = = ,(D.24) ∂x ∂x ∂y ∂y ∂x D–5 Appendix D: MATRIX CALCULUS D–6 which is the conventional chain rule of calculus. Note, however, that when we are dealing with vectors, the chain of matrices builds “toward the left.” For example, if w is a function of z, which is a function of y, which is a function of x, ∂w ∂y ∂z ∂w = .(D.25) ∂x ∂x ∂y ∂z On the other hand, in the ordinary chain rule one can indistictly build the product to the right or to the left because scalar multiplication is commutative. §D.3 THE DERIVATIVE OF SCALAR FUNCTIONS OF A MATRIX Let X = (xij) be a matrix of order (m × n) and let y = f (X), (D.26) be a scalar function of X. The derivative of y with respect to X, denoted by ∂y ,(D.27) ∂X is defined as the following matrix of order (m × n): ∂y ∂y ... ∂y ∂x ∂x ∂x 11 12 1n ∂y ∂y ... ∂y ∂y ∂ ∂ ∂ ∂y ∂y G = = x21 x22 x2n = = E ,(D.28) ∂ . ∂ ij ∂ X . xij i, j xij ∂y ∂y ... ∂y ∂xm1 ∂xm2 ∂xmn where Eij denotes the elementary matrix* of order (m × n). This matrix G is also known as a gradient matrix. EXAMPLE D.4 Find the gradient matrix if y is the trace of a square matrix X of order n, that is n y = tr(X) = xii.(D.29) i=1 Obviously all non-diagonal partials vanish whereas the diagonal partials equal one, thus ∂y G = = I,(D.30) ∂X where I denotes the identity matrix of order n. * The elementary matrix Eij of order m × n has all zero entries except for the (i, j) entry, which is one. D–6 D–7 §D.4 THE MATRIX DIFFERENTIAL §D.3.1 Functions of a Matrix Determinant An important family of derivatives with respect to a matrix involves functions of the determinant of a matrix, for example y =|X| or y =|AX|. Suppose that we have a matrix Y = [yij] whose components are functions of a matrix X = [xrs], that is yij = fij(xrs), and set out to build the matrix ∂|Y| .(D.31) ∂X Using the chain rule we can write ∂| | ∂| | ∂ Y = Y yij .(. ) ∂ Yij ∂ ∂ D 32 xrs i j yij xrs But |Y|= yijYij,(D.33) j where Yij is the cofactor of the element yij in |Y|. Since the cofactors Yi1, Yi2, ... are independent of the element yij,wehave ∂|Y| = Yij.(D.34) ∂yij It follows that ∂| | ∂ Y = yij .(. ) ∂ Yij ∂ D 35 xrs i j xrs There is an alternative form of this result which is ocassionally useful. Define ∂yij aij = Yij, A = [aij], bij = , B = [bij].(D.36) ∂xrs Then it can be shown that ∂|Y| = tr(ABT ) = tr(BT A). (D.37) ∂xrs EXAMPLE D.5 If X is a nonsingular square matrix and Z =|X|X−1 its cofactor matrix, ∂|X| G = = ZT .(D.38) ∂X If X is also symmetric, ∂|X| G = = 2ZT − diag(ZT ). (D.39) ∂X D–7 Appendix D: MATRIX CALCULUS D–8 §D.4 THE MATRIX DIFFERENTIAL For a scalar function f (x), where x is an n-vector, the ordinary differential of multivariate calculus is defined as n ∂ = f .(. ) df ∂ dxi D 40 i=1 xi In harmony with this formula, we define the differential of an m × n matrix X = [xij]tobe dx11 dx12 ... dx1n dx21 dx22 ... dx2n dX def= . .(D.41) . dxm1 dxm2 ... dxmn This definition complies with the multiplicative and associative rules d(αX) = α dX, d(X + Y) = dX + dY.(D.42) If X and Y are product-conforming matrices, it can be verified that the differential of their product is d(XY) = (dX)Y + X(dY). (D.43) which is an extension of the well known rule d(xy) = ydx+ xdyfor scalar functions. EXAMPLE D.6 −1 If X = [xij] is a square nonsingular matrix of order n, and denote Z =|X|X . Find the differential of the determinant of X: ∂| | X −1 T T d|X|= dxij = Xij dxij = tr(|X|X ) dX) = tr(Z dX), (D.44) ∂xij i, j i, j where Xij denotes the cofactor of xij in X.
Recommended publications
  • Mathematics for Dynamicists - Lecture Notes Thomas Michelitsch
    Mathematics for Dynamicists - Lecture Notes Thomas Michelitsch To cite this version: Thomas Michelitsch. Mathematics for Dynamicists - Lecture Notes. Doctoral. Mathematics for Dynamicists, France. 2006. cel-01128826 HAL Id: cel-01128826 https://hal.archives-ouvertes.fr/cel-01128826 Submitted on 10 Mar 2015 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Mathematics for Dynamicists Lecture Notes c 2004-2006 Thomas Michael Michelitsch1 Department of Civil and Structural Engineering The University of Sheffield Sheffield, UK 1Present address : http://www.dalembert.upmc.fr/home/michelitsch/ . Dedicated to the memory of my parents Michael and Hildegard Michelitsch Handout Manuscript with Fractal Cover Picture by Michael Michelitsch https://www.flickr.com/photos/michelitsch/sets/72157601230117490 1 Contents Preface 1 Part I 1.1 Binomial Theorem 1.2 Derivatives, Integrals and Taylor Series 1.3 Elementary Functions 1.4 Complex Numbers: Cartesian and Polar Representation 1.5 Sequences, Series, Integrals and Power-Series 1.6 Polynomials and Partial Fractions
    [Show full text]
  • Matrix Calculus
    Appendix D Matrix Calculus From too much study, and from extreme passion, cometh madnesse. Isaac Newton [205, §5] − D.1 Gradient, Directional derivative, Taylor series D.1.1 Gradients Gradient of a differentiable real function f(x) : RK R with respect to its vector argument is defined uniquely in terms of partial derivatives→ ∂f(x) ∂x1 ∂f(x) , ∂x2 RK f(x) . (2053) ∇ . ∈ . ∂f(x) ∂xK while the second-order gradient of the twice differentiable real function with respect to its vector argument is traditionally called the Hessian; 2 2 2 ∂ f(x) ∂ f(x) ∂ f(x) 2 ∂x1 ∂x1∂x2 ··· ∂x1∂xK 2 2 2 ∂ f(x) ∂ f(x) ∂ f(x) 2 2 K f(x) , ∂x2∂x1 ∂x2 ··· ∂x2∂xK S (2054) ∇ . ∈ . .. 2 2 2 ∂ f(x) ∂ f(x) ∂ f(x) 2 ∂xK ∂x1 ∂xK ∂x2 ∂x ··· K interpreted ∂f(x) ∂f(x) 2 ∂ ∂ 2 ∂ f(x) ∂x1 ∂x2 ∂ f(x) = = = (2055) ∂x1∂x2 ³∂x2 ´ ³∂x1 ´ ∂x2∂x1 Dattorro, Convex Optimization Euclidean Distance Geometry, Mεβoo, 2005, v2020.02.29. 599 600 APPENDIX D. MATRIX CALCULUS The gradient of vector-valued function v(x) : R RN on real domain is a row vector → v(x) , ∂v1(x) ∂v2(x) ∂vN (x) RN (2056) ∇ ∂x ∂x ··· ∂x ∈ h i while the second-order gradient is 2 2 2 2 , ∂ v1(x) ∂ v2(x) ∂ vN (x) RN v(x) 2 2 2 (2057) ∇ ∂x ∂x ··· ∂x ∈ h i Gradient of vector-valued function h(x) : RK RN on vector domain is → ∂h1(x) ∂h2(x) ∂hN (x) ∂x1 ∂x1 ··· ∂x1 ∂h1(x) ∂h2(x) ∂hN (x) h(x) , ∂x2 ∂x2 ··· ∂x2 ∇ .
    [Show full text]
  • Higher Order Derivatives 1 Chapter 3 Higher Order Derivatives
    Higher order derivatives 1 Chapter 3 Higher order derivatives You certainly realize from single-variable calculus how very important it is to use derivatives of orders greater than one. The same is of course true for multivariable calculus. In particular, we shall de¯nitely want a \second derivative test" for critical points. A. Partial derivatives First we need to clarify just what sort of domains we wish to consider for our functions. So we give a couple of de¯nitions. n DEFINITION. Suppose x0 2 A ½ R . We say that x0 is an interior point of A if there exists r > 0 such that B(x0; r) ½ A. A DEFINITION. A set A ½ Rn is said to be open if every point of A is an interior point of A. EXAMPLE. An open ball is an open set. (So we are fortunate in our terminology!) To see this suppose A = B(x; r). Then if y 2 A, kx ¡ yk < r and we can let ² = r ¡ kx ¡ yk: Then B(y; ²) ½ A. For if z 2 B(y; ²), then the triangle inequality implies kz ¡ xk · kz ¡ yk + ky ¡ xk < ² + ky ¡ xk = r; so that z 2 A. Thus B(y; ²) ½ B(x; r) (cf. Problem 1{34). This proves that y is an interior point of A. As y is an arbitrary point of A, we conclude that A is open. PROBLEM 3{1. Explain why the empty set is an open set and why this is actually a problem about the logic of language rather than a problem about mathematics.
    [Show full text]
  • Kronecker Products and Matrix Calculus in System Theory
    772 IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS, VOL. CAS-25, NO. 9, ISEFTEMBER 1978 Kronecker Products and Matrix Calculus in System Theory JOHN W. BREWER I Absfrucr-The paper begins with a review of the algebras related to and are based on the developments of Section IV. Also, a Kronecker products. These algebras have several applications in system novel and interesting operator notation will ble introduced theory inclluding the analysis of stochastic steady state. The calculus of matrk valued functions of matrices is reviewed in the second part of the in Section VI. paper. This cakuhs is then used to develop an interesting new method for Concluding comments are placed in Section VII. the identification of parameters of linear time-invariant system models. II. NOTATION I. INTRODUCTION Matrices will be denoted by upper case boldface (e.g., HE ART of differentiation has many practical ap- A) and column matrices (vectors) will be denoted by T plications in system analysis. Differentiation is used lower case boldface (e.g., x). The kth row of a matrix such. to obtain necessaryand sufficient conditions for optimiza- as A will be denoted A,. and the kth colmnn will be tion in a.nalytical studies or it is used to obtain gradients denoted A.,. The ik element of A will be denoted ujk. and Hessians in numerical optimization studies. Sensitiv- The n x n unit matrix is denoted I,,. The q-dimensional ity analysis is yet another application area for. differentia- vector which is “I” in the kth and zero elsewhereis called tion formulas. In turn, sensitivity analysis is applied to the the unit vector and is denoted design of feedback and adaptive feedback control sys- tems.
    [Show full text]
  • Appendix D Matrix Calculus
    Appendix D Matrix calculus From too much study, and from extreme passion, cometh madnesse. Isaac Newton [86, §5] − D.1 Directional derivative, Taylor series D.1.1 Gradients Gradient of a differentiable real function f(x) : RK R with respect to its vector domain is defined → ∂f(x) ∂x1 ∂f(x) ∆ K f(x) = ∂x2 R (1354) ∇ . ∈ . ∂f(x) ∂xK while the second-order gradient of the twice differentiable real function with respect to its vector domain is traditionally called the Hessian ; ∂2f(x) ∂2f(x) ∂2f(x) 2 ∂ x1 ∂x1∂x2 ··· ∂x1∂xK ∂2f(x) ∂2f(x) ∂2f(x) ∆ 2 K 2 ∂x2∂x1 ∂ x2 ∂x2∂x S f(x) = . ··· . K (1355) ∇ . ... ∈ . ∂2f(x) ∂2f(x) ∂2f(x) 2 1 2 ∂xK ∂x ∂xK ∂x ··· ∂ xK © 2001 Jon Dattorro. CO&EDG version 04.18.2006. All rights reserved. 501 Citation: Jon Dattorro, Convex Optimization & Euclidean Distance Geometry, Meboo Publishing USA, 2005. 502 APPENDIX D. MATRIX CALCULUS The gradient of vector-valued function v(x) : R RN on real domain is a row-vector → ∆ v(x) = ∂v1(x) ∂v2(x) ∂vN (x) RN (1356) ∇ ∂x ∂x ··· ∂x ∈ h i while the second-order gradient is 2 2 2 2 ∆ ∂ v1(x) ∂ v2(x) ∂ vN (x) N v(x) = 2 2 2 R (1357) ∇ ∂x ∂x ··· ∂x ∈ h i Gradient of vector-valued function h(x) : RK RN on vector domain is → ∂h1(x) ∂h2(x) ∂hN (x) ∂x1 ∂x1 ··· ∂x1 ∂h1(x) ∂h2(x) ∂hN (x) ∆ ∂x2 ∂x2 ∂x2 h(x) = . ··· . ∇ . . (1358) ∂h1(x) ∂h2(x) ∂hN (x) ∂x ∂x ∂x K K ··· K K×N = [ h (x) h (x) hN (x) ] R ∇ 1 ∇ 2 · · · ∇ ∈ while the second-order gradient has a three-dimensional representation dubbed cubix ;D.1 ∂h1(x) ∂h2(x) ∂hN (x) ∇ ∂x1 ∇ ∂x1 · · · ∇ ∂x1 ∂h1(x) ∂h2(x) ∂hN (x) ∆ 2 ∂x2 ∂x2 ∂x2 h(x) = ∇ .
    [Show full text]
  • Fractional Differential Forms II
    Fractional Differential Forms II Kathleen Cotrill-Shepherd and Mark Naber Department of Mathematics Monroe County Community College Monroe, Michigan, 48161-9746 [email protected] ABSTRACT This work further develops the properties of fractional differential forms. In particular, finite dimensional subspaces of fractional form spaces are considered. An inner product, Hodge dual, and covariant derivative are defined. Coordinate transformation rules for integral order forms are also computed. Matrix order fractional calculus is used to define matrix order forms. This is achieved by combining matrix order derivatives with exterior derivatives. Coordinate transformation rules and covariant derivative for matrix order forms are also produced. The Poincaré lemma is shown to be true for exterior fractional arXiv:math-ph/0301016 13 Jan 2003 differintegrals of all orders excluding those whose orders are non-diagonalizable matrices. AMS subject classification: Primary: 58A10; Secondary: 26A33. Key words and phrases: Fractional differential forms, Fractional differintegrals, Matrix order differintegrals. 1 1. Introduction. The use of differential forms in physics, differential geometry, and applied mathematics is well known and wide spread. There is also a growing use of differential forms in mathematical finance [23], [3]. Many partial differential equations are expressible in terms of differential forms. This notation allows for insights and a geometric understanding of the quantities involved. Recently Maxwell’s equations have been generalized using fractional derivatives, in part, to better understand multipole moments [5]-[8]. Kobelev has also generalized Maxwell’s and Einstein’s equations with fractional derivatives for study on multifractal sets [10]-[12]. Many of the differential equations of finance have also been fractionalized to better predict the pricing of options and equities in financial markets [1], [22], [24], [25].
    [Show full text]
  • Matrix Differential Calculus with Applications to Simple, Hadamard, and Kronecker Products
    JOURNAL OF MATHEMATICAL PSYCHOLOGY 29, 414492 (1985) Matrix Differential Calculus with Applications to Simple, Hadamard, and Kronecker Products JAN R. MAGNUS London School of Economics AND H. NEUDECKER University of Amsterdam Several definitions are in use for the derivative of an mx p matrix function F(X) with respect to its n x q matrix argument X. We argue that only one of these definitions is a viable one, and that to study smooth maps from the space of n x q matrices to the space of m x p matrices it is often more convenient to study the map from nq-space to mp-space. Also, several procedures exist for a calculus of functions of matrices. It is argued that the procedure based on differentials is superior to other methods of differentiation, and leads inter alia to a satisfactory chain rule for matrix functions. c! 1985 Academic Press, Inc 1. INTRODUCTION In mathematical psychology (among other disciplines) matrix calculus has become an important tool. Several definitions are in use for the derivative of a matrix function F(X) with respect to its matrix argument X (see Dwyer & MacPhail, 1948; Dwyer, 1967; Neudecker, 1969; McDonald & Swaminathan, 1973; MacRae, 1974; Balestra, 1976; Nel, 1980; Rogers, 1980; Polasek, 1984). We shall see that only one of these definitions is appropriate. Also, several procedures exist for a calculus of functions of matrices. We shall argue that the procedure based on differentials is superior to other methods of differentiation. These, then, are the two purposes of this paper. We have been inspired to write this paper by Bentler and Lee’s (1978) note.
    [Show full text]
  • Derivatives and Integrals: Matrix Order Operators As an Extension of the Fractional Calculus Cleiton Bittencourt Da Porciúncula
    Derivatives and integrals: matrix order operators as an extension of the fractional calculus Cleiton Bittencourt da Porciúncula UERGS, State University of Rio Grande do Sul, Brazil Independência, Av., Santa Cruz do Sul Campus, ZIP Code: 96816-501 Corresponding author: Phone/Fax Number: +55 51 3715-6926 Email: [email protected] Abstract. A natural consequence of the fractional calculus is its extension to a matrix order of differentiation and integration. A matrix-order derivative definition and a matrix-order integration arise from the generalization of the gamma function applied to the fractional differintegration definition. This work focuses on some results applied to the Riemann- Liouville version of the fractional calculus extended to its matrix-order concept. This extension also may apply to other versions of fractional calculus. Some examples of possible ordinary and partial matrix-order differential equations and related exact solutions are shown. Keywords: matrix-order differintegration, fractional calculus, matrix gamma function, differential operator 1. Introduction There are several good works and reviews about fractional derivatives and integrals. In a general fashion, we may consider a general fractional derivative operator as: 푑훼 푑푝 푥 퐷훼푓(푥) = 푓(푥) = ∫ 퐾 (푥, 푡, 훼)휙 (푓(푡), 푓푛(푡))푑푡 (1.1) 푎 푑푥훼 푑푥푝 푎 퐷 퐷 and a fractional integral operator as: 푥 퐽훼푓(푥) = 퐷−훼푓(푥) = 퐾 (푥, 푡, 훼)휙 (푓(푡), 푓푛(푡))푑푡 푎 ∫푎 퐽 퐽 (1.2) with 훼 ∈ ℂ, 푡, 푥, 푎 ∈ ℜ and 푝 ∈ ℕ. In eqs. (1.1) and (1.2), the kernels 퐾퐷 and 퐾푓 vary according to the version of the fraction differintegration.
    [Show full text]
  • Computing Higher Order Derivatives of Matrix and Tensor Expressions
    Computing Higher Order Derivatives of Matrix and Tensor Expressions Sören Laue Matthias Mitterreiter Friedrich-Schiller-Universität Jena Friedrich-Schiller-Universität Jena Germany Germany [email protected] [email protected] Joachim Giesen Friedrich-Schiller-Universität Jena Germany [email protected] Abstract Optimization is an integral part of most machine learning systems and most nu- merical optimization schemes rely on the computation of derivatives. Therefore, frameworks for computing derivatives are an active area of machine learning re- search. Surprisingly, as of yet, no existing framework is capable of computing higher order matrix and tensor derivatives directly. Here, we close this fundamental gap and present an algorithmic framework for computing matrix and tensor deriva- tives that extends seamlessly to higher order derivatives. The framework can be used for symbolic as well as for forward and reverse mode automatic differentiation. Experiments show a speedup of up to two orders of magnitude over state-of-the-art frameworks when evaluating higher order derivatives on CPUs and a speedup of about three orders of magnitude on GPUs. 1 Introduction Recently, automatic differentiation has become popular in the machine learning community due to its genericity, flexibility, and efficiency. Automatic differentiation lies at the core of most deep learning frameworks and has made deep learning widely accessible. In principle, automatic differentiation can be used for differentiating any code. In practice, however, it is primarily targeted at scalar valued functions. Current algorithms and implementations do not produce very efficient code when computing Jacobians or Hessians that, for instance, arise in the context of constrained optimization problems.
    [Show full text]
  • Matrix Calculus Notes
    Matrix Calculus Notes James Burke 2000 Linear Spaces and Operators X and Y { normed linear spaces with norms k·kx and k·ky. L : X ! Y is a linear transformations (or operators) if L(αx + βz) = αL(x) + βL(z) 8 x; z 2 X and α; β 2 R: L[X; Y] the normed space of continuous linear operators: kT k := sup kT xky 8 T 2 L[X; Y]: kxkx≤1 ∗ X := L[X; R] { topological dual of X with the duality pairing ∗ hφ, xi = φ(x) 8 (φ, x) 2 X × X: The duality pairing gives rise to adjoints of a linear operator: ∗ ∗ ∗ T 2 L[X; Y] defines T 2 L[Y ; X ] by ∗ ∗ ∗ ∗ ∗ hy ; T (x)i = hT (y ); xi 8 (y ; x) 2 Y × X: m i m η { coordinate mapping from Y to R with the basis fy gi=1. Given T 2 L[X; Y], there exist uniquely defined ftij j i = 1; : : : ; m; j = 1; : : : ; ng ⊂ R such that m j X i T x = tijy ; j = 1; : : : ; n: i=1 m×n Therefore, η(T x) = T κ(x) where where (tij) = T 2 R Matrix Representations j n i m fx gj=1 and fy gi=1 are bases for X and Y. Pn j Given x = j=1 ajx 2 X, the linear mapping κ T x −! (a1; : : : ; an) n is a linear isomorphism between X and R and is called the n coordinate mapping from X to R associated with the basis j n fx gj=1.
    [Show full text]
  • Some Important Properties for Matrix Calculus
    Some Important Properties for Matrix Calculus Dawen Liang Carnegie Mellon University [email protected] 1 Introduction Matrix calculation plays an essential role in many machine learning algorithms, among which ma- trix calculus is the most commonly used tool. In this note, based on the properties from the dif- ferential calculus, we show that they are all adaptable to the matrix calculus1. And in the end, an example on least-square linear regression is presented. 2 Notation A matrix is represented as a bold upper letter, e.g. X, where Xm;n indicates the numbers of rows and columns are m and n, respectively. A vector is represented as a bold lower letter, e.g. x, where it is a n × 1 column vector in this note. An important concept for a n × n matrix An;n is the trace Tr(A), which is defined as the sum of the diagonal: n X Tr(A) = Aii (1) i=1 where Aii index the element at the ith row and ith column. 3 Properties The derivative of a matrix is usually referred as the gradient, denoted as r. Consider a function m×n p×q f : R ! R , the gradient for f(A) w.r.t. Am;n is: 0 1 @f @f ··· @f @A11 @A12 @A1n B @f @f ··· @f C @f(A) B @A21 @A22 @A2n C rAf(A) = = B . C @A B . .. C @ . A @f @f ··· @f @Am1 @Am2 @Amn This definition is very similar to the differential derivative, thus a few simple properties hold (the matrix A below is square matrix and has the same dimension with the vectors): T T rxb Ax = b A (2) 1Some of the detailed derivations which are omitted in this note can be found at http://www.cs.berkeley.
    [Show full text]
  • An Exterior Algebraic Derivation of the Euler–Lagrange Equations from the Principle of Stationary Action
    mathematics Article An Exterior Algebraic Derivation of the Euler–Lagrange Equations from the Principle of Stationary Action Ivano Colombaro * , Josep Font-Segura and Alfonso Martinez Department of Information and Communication Technologies, Universitat Pompeu Fabra, 08018 Barcelona, Spain; [email protected] (J.F.-S.); [email protected] (A.M.) * Correspondence: [email protected] Abstract: In this paper, we review two related aspects of field theory: the modeling of the fields by means of exterior algebra and calculus, and the derivation of the field dynamics, i.e., the Euler– Lagrange equations, by means of the stationary action principle. In contrast to the usual tensorial derivation of these equations for field theories, that gives separate equations for the field components, two related coordinate-free forms of the Euler–Lagrange equations are derived. These alternative forms of the equations, reminiscent of the formulae of vector calculus, are expressed in terms of vector derivatives of the Lagrangian density. The first form is valid for a generic Lagrangian density that only depends on the first-order derivatives of the field. The second form, expressed in exterior algebra notation, is specific to the case when the Lagrangian density is a function of the exterior and interior derivatives of the multivector field. As an application, a Lagrangian density for generalized electromagnetic multivector fields of arbitrary grade is postulated and shown to have, by taking the vector derivative of the Lagrangian density, the generalized Maxwell equations as Euler–Lagrange equations. Citation: Colombaro, I.; Font-Segura, J.; Keywords: Euler–Lagrange equations; exterior algebra; exterior calculus; tensor calculus; action Martinez, A.
    [Show full text]