Function Repository Resource:

FaceSplittingProduct

Source Notebook

Evaluate the face-splitting product of matrices

Contributed by: Jan Mangaldan

ResourceFunction["FaceSplittingProduct"][m1,m2,]

constructs the face-splitting product of the matrices mi.

Details

The face-splitting product is a rowwise Kronecker product of matrices; that is, each row of the face-splitting product is the Kronecker product of the corresponding rows of the mi.
The matrices mi must all have the same number of rows.

Examples

Basic Examples (1) 

Face-splitting product of two matrices:

In[1]:=
am = Array[Subscript[a, ##] &, {2, 2}];
bm = Array[Subscript[b, ##] &, {2, 2}];
In[2]:=
ResourceFunction["FaceSplittingProduct"][am, bm] // MatrixForm
Out[2]=

Scope (2) 

a and b are matrices with exact entries:

In[3]:=
a = {{0, 1}, {-1, 0}};
b = {{1, 2}, {3, 4}};

Use exact arithmetic to compute the face-splitting product:

In[4]:=
ResourceFunction["FaceSplittingProduct"][a, b] // MatrixForm
Out[4]=

Use machine arithmetic:

In[5]:=
ResourceFunction["FaceSplittingProduct"][N[a], N[b]] // MatrixForm
Out[5]=

Use 20-digit precision arithmetic:

In[6]:=
ResourceFunction["FaceSplittingProduct"][N[a, 20], N[b, 20]] // MatrixForm
Out[6]=

Evaluate the face-splitting product of three matrices:

In[7]:=
ResourceFunction["FaceSplittingProduct"][RandomReal[1, {2, 2}], RandomReal[1, {2, 3}], RandomReal[1, {2, 2}]]
Out[7]=

Properties and Relations (3) 

The face-splitting product is multi-linear (linear in each argument):

In[8]:=
m1 = Array[\[FormalX], {4, 3}];
m2 = Array[\[FormalY], {4, 3}];
m3 = Array[\[FormalZ], {4, 3}];
In[9]:=
ResourceFunction["FaceSplittingProduct"][C[1] m1 + C[2] m2, m3] ==
  C[1]  ResourceFunction["FaceSplittingProduct"][m1, m3] + C[2]  ResourceFunction["FaceSplittingProduct"][m2, m3] // Simplify
Out[9]=
In[10]:=
ResourceFunction["FaceSplittingProduct"][m1, C[1] m2 + C[2] m3] ==
  C[1]  ResourceFunction["FaceSplittingProduct"][m1, m2] + C[2]  ResourceFunction["FaceSplittingProduct"][m1, m3] // Simplify
Out[10]=

The face-splitting product is associative:

In[11]:=
ResourceFunction["FaceSplittingProduct"][m1, ResourceFunction["FaceSplittingProduct"][m2, m3]] === ResourceFunction["FaceSplittingProduct"][
  ResourceFunction["FaceSplittingProduct"][m1, m2], m3] === ResourceFunction["FaceSplittingProduct"][m1, m2, m3]
Out[11]=

The face-splitting product is not commutative:

In[12]:=
ResourceFunction["FaceSplittingProduct"][m1, m2] === ResourceFunction["FaceSplittingProduct"][m2, m1]
Out[12]=

Requirements

Wolfram Language 12.3 (May 2021) or above

Version History

  • 1.0.0 – 19 January 2024

Source Metadata

Related Resources

Author Notes

The implementation here makes no attempt to exploit sparsity, structure or symmetry of the input matrices.

License Information