Skip to main content

Large power of an adjacency matrix

The adjacency matrix I have at the start is

[0,1,0,0,0]
[0,0,1,0,0]
[1,0,0,1,1]
[0,0,0,0,0]
[0,0,0,0,0]

I don't understand why this matrix^9999 equals

[1,0,0,1,1]
[0,1,0,0,0]
[0,0,1,0,0]
[0,0,0,0,0]
[0,0,0,0,0]

or why this matrix^33334 equals
[0,1,0,0,0]
[0,0,1,0,0]
[1,0,0,1,1]
[0,0,0,0,0]
[0,0,0,0,0]

Can someone please explain what is happening?