function determ = r8mat_determinant ( n, a )

%*****************************************************************************80
%
%% r8mat_determinant() computes the determinant of a matrix.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 October 2007
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the orderof the matrix A.
%
%    real A(N,N), the matrix.
%
%  Output:
%
%    real DETERM, the determinant.
%
  b(1:n,1:n) = a(1:n,1:n);

  [ b, pivot, info ] = r8mat_gefa ( b, n );

  determ = r8mat_gedet ( b, n, pivot );

  return
end
