function a = t_mass_matrix ( n )

%*****************************************************************************80
%
%% T_MASS_MATRIX computes the mass matrix for the Chebyshev T polynomial.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    12 July 2015
%
%  Author:
%
%    John Burkardt
%
  [ x, w ] = t_quadrature_rule ( n + 1 );

  phi = t_polynomial ( n + 1, n, x );

  for i = 1 : n + 1
    phiw(:,i) = w(i) * phi(i,:)';
  end

  a = phiw * phi;

  return
end
