Function Repository Resource:

# MatrixGeometricMean

Compute the geometric mean of two matrices

Contributed by: Jan Mangaldan
 ResourceFunction["MatrixGeometricMean"][a,b] gives the geometric mean of the matrices a and b.

## Details

The geometric mean of two matrices a and b is the unique positive definite matrix solution x of the equation , and is the generalization of the usual geometric mean for scalars.
The matrices a and b can be numerical or symbolic, but must be Hermitian and positive definite.
The geometric mean of two matrices can have complex-valued elements.

## Examples

### Basic Examples (2)

The geometric mean of two exact 2×2 symmetric positive definite matrices:

 In[1]:=
 Out[1]=

The geometric mean is also symmetric and positive definite:

 In[2]:=
 Out[2]=

### Scope (2)

Two symmetric positive definite matrices:

 In[3]:=

Compute the geometric mean with machine arithmetic:

 In[4]:=
 Out[4]=

Compute the geometric mean with 24-digit precision arithmetic:

 In[5]:=
 Out[5]=

Compute the geometric mean of two random Hermitian positive definite matrices:

 In[6]:=
 Out[7]=

### Properties and Relations (6)

MatrixGeometricMean of two 1×1 matrices is equivalent to GeometricMean:

 In[8]:=
 Out[9]=

The geometric mean is symmetric in its arguments:

 In[10]:=
 Out[11]=

The geometric mean of a matrix and the identity is equivalent to the square root of the matrix:

 In[12]:=
 Out[13]=

If two matrices commute, their geometric mean is equivalent to the square root of their product:

 In[14]:=
 Out[15]=
 In[16]:=
 Out[16]=

The geometric mean can be expressed in terms of MatrixPower:

 In[17]:=
 Out[18]=

The geometric mean can be expressed as an integral:

 In[19]:=
 Out[20]=

## Version History

• 1.0.0 – 06 May 2022