A=(({{1/2, 1/2, 0, 0}, {1/2, 1/2, 0, 0}, {0, 0, 1/2, 1/2}, {0, 0, 1/2, 1/2}}));
MatrixPower[A,2]==A

B=(({{0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}, {0, 0, 0, 0}}));
MatrixPower[B,4]==ConstantArray[0,{4,4}]