# Multivariate gamma function

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Multivariate_gamma_function
> Markdown URL: https://mediated.wiki/source/Multivariate_gamma_function.md
> Source: https://en.wikipedia.org/wiki/Multivariate_gamma_function
> Source revision: 1353126675
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Multivariate generalization of the gamma function}}
In [mathematics](/source/mathematics), the '''multivariate gamma function''' Γ<sub>''p''</sub> is a generalization of the [gamma function](/source/gamma_function). It is useful in [multivariate statistics](/source/multivariate_statistics), appearing in the [probability density function](/source/probability_density_function) of the [Wishart](/source/Wishart_distribution) and [inverse Wishart distribution](/source/inverse_Wishart_distribution)s, and the [matrix variate beta distribution](/source/matrix_variate_beta_distribution).<ref>{{Cite journal|last=James|first=Alan T.|date=June 1964|title=Distributions of Matrix Variates and Latent Roots Derived from Normal Samples|url=https://projecteuclid.org/euclid.aoms/1177703550|journal=The Annals of Mathematical Statistics|language=en|volume=35|issue=2|pages=475–501|doi=10.1214/aoms/1177703550|issn=0003-4851|doi-access=free}}</ref>

It has two equivalent definitions. One is given as the following integral over the <math>p \times p</math> [positive-definite](/source/positive-definite_matrix) real matrices:

:<math>
\Gamma_p(a)=
\int_{S>0} \exp\left(
-{\rm tr}(S)\right)\,
\left|S\right|^{a-\frac{p+1}{2}}
dS, 
</math>
where <math>|S|</math> denotes the [determinant](/source/determinant) of <math>S</math>. The other one, more useful to obtain a numerical result is:

:<math>
\Gamma_p(a)=
\pi^{p(p-1)/4}\prod_{j=1}^p
\Gamma(a+(1-j)/2).
</math>
In both definitions, <math>a</math> is a [complex number](/source/complex_number) whose real part satisfies <math>\Re(a) > (p-1)/2</math>. Note that <math>\Gamma_1(a)</math> reduces to the ordinary gamma function. The second of the above definitions allows to directly obtain the recursive relationships for <math>p\ge 2</math>:
:<math>
\Gamma_p(a) = \pi^{(p-1)/2} \Gamma(a) \Gamma_{p-1}(a-\tfrac{1}{2}) = \pi^{(p-1)/2} \Gamma_{p-1}(a) \Gamma(a+(1-p)/2).
</math>

Thus

* <math>\Gamma_2(a)=\pi^{1/2}\Gamma(a)\Gamma(a-1/2)</math>
* <math>\Gamma_3(a)=\pi^{3/2}\Gamma(a)\Gamma(a-1/2)\Gamma(a-1)</math>

and so on.

This can also be extended to non-integer values of <math>p</math> with the expression:

<math>\Gamma_p(a)=\pi^{p(p-1)/4} \frac{G(a+\frac{1}2)G(a+1)}{G(a+\frac{1-p}2)G(a+1-\frac{p}2)}</math>

Where G is the [Barnes G-function](/source/Barnes_G-function), the [indefinite product](/source/indefinite_product) of the [Gamma function](/source/Gamma_function).

The function is derived by Anderson<ref>{{Cite book|last=Anderson|first=T W|title=An Introduction to Multivariate Statistical Analysis|publisher=John Wiley and Sons|year=1984|isbn=0-471-88987-3|location=New York|pages=Ch. 7}}</ref> from first principles who also cites earlier work by [Wishart](/source/John_Wishart_(statistician)), [Mahalanobis](/source/Prasanta_Chandra_Mahalanobis) and others.

There also exists a version of the multivariate gamma function which instead of a single complex number takes a <math>p</math>-dimensional vector of complex numbers as its argument. It generalizes the above defined multivariate gamma function insofar as the latter is obtained by a particular choice of multivariate argument of the former.<ref>{{cite web|url=https://dlmf.nist.gov/35|title=Chapter 35 Functions of Matrix Argument|work=[Digital Library of Mathematical Functions](/source/Digital_Library_of_Mathematical_Functions)|author=[D. St. P. Richards](/source/Donald_Richards_(statistician))|date=n.d.|access-date=23 May 2022}}</ref>

== Derivatives ==

We may define the multivariate [digamma function](/source/digamma_function) as
:<math>\psi_p(a) = \frac{\partial \log\Gamma_p(a)}{\partial a} = \sum_{i=1}^p \psi(a+(1-i)/2) ,</math>
and the general [polygamma function](/source/polygamma_function) as
:<math>\psi_p^{(n)}(a) = \frac{\partial^n \log\Gamma_p(a)}{\partial a^n} = \sum_{i=1}^p \psi^{(n)}(a+(1-i)/2).</math>

=== Calculation steps ===

* Since
::<math>\Gamma_p(a) = \pi^{p(p-1)/4}\prod_{j=1}^p \Gamma\left(a+\frac{1-j}{2}\right),</math>
:it follows that 
::<math>\frac{\partial \Gamma_p(a)}{\partial a} = \pi^{p(p-1)/4}\sum_{i=1}^p \frac{\partial\Gamma\left(a+\frac{1-i}{2}\right)}{\partial a}\prod_{j=1, j\neq i}^p\Gamma\left(a+\frac{1-j}{2}\right).</math>

* By definition of the [digamma function](/source/digamma_function), &psi;, 
::<math>\frac{\partial\Gamma(a+(1-i)/2)}{\partial a} = \psi(a+(i-1)/2)\Gamma(a+(i-1)/2)</math>

:it follows that
::<math>
\begin{align}
\frac{\partial \Gamma_p(a)}{\partial a} & = \pi^{p(p-1)/4}\prod_{j=1}^p \Gamma(a+(1-j)/2) \sum_{i=1}^p \psi(a+(1-i)/2) \\[4pt]
& = \Gamma_p(a)\sum_{i=1}^p \psi(a+(1-i)/2).
\end{align}
</math>

{{more footnotes|date=May 2012}}

==References==
{{Reflist}}
* 1. {{cite journal
 |title=Distributions of Matrix Variates and Latent Roots Derived from Normal Samples
 |last=James |first=A.
 |journal=[Annals of Mathematical Statistics](/source/Annals_of_Mathematical_Statistics)
 |volume=35 |issue=2 |year=1964 |pages=475&ndash;501
 |doi=10.1214/aoms/1177703550 |mr=181057 | zbl = 0121.36605
|doi-access=free }}
* 2. A. K. Gupta and D. K. Nagar 1999. "Matrix variate distributions".  Chapman and Hall.

Category:Gamma and related functions

---
Adapted from the Wikipedia article [Multivariate gamma function](https://en.wikipedia.org/wiki/Multivariate_gamma_function) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Multivariate_gamma_function?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
