Confusion about inner product function

 

I am studying in the documentation, the inner product function : https://www.mql5.com/en/docs/matrix/matrix_products/matrix_inner

I struggled understanding the logic because my results differed from those of the example. It seemed in this example that the rows are multiplied with the rows, 

rather than rows multiplied with the columns.

Thought the "cols" variable should have loaded the columns instead of the rows, and "b.Row(j)" be "b.Col(j)"


So I'm a little confused

Documentation on MQL5: Matrix and Vector Methods / Products / Inner
Documentation on MQL5: Matrix and Vector Methods / Products / Inner
  • www.mql5.com
Inner - Products - Matrix and Vector Methods - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Anybody saw that ? 🤔
 
Sebastien Nicolas Paul Boulenc #: Anybody saw that ? 🤔

Matrix operations is a relatively recent addition to MQL, so very few users have experience with it. Not to mention that few users actually need matrix maths in their EAs at all.

 
Fernando Carreiro #:

Matrix operations is a relatively recent addition to MQL, so very few users have experience with it. Not to mention that few users actually need matrix maths in their EAs at all.

I understand that, even though vectors/matrix product is pretty basic when it comes to data analysis.

Do you know where I can find the body of this function ? So I can modify it eventually. I don't find it in the include files.

 
Sebastien Nicolas Paul Boulenc #: I understand that, even though vectors/matrix product is pretty basic when it comes to data analysis. Do you know where I can find the body of this function ? So I can modify it eventually. I don't find it in the include files.

The new matrix operations are built into MQL5 language. They are not like the standard library that was just a open source MQL library.

However, if you believe you have found a bug, then the best way is to report it in the Russian section as that is where the MetaQuotes developers mostly interact.

 
Fernando Carreiro #:

The new matrix operations are built into MQL5 language. They are not like the standard library that was just a open source MQL library.

However, if you believe you have found a bug, then the best way is to report it in the Russian section as that is where the MetaQuotes developers mostly interact.

I don't speak Russian unfortunately, but maybe I should try with a translator 👍

Thank you

 
Sebastien Nicolas Paul Boulenc #: I don't speak Russian unfortunately, but maybe I should try with a translator 👍 Thank you

I don't speak or write Russian either, but with Google translate I have been able to post there before and get a useful response.

Just make sure to explain that you are using a machine translation so that users can be more understanding of the language barrier.

 
Sebastien Nicolas Paul Boulenc:

I am studying in the documentation, the inner product function : https://www.mql5.com/en/docs/matrix/matrix_products/matrix_inner

I struggled understanding the logic because my results differed from those of the example. It seemed in this example that the rows are multiplied with the rows

rather than rows multiplied with the columns.

Thought the "cols" variable should have loaded the columns instead of the rows, and "b.Row(j)" be "b.Col(j)"


So I'm a little confused

This is because inner product is a product of the 1-st matrix with transposed second matrix. Transposition means that the 2-d operand's rows are virtual columns.

 
Stanislav Korotky #:

This is because inner product is a product of the 1-st matrix with transposed second matrix. Transposition means that the 2-d operand's rows are virtual columns.

Oh because I understood the opposite : A,B = (At B) = (Bt A) ,with Xt a transposed matrix X. Not right ?

https://sharmaeklavya2.github.io/theoremdep/nodes/linear-algebra/matrices/inner-product-space.html

Matrices form an inner-product space - TheoremDep
  • sharmaeklavya2.github.io
Let F be a subfield of complex numbers. Matrices over F form an inner-product space, where the inner product is given by tr(A*B).
Reason: