Matrix multiplication: Difference between revisions

Content added Content deleted
(→‎{{header|J}}: Add examples, elaborate on general inner product.)
Line 522: Line 522:
etc.
etc.


The general inner product extends to multidimensional arrays, with the only requirement being that <tt> x </tt>and<tt> y </tt> to be conformable (trailing dimension of array<tt> x </tt> equals the leading dimension of array<tt> y</tt>). For example, the matrix multiplication of two dimensional arrays requires <tt>x</tt> must have the same numbers of rows as <tt>y</tt> has columns, as you would expect.
The general inner product extends to multidimensional arrays, requiring only that <tt> x </tt>and<tt> y </tt> be conformable (trailing dimension of array <tt>x</tt> equals the leading dimension of array <tt>y</tt>). For example, the matrix multiplication of two dimensional arrays requires <tt>x</tt> to have the same numbers of rows as <tt>y</tt> has columns, as you would expect.


=={{header|Java}}==
=={{header|Java}}==