function determ = idempotent_random_determinant ( n, rank, key )

%*****************************************************************************80
%
%% idempotent_random_determinant: determinant of the idempotent_random matrix.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    31 March 2000
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the order of A.
%
%    integer RANK, the rank of A.
%
%    integer KEY, a positive value that selects the data.
%
%  Output:
%
%    real DETERM, the determinant.
%
  if ( rank == n )
    determ = 1.0;
  else
    determ = 0.0;
  end

  return
end
