Function Repository Resource:

BialternateProduct

Source Notebook

Calculate the bialternate product of two square matrices

Contributed by: Jan Mangaldan

ResourceFunction["BialternateProduct"][m1,m2]

constructs the bialternate product of the square matrices m1 and m2.

Details

The bialternate product of matrices m1 and m2 is a matrix whose entries are half the sums of determinants of 2×2 matrices formed from taking rows and columns of the two matrices in pairs.
The square matrices m1 and m2 must have the same dimensions.
If m1 and m2 are both of length n, then the bialternate product is a square matrix of length n(n-1)/2.

Examples

Basic Examples (1) 

Compute the bialternate product of two symbolic 3×3 matrices:

In[1]:=
ResourceFunction["BialternateProduct"][( {
     {Subscript[\[FormalA], 11], Subscript[\[FormalA], 12], Subscript[\[FormalA], 13]},
     {Subscript[\[FormalA], 21], Subscript[\[FormalA], 22], Subscript[\[FormalA], 23]},
     {Subscript[\[FormalA], 31], Subscript[\[FormalA], 32], Subscript[\[FormalA], 33]}
    } ), ( {
     {Subscript[\[FormalB], 11], Subscript[\[FormalB], 12], Subscript[\[FormalB], 13]},
     {Subscript[\[FormalB], 21], Subscript[\[FormalB], 22], Subscript[\[FormalB], 23]},
     {Subscript[\[FormalB], 31], Subscript[\[FormalB], 32], Subscript[\[FormalB], 33]}
    } )] // MatrixForm // Style[#, 10] &
Out[1]=

Scope (2) 

Compute the bialternate product of two exact matrices:

In[2]:=
ResourceFunction["BialternateProduct"][HilbertMatrix[3], ToeplitzMatrix[3]]
Out[2]=

Compute the bialternate product of two numerical matrices:

In[3]:=
m1 = RandomReal[1, {4, 4}];
m2 = RandomReal[1, {4, 4}];
ResourceFunction["BialternateProduct"][m1, m2]
Out[5]=

Properties and Relations (4) 

The bialternate product is multilinear (linear in each argument):

In[6]:=
m1 = Array[\[FormalX], {5, 5}];
m2 = Array[\[FormalY], {5, 5}];
m3 = Array[\[FormalZ], {5, 5}];
In[7]:=
ResourceFunction["BialternateProduct"][C[1] m1 + C[2] m2, m3] == C[1] ResourceFunction["BialternateProduct"][m1, m3] + C[2] ResourceFunction["BialternateProduct"][m2, m3] // Simplify
Out[7]=
In[8]:=
ResourceFunction["BialternateProduct"][m1, C[1] m2 + C[2] m3] == C[1] ResourceFunction["BialternateProduct"][m1, m2] + C[2] ResourceFunction["BialternateProduct"][m1, m3] // Simplify
Out[8]=

The bialternate product is commutative:

In[9]:=
ResourceFunction["BialternateProduct"][m1, m2] == ResourceFunction["BialternateProduct"][m2, m1] // Simplify
Out[9]=

Transposition distributes over the bialternate product:

In[10]:=
m1 = Array[\[FormalX], {5, 5}];
m2 = Array[\[FormalY], {5, 5}];
Transpose[ResourceFunction["BialternateProduct"][m1, m2]] == ResourceFunction["BialternateProduct"][Transpose[m1], Transpose[m2]]
Out[12]=

The eigenvalues of the bialternate product of a matrix with itself are the products of the eigenvalues of the original matrix, taken in pairs:

In[13]:=
m1 = RandomReal[1, {4, 4}];
In[14]:=
\[Lambda]m = Eigenvalues[m1];
\[Lambda]p = Eigenvalues[ResourceFunction["BialternateProduct"][m1, m1]];
In[15]:=
Sort[\[Lambda]p] == Sort[Apply[Times, Subsets[\[Lambda]m, {2}], {1}]]
Out[15]=

The bialternate product of a matrix with twice the identity matrix of the same dimension is the bialternate sum of a matrix:

In[16]:=
m1 = RandomReal[1, {4, 4}];
In[17]:=
mb = ResourceFunction["BialternateProduct"][m1, 2 IdentityMatrix[Length[m1]]];
mb == ResourceFunction["BialternateSum"][m1]
Out[18]=

The eigenvalues of the bialternate sum are the sums of the eigenvalues of the original matrix, taken in pairs:

In[19]:=
\[Lambda]m = Eigenvalues[m1];
\[Lambda]s = Eigenvalues[mb];
In[20]:=
Sort[\[Lambda]s] == Sort[Apply[Plus, Subsets[\[Lambda]m, {2}], {1}]]
Out[20]=

Version History

  • 1.0.0 – 11 April 2022

Source Metadata

Related Resources

Author Notes

The current implementation makes no attempt to exploit sparsity, structure, or symmetry.

License Information