I am facing a problem in writing a sql query for multiplication of two matrices.
Consider that i have a 3×3 matrices A and B, having the following schema:
A(i,j,val) and B(i,j,val) where
i int: Row index
j int: Column Index
val int: Cell value
The product of matrix A and matrix B is matrix C having cell at row i and column j. I want a single sql query to get the matrix product of A and B.
Best Answer
Input (A, then B):
And their product (AB):