- Matrix calculus
In mathematics, matrix calculus is a specialized notation for doing multivariable calculus, especially over spaces of matrices, where it defines the matrix derivative. This notation was to describe systems of differential equations, and taking derivatives of matrix-valued functions with respect to matrix variables. This notation is commonly used in statistics and engineering, while the tensor index notation is preferred in physics.
Note this article uses an alternate definition for vector and matrix calculus than the form often encountered within the field of estimation theory and pattern recognition. The resulting equations therefore appear to be transposed when compared to the equations used in textbooks within these fields.
- 1 Notation
- 2 Vector calculus
- 3 Matrix calculus
- 4 Identities
- 5 Examples
- 6 Relation to other derivatives
- 7 Usages
- 8 Alternatives
- 9 See also
- 10 Notes
- 11 External links
Let M(n,m) denote the space of real n×m matrices with n rows and m columns, such matrices will be denoted using bold capital letters: A, X, Y, etc. An element of M(n,1), that is, a column vector, is denoted with a boldface lowercase letter: a, x, y, etc. An element of M(1,1) is a scalar, denoted with lowercase italic typeface: a, t, x, etc. XT denotes matrix transpose, tr(X) is trace, and det(X) is the determinant. All functions are assumed to be of differentiability class C1 unless otherwise noted. Generally letters from first half of the alphabet (a, b, c, …) will be used to denote constants, and from the second half (t, x, y, …) to denote variables.
Because the space M(n,1) is identified with the Euclidean space Rn and M(1,1) is identified with R, the notations developed here can accommodate the usual operations of vector calculus.
- The tangent vector to a curve x : R → Rn is
- The gradient of a scalar function f : Rn → R
- The pushforward or differential of a function f : Rm → Rn is described by the Jacobian matrix
For the purposes of defining derivatives of simple functions, not much changes with matrix spaces; the space of n×m matrices is isomorphic to the vector space Rnm.[dubious ] The three derivatives familiar from vector calculus have close analogues here, though beware the complications that arise in the identities below.
- The tangent vector of a curve F : R → M(n,m)
- The gradient of a scalar function f : M(n,m) → R
- The differential or the matrix derivative of a function F : M(n,m) → M(p,q) is an element of M(p,q) ⊗ M(m,n), a fourth-rank tensor (the reversal of m and n here indicates the dual space of M(n,m)). In short it is an m×n matrix each of whose entries is a p×q matrix.
- as formal block matrices.
According to Jan R. Magnus and Heinz Neudecker, the following notations are both unsuitable, as the determinants of the resulting matrices would have "no interpretation" and "a useful chain rule does not exist" if these notations are being used:
The Jacobian matrix, according to Magnus and Neudecker, is
Note that matrix multiplication is not commutative, so in these identities, the order must not be changed.
- Chain rule: If Z is a function of Y which in turn is a function of X, and these are all column vectors, then 
- Product rule:In all cases where the derivatives do not involve tensor products (for example, Y has more than one row and X has more than one column),
Derivative of linear functions
This section lists some commonly used vector derivative formulas for linear equations evaluating to a vector.
Derivative of quadratic functions
This section lists some commonly used vector derivative formulas for quadratic matrix equations evaluating to a scalar.
Related to this is the derivative of the Euclidean norm:
Derivative of matrix traces
This section shows examples of matrix differentiation of common trace equations.
Derivative of matrix determinant
Relation to other derivatives
The matrix derivative is a convenient notation for keeping track of partial derivatives for doing calculations. The Fréchet derivative is the standard way in the setting of functional analysis to take derivatives with respect to vectors. In the case that a matrix function of a matrix is Fréchet differentiable, the two derivatives will agree up to translation of notations. As is the case in general for partial derivatives, some formulae may extend under weaker analytic conditions than the existence of the derivative as approximating linear mapping.
Matrix calculus is used for deriving optimal stochastic estimators, often involving the use of Lagrange multipliers. This includes the derivation of:
The tensor index notation with its Einstein summation convention is very similar to the matrix calculus, except one writes only a single component at a time. It has the advantage that one can easily manipulate arbitrarily high rank tensors, whereas tensors of rank higher than two are quite unwieldy with matrix notation. Note that a matrix can be considered simply a tensor of rank two.
- ^ a b Magnus, Jan R.; Neudecker, Heinz (1999 (1988)). Matrix Differential Calculus. Wiley Series in Probability and Statistics (revised ed.). Wiley. pp. 171–173.
- ^ Introduction to Finite Element Methods http://www.colorado.edu/engineering/CAS/courses.d/IFEM.d/ p. D 5
- ^ Duchi, John C. "Properties of the Trace and Matrix Derivatives". University of California at Berkeley. http://www.cs.berkeley.edu/~jduchi/projects/matrix_prop.pdf. Retrieved 19 July 2011.
- ^ "Derivation of Derivative of Determinant". http://en.wikipedia.org/wiki/Determinant#Derivative.
- Matrix Calculus appendix from Introduction to Finite Element Methods book on University of Colorado at Boulder. Uses the Hessian (transpose to Jacobian) definition of vector and matrix derivatives.
- Matrix calculus Matrix Reference Manual , Imperial College London.
- The Matrix Cookbook, with a derivatives chapter. Uses the Hessian definition.
- Linear Algebra and its applications, Chapter 9, by Peter Lax
-  Matrix Differentiation
Wikimedia Foundation. 2010.
Look at other dictionaries:
matrix calculus — a white to light tan urinary calculus of a doughy consistency, containing calcium salts in an organic matrix of a mucoprotein and a sulfated mucopolysaccharide … Medical dictionary
Calculus (disambiguation) — Calculus is Latin for pebble, and has a number of meanings in English: In mathematics and computer science Calculus , in its most general sense, is any method or system of calculation. To modern theoreticians the answer to the question what is a… … Wikipedia
Matrix (mathematics) — Specific elements of a matrix are often denoted by a variable with two subscripts. For instance, a2,1 represents the element at the second row and first column of a matrix A. In mathematics, a matrix (plural matrices, or less commonly matrixes)… … Wikipedia
Matrix — Contents 1 Science and mathematics 2 Technology 3 Arts and entertainment … Wikipedia
Matrix function — In mathematics, a matrix function is a function which maps a matrix to another matrix. Contents 1 Extending scalar functions to matrix functions 1.1 Power series 1.2 Jordan decomposition … Wikipedia
Calculus — This article is about the branch of mathematics. For other uses, see Calculus (disambiguation). Topics in Calculus Fundamental theorem Limits of functions Continuity Mean value theorem Differential calculus Derivative Change of variables … Wikipedia
Calculus with polynomials — Topics in Calculus Fundamental theorem Limits of functions Continuity Mean value theorem Differential calculus Derivative Change of variables Implicit differentiation Taylor s theorem Related rates … Wikipedia
Calculus of constructions — The calculus of constructions (CoC) is a higher order typed lambda calculus, initially developed by Thierry Coquand, where types are first class values. It is thus possible, within the CoC, to define functions from, say, integers to types, types… … Wikipedia
Calculus — A stone, as in the urinary tract. Also, the calcium salt deposits on the teeth. The word calculus in Latin means a pebble. Pebbles were once used for counting, from which came the mathematical field of calculus. A urinary calculus is a pebble in… … Medical dictionary
Calculus (dental) — Heavy staining and calculus deposits exhibited on the lingual surface of the mandibular anterior teeth, along the gumline. In dentistry, calculus or tartar is a form of hardened dental plaque. It is caused by the continual accumulation of… … Wikipedia