A:={{1,2,3,4}, {1,2,3,4}, {0,0,1,4}, {3,2,5,7}}

MatrixForm[A]

x:={{1}, {5}, {-7}, {13}}

MatrixForm[x]

y:=A.x

MatrixForm[y]

CharacteristicPolynomial[A,t]

N[Eigenvalues[A],50]

Det[A]

Rank[A]

MatrixRank[{{1,2,3,4},{1,2,3,4},{0,0,1,4},{3,2,5,7}}]

RowReduce[A]

RowReduce[Transpose[A]]

A.A

MatrixForm[A.A]

MatrixForm[MatrixPower[A,15]]

b:={{1},{2},{3},{4}}

MatrixForm[b]

B:={{1,2,3,4}, {5,6,7,8},{-9,-10,15,2}, {-11,26,17,8}}

MatrixForm[B]

{lu,p,c}=LUDecomposition[B]

l:=lu SparseArray[{i_,j_}/;j<i->1,{4,4}]+IdentityMatrix[4]

MatrixForm[l]

u=lu SparseArray[{i_,j_}/;j≥i->1,{4,4}]

MatrixForm[u]

N[Eigenvectors[A]]

MatrixForm[ N[Eigenvectors[A]]]

LinearSolve[B,b]

MatrixForm[LinearSolve[B,b]]

C1:={{10,-8,-4}, {-8,13,4}, {-4,5,4}}

MatrixForm[C1]

x0:={{1},{1},{1}}

MatrixForm[x0]

B:={{1.8,.8},{.2,1.2}};

x:={-.5,1};

For[k=1,k<100,k++,
Print[MatrixForm[MatrixPower[B,k].x]]]

N[2.5353*10^(29)/(6.33825*10^(28))]

The Power Method

F:={{0,0,1,1/2},{1/3,0,0,0},{1/3,1/2,0,1/2},{1/3,1/2,0,0}};

x0:={0,1,0,1};

L:={};
L1:={};

For[k=1,k<100,k++,
y0=F.x0;
Mu:=Max[y0[[1]],y0[[2]]];
y1:=(1/Mu)*y0;
AppendTo[L,Mu];
AppendTo[L1, MatrixForm[y1]];
x0:=y1]

N[L]

N[L1]

4x4 Power Method

F:={{0,0,1,1/2},{1/3,0,0,0},{1/3,0,0,1/2},{1/3,1,0,0}}

MatrixForm[F]

v:={1,0,0,0}

MatrixForm[v]

L:={};

L1:={};

For[k=1,k<10,k++,
y0=F.x0;
Mu:=Max[y0[[1]],y0[[2]],y0[[3]],y0[[4]]];
y1:=(1/Mu)*y0;
AppendTo[L,Mu];
AppendTo[L1, MatrixForm[y1]];
x0:=y1]

N[L]

N[L1]

The Inverse Power Method

A:={{8,0,12},{1,-2,1},{0,3,0}}

MatrixForm[A]

x0:={1,0,0};

MatrixForm[x0]

a:=-1.4;

L:={};
L1:={};
L2:={};
L3:={};

i=10

i=i+1

For[k=1,k<10,k++,
y0=LinearSolve[A-a*IdentityMatrix[3],x0];
Mu1:=Max[y0[[1]],y0[[2]],y0[[3]]];
Mu2:=Min[y0[[1]],y0[[2]],y0[[3]]];
If[Mu1>Abs[Mu2], Mu=Mu1, Mu=Mu2];
Nu:=a+1/Mu;
x1:=(1/Mu)*y0;
AppendTo[L,Nu];
AppendTo[L1, MatrixForm[y0]];
AppendTo[L2,MatrixForm[x1]];
AppendTo[L3,Mu];
x0=x1]

L

L1

L2

L3

A:={{3,6,-9},{2,3,4},{0,2,5}}

MatrixForm[A]

RowReduce[A]

b:={{3},{4},{-1}};

MatrixForm[b]

MatrixForm[LinearSolve[A,b]]

B:={{2,1,6},{0,-3,1},{-1,1,4}}

Det[B]

C1:={{0,0,4,-11},{0,2,1,1},{0,0,5,0},{-2,3,3,1}}

Det[C1]

B:={{2,-6,8,4,10,2},{3,-8,8,9,14,5},{5,-19,36,-2,31,-2},{2,-9,20,-5,13,-4}}

MatrixForm[B]

MatrixForm[RowReduce[B]]

B1:={{1,-3,4,2,2,-7},{0,1,-4,3,2,7},{0,0,0,0,1,3},{0,0,0,0,0,5}}

MatrixForm[RowReduce[B1]]

P:={{1,0,0},{-4,1,0},{-2,2,2}}

MatrixForm[Inverse[P]]

D1:={{1,0,0},{0,2,0},{0,0,-1}}

MatrixForm[P.D1.Inverse[P]]