Eigen-Experiments
Project #2  explores working with eigenvectors, eigen- and singular values.

1. Using the SVD, find a 3x3 matrix mat with no zero elements having singular values 1,2,3.
Verify your result.

(* Your work here *)

(* mat = u.s.v   by SVD, and s=DiagonalMatrix[3,2,1]. Unknwon: u,v. Both u,v must be orthonormal *)
s=DiagonalMatrix[{1.0,2,3}];
u=DiagonalMatrix[{1.0,1,1}];
v=DiagonalMatrix[{1.0,1,1}];
a=HilbertMatrix[3]//N;
{uu,ss,vv}=SingularValueDecomposition[a];
(* note: uu, vv: orthonormal *)
(*u,v: too trivial *)
mat1=uu.s.vv; (*a solution! *)

mat=u.s.v;
(*verify: *)
SingularValueDecomposition[mat1]

2. Let h be the Hilbert matrix of dimension 10. Using SVD, explain how to find another 10x10 matrix g with larger condition number. Verify your result.

(* Your work here *)
hil=HilbertMatrix[10]^3//N;
{u,s,v}=SingularValueDecomposition[hil];
(*Print[MatrixForm[s]];*)

condition=s[[1,1]]/s[[10,10]]

3. The determinantof a matrix  is an indactor of how well-behaved it is. Plot, using ListPlot, the determinant values of the two matrices from the previous homework, using n=1,...,20. Consider ListLogPlot if not much shows.

(* Your work here *)
n=20;

detarray=Table[Det[HilbertMatrix[i]]//N,{i,1,n}]

array=Table[2^i,{i,1,100}]//N;
ListLogPlot[detarray]