Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Evaluate the Khatri-Rao product of matrices
ResourceFunction["KhatriRaoProduct"][m1,m2,…] constructs the Khatri-Rao product of the matrices mi. |
Khatri-Rao product of two matrices:
In[1]:= |
In[2]:= |
Out[2]= |
a and b are matrices with exact entries:
In[3]:= |
Use exact arithmetic to compute the Khatri-Rao product:
In[4]:= |
Out[4]= |
Use machine arithmetic:
In[5]:= |
Out[5]= |
Use 20-digit precision arithmetic:
In[6]:= |
Out[6]= |
Evaluate the Khatri-Rao product of three matrices:
In[7]:= |
Out[7]= |
The Khatri-Rao product is multi-linear (linear in each argument):
In[8]:= |
In[9]:= |
Out[9]= |
In[10]:= |
Out[10]= |
The Khatri-Rao product is associative:
In[11]:= |
Out[11]= |
The Khatri-Rao product is not commutative:
In[12]:= |
Out[12]= |
This work is licensed under a Creative Commons Attribution 4.0 International License