function a = drmac_bad_matrix ( )

%*****************************************************************************80
%
%% drmac_bad_matrix() returns the DRMAC_BAD matrix.
%
%  Discussion:
%
%    This matrix was discussed in a seminar given by Zlatko Drmac.
%
%    The matrix is available in a "badly scaled" or "well scaled" version.
%
%    It is also interesting to consider the 6 symmetric permutations of
%    the matrix.
%
%  Formula:
%
%    10^40  10^29  10^19
%    10^29  10^20  10^9
%    10^19  10^9   10^0
%
%  Properties of the "Badly Scaled Matrix":
%
%    A is nonsingular.
%
%    A is symmetric: A' = A.
%
%    A is positive definite.
%
%    A is symmetric positive definite.
%
%    Because A is symmetric, it is normal.
%
%    Because A is normal, it is diagonalizable.
%
%    A is very badly scaled.  MATLAB's "eigs" function, for computing
%    eigenvalues, will return two negative eigenvalues for A, despite
%    the fact that A is symmetric positive definite.
%
%    Pre- and post-multiplying A by the scaling matrix
%    with diagonal [ 10^(-20), 10^(-10), 1 ] results in a well-scaled
%    matrix.
%
%    A is not diagonally dominant.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 December 2019
%
%  Author:
%
%    John Burkardt
%
%  Output:
%
%    real A(3,3), the matrix.
% 
  a(1:3,1:3) = [ ...
    1.0E+40, 1.0E+29, 1.0E+19; ...
    1.0E+29, 1.0E+20, 1.0E+09; ...
    1.0E+19, 1.0E+09, 1.0E+00 ];
	  
  return
end
