function ival = r8mat_is_banded_lower ( m, n, a )

%*****************************************************************************80
%
%% R8MAT_IS_BANDED_LOWER determines the matrix lower bandwidth.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    09 April 2017
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer M, N, the row and column dimensions of 
%    the matrix.  M and N must be positive.
%
%    Input, real A(M,N), the matrix.
%
%    Output, integer IVAL, the lower bandwidth, measured as the
%    number of nonzero diagonals, starting with the main diagonal
%    and proceeding down, with values between 0 and M-1.
%
  ival = 0;

  for i = 1 : m
    for j = 1 : i - 1

      if ( a(i,j) ~= 0.0 )

        ival = max ( ival, i - j );

      end

    end
  end

  return
end
