LU-factorization of Vandermonde matrix

LU factorization

LU[A_]:=Block[{m,L,U},
m= Max[Dimensions[A]];L=IdentityMatrix[m]; U=A;
For[k=1, k<m, k++,
For[i=k+1, i<=m, i++,
L[[i,k]]=U[[i,k]]/U[[k,k]];
For[j=k,j<=m,j++,
U[[i,j]]=Simplify[U[[i,j]]-L[[i,k]] U[[k,j]] ] ]]
];
Return[{L,U}]
]

GJ factorization

GJ[A_]:=Block[{a,m,L,U},
m= Max[Dimensions[A]];L=IdentityMatrix[m]; U=A;
For[k=1, k<m, k++,
For[i=k+1, i<=m, i++,
L[[i,k]]=U[[i,k]]/U[[k,k]];
For[j=k,j<=m,j++,
U[[i,j]]=Simplify[U[[i,j]]-L[[i,k]] U[[k,j]] ] ]]
];
For[k=m, k>1, k--,
For[i=1, i<k, i++,
L[[i,k]] = U[[i,k]]/  U[[k,k]];
U[[i,k]]=Simplify[U[[i,k]]-L[[i,k]] U[[k,k]] ]
]
];
Return[{L,U}]
]

GJ[A_]:=Block[{m,L,U},
m= Max[Dimensions[A]];L=IdentityMatrix[m]; U=A;
For[k=1, k<m, k++,
For[i=k+1, i<=m, i++,
L[[i,k]]=U[[i,k]]/U[[k,k]];
For[j=k+1,j<=m,j++,
U[[i,j]]=Simplify[U[[i,j]]-L[[i,k]] U[[k,j]] ] ]]
];
Return[{L,U}];
(*For[k=m, k>1, k--,
For[i=1, i<k, i++,
L[[i,k]] = U[[i,k]]/  U[[k,k]]
(*U[[i,k]]=Simplify[U[[i,k]]-L[[i,k]] U[[k,k]] ] *)
]
];*)
Return[{L,U}]
]

Vandermonde

m=2

m=2;
A=Table[((Subscript[x, k])^p),{k,0,m},{p,0,m}] /. (Subscript[x, 0])->t;
MatrixForm[A]

Map[MatrixForm[#]&,LU[A] ]

Map[MatrixForm[#]&,GJ[A] ]

m=3

m=3;
A=Table[((Subscript[x, k])^p),{k,m},{p,0,m-1}];
MatrixForm[A]

Map[MatrixForm[Simplify[#]]&,LU[A] ]

m=4

m=4;
A=Table[((Subscript[x, k])^p),{k,m},{p,0,m-1}];
MatrixForm[A]

Map[MatrixForm[Simplify[#]]&,LU[A] ]

m=5

m=5;
A=Table[((Subscript[x, k])^p),{k,m},{p,0,m-1}];
MatrixForm[A]

Map[MatrixForm[Simplify[#]]&,LU[A] ]