function error_sum = r8mat_is_unit_column ( m, n, a )

%*****************************************************************************80
%
%% R8MAT_IS_UNIT_COLUMN checks whether an R8MAT has columns of unit Euclidean norm.
%
%  Discussion:
%
%    An R8MAT is a matrix of real values.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 November 2007
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, N, the row and column dimensions of 
%    the matrix.  M and N must be positive.
%
%    real A(M,N), the matrix.
%
%  Output:
%
%    real ERROR_SUM, the error sum..
%
  error_sum = 0.0;

  for j = 1 : n

    error_sum = error_sum + ( 1.0 - r8vec_norm_l2 ( m, a(1:m,j) ) )^2;

  end

  error_sum = sqrt ( error_sum );

  return
end
