function k = lo_matrix_index ( i, j )

%*****************************************************************************80
%
%% lo_matrix_index() returns the (i,j) element of the Lights Out matrix.
%
%  Discussion:
%
%    Indexing is row-first:
%
%      1  2  3  4  5
%      6  7  8  9 10
%     11 12 13 14 15
%     16 17 18 19 20
%     21 22 23 23 25
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 November 2017
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer i, j: the row and column of an entry of the matrix.
%
%  Output:
%
%    integer k: the index of the entry.
%
  m = 5;
  n = 5;

  k = j + ( i - 1 ) * n;

  return
end
