Image compression

image=ExampleData[{"TestImage","Lena"}]

A=ImageData[image];
redА=A[[All,All,1]];
greenА=A[[All,All,2]];
blueА=A[[All,All,3]];

redImage=Table[{redА[[i,j]],0,0},{i,Dimensions[redА][[1]]},{j,Dimensions[greenА][[2]]}];
blueImage=Table[{0,blueА[[i,j]],0},{i,Dimensions[redА][[1]]},{j,Dimensions[greenА][[2]]}];
greenImage=Table[{0,0,greenА[[i,j]]},{i,Dimensions[redА][[1]]},{j,Dimensions[greenА][[2]]}];
GraphicsRow[{Image[redImage],Image[blueImage],Image[greenImage]}]

grayImage=ColorConvert[image,"Grayscale"];
grayA=ImageData[grayImage];

SVD=SingularValueDecomposition[grayA];
U=SVD[[1]];
Σ=SVD[[2]];
V=SVD[[3]];
r=20;
(*make each diagonal element of Σ after the rth 0*)
newDiagonal=Join[Diagonal[Σ][[1;;r]],Table[0,{i,Dimensions[Σ][[1]]-r}]];
newΣ=DiagonalMatrix[newDiagonal];
newImage=U.newΣ.Transpose[V];
Image[newImage]

Export["Lena_compressed.png",Image[newImage]]

Condition number

H=HilbertMatrix[20];
b=Table[1,{i,20}];
κ=Norm[Inverse[H]] Norm[H]//N

(*Exact solution*)
LinearSolve[H,b]

(*Small input change*)

H1=H+DiagonalMatrix[Table[(10^(-15)),Length[b]]];
LinearSolve[H1,b]//N

(*Numerical solution*)
LinearSolve[N[H],b]