% discussed diagonal dominance, then discussed the condition of a matrix.

% as an illustration, considered a Vandermonde matrix, with the points
% taken from an interval far away from 0:
% 

>> x = linspace(999,1001,101)';
>> A = [x.^2,x,ones(size(x))];
>> cond(A'*A)
ans =
  1.0626e+025
%%  explanation, the columns of A are very close to linearly dependent, hence
%% so are the columns of A'*A.

%% In contrast, use a basis for the cubic polynomials that is good for this
%% interval [999 .. 1001], e.g., the shifted power basis:
>> x  = x-1000;
>> A = [x.^2,x,ones(size(x))];
>> cond(A'*A)
ans =
   13.7123

>>> Now the columns of A are quite linearly independent and, correspondingly,
>>> the condition of A'*A is very good.
