a  =  Table[If[j == i + 1, 1, 0], {i, 7}, {j, 7}]

MatrixForm[%]

MatrixPower[a, 6]

(*  2.   *)

a = 
      Table[If[i == j, If[i >= 3, 3, 2], If[i == j + 1, 1, 0]], {i, 
          5}, {j, 5}]

MatrixForm[a]

Eigensystem[a]

NullSpace[ a - lambda *IdentityMatrix[5] ]

(*  3.   *)

p = Permutations[ Permutations[ {1,0,0,0} ] ]

MatrixForm[ p[[5]] ]

p[[5]]  .  {1, 2, 3,  4}

Length[p]

Factorial[4]

p  .  {1, 2, 3, 4}

MatrixForm[ Inverse[ p[[5]] ] ]

MatrixForm[ p[[5]] . p[[6]] ]

inverssit  =  Map[Inverse,  p]

tulot = 
      Table[ p[[i]]  .  p[[j]], {i, Length[p]}, {j, 
          Length[p]}]

Length[tulot]

Flatten[tulot, 1]

tulo  =  Union[%]

Map[Det, p]

Apply[Plus, Map[Det, p]]

<< DiscreteMath`Combinatorica`

paikat  =  RandomPermutation[52]

seko  =  
        Table[ If[ paikat[[i]]  ==  j, 1, 0],  {j, 52}, {i, 
            52}];

Show[ 
        Graphics[
          Raster[ seko,  {{0, 0}, {52, 
                52}}] ], 
AspectRatio  ->  
          1 ];

p = {{ .6,  .4}, { .8,  .2}}

p = {{ .5,  .3,  .2}, { .8,  .1,  .1}, { .2,  .4,  .4}}

MatrixForm[p]

Eigensystem[p]

Eigensystem[Transpose[p]]

a  = {1, 0, 0}
n = 100;
MatrixForm[ N[ a  .  MatrixPower[p, n]] ]