function ax = atx_121 ( x )

%*****************************************************************************80
%
%% atx_121() computes A*x where A is the -1,2-1 matrix.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    17 June 2007
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real X(N,1): the column vector to be multiplied.
%
%  Output:
%
%    real AX(N,1): the product A*X.
%
  n = length ( x );

  ax(1:n,1)   =               2.0 * x(1:n,1);
  ax(1:n-1,1) = ax(1:n-1,1) -       x(2:n,1);
  ax(2:n,1)   = ax(2:n,1)   -       x(1:n-1,1);

  return
end

