function value = r8mat_product_elementwise ( m, n, a, b )

%*****************************************************************************80
%
%% r8mat_product_elementwise() returns the elementwise produce to two R8MAT's.
%
%  Example:
%
%    A = [ 1, 2, 3;    B = [ 1, 3, 5;    product = 86
%          4, 5, 6 ]         2, 4, 6 ]
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    31 March 2018
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, the number of rows.
%
%    integer N, the number of columns.
%
%    real A(M,N), B(M,N), the two matrices.
%
%  Output:
%
%    real VALUE, the elementwise product of A and B.
%
  value = sum ( sum ( a .* b ) );

  return
end
