Gaussian Elimination

n=4;
A= RandomReal[{-1,1},{n,n}];
MatrixForm[A]
A[[2]]=A[[2]]- ((A[[2,1]])/(A[[1,1]])) A[[1]];
A[[3]]=A[[3]]- ((A[[3,1]])/(A[[1,1]])) A[[1]];
A[[4]]=A[[4]]- ((A[[4,1]])/(A[[1,1]])) A[[1]];
MatrixForm[A]

n=4;
A= RandomReal[{-1,1},{n,n}];
MatrixForm[A]
Do[
A[[k]]=A[[k]]- ((A[[k,1]])/(A[[1,1]])) A[[1]],
{k,2,4}]
MatrixForm[A]

n=4;
A= RandomReal[{-1,1},{n,n}];
MatrixForm[A]
Do[
A[[k]]-= ((A[[k,1]])/(A[[1,1]])) A[[1]],
{k,2,4}]
MatrixForm[A]

n=4;
A= RandomReal[{-1,1},{n,n}];
MatrixForm[A]
Do[
A[[k]]-= ((A[[k,1]])/(A[[1,1]])) A[[1]],
{k,2,4}]
MatrixForm[A]
Do[
A[[k]]-= ((A[[k,2]])/(A[[2,2]])) A[[2]],
{k,3,4}]
MatrixForm[A]
Do[
A[[k]]-= ((A[[k,3]])/(A[[3,3]])) A[[3]],
{k,4,4}]
MatrixForm[A]

n=4;
B= RandomReal[{-1,1},{n,n}];
A=B;
MatrixForm[A]
Do[
A[[k]]-= ((A[[k,i-1]])/(A[[i-1,i-1]])) A[[i-1]],
{i,2,4},
{k,i,4}
]
MatrixForm[A]

n=4;
B= RandomReal[{-1,1},{n,n}];
MyRowReduce[B_]:= Module[
{A=B,n=Length[A]},
Do[
A[[k]]-= ((A[[k,i-1]])/(A[[i-1,i-1]])) A[[i-1]],
{i,2,n},
{k,i,n}
];
A]

BB=MyRowReduce[B];
MatrixForm[BB]

Grabbing SubMatrices

n=6;
A= RandomReal[{-1,1},{n,n}];
MatrixForm[A]
MatrixForm[A[[2;;4,1;;5]]]
MatrixForm[A[[All,2;;4]]]
MatrixForm[A[[{1,3},{2,4,5}]]]

n=7;
A= RandomReal[{-1,1},{n,n}];
MatrixForm[A]
Table[
MatrixForm[ A[[i;;i+3,i;;i+3]]],
{i, 1, n-3}
]
Table[
MatrixForm[ A[[i;;i+3,i;;i+3]]],
{i, 1, n-3,2}
]

MatrixForm[A]
A[[4,5]]+=100
MatrixForm[A]

To Be Continued