function error_frobenius = r8mat_is_symmetric ( m, n, a )

%*****************************************************************************80
%
%% r8mat_is_symmetric() checks a real matrix for symmetry.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    13 April 2017
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, N, the number of rows and columns of A.
%
%    real A(M,N), the matrix.
%
%  Output:
%
%    real ERROR_FROBENIUS, measures the Frobenius norm of ( A - A' ).
%
  if ( ~ r8mat_is_square ( m, n, a ) )
    error_frobenius = Inf;
    return
  end

  error_frobenius = sqrt ( sum ( sum ( ( abs ( a - a' ) ).^2 ) ) );

  return
end
