function r8po_inverse_test ( )

%*****************************************************************************80
%
%% R8PO_INVERSE_TEST tests R8PO_INVERSE.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    31 July 2015
%
%  Author:
%
%    John Burkardt
%
  n = 4;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8PO_INVERSE_TEST\n' );
  fprintf ( 1, '  R8PO_INVERSE computes the inverse of\n' );
  fprintf ( 1, '  a symmetric positive definite matrix\n' );
  fprintf ( 1, '  factored by R8PO_FA.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Matrix order N = %d\n', n );
%
%  Set the matrix.
%
  for i = 1 : n
    for j = 1 : n
      a(i,j) = min ( i, j );
    end
  end

  r8po_print ( n, a, '  Matrix A:' )
%
%  Factor the matrix.
%
  [ a_lu, info ] = r8po_fa ( n, a );
%
%  Compute the inverse.
%
  b = r8po_inverse ( n, a_lu );

  r8po_print ( n, b, '  Inverse matrix B:' );
%
%  Check.
%
  c = r8po_mm ( n, a, b );

  r8po_print ( n, c, '  Product A * B:' );

  return
end
