A=matrix([[0,.2],[0,.5]])
I=matrix(2,2,1)#identity  matrix
B=(I-A)**(-1)
print B
        
[ 1.00000000000000 0.400000000000000]
[0.000000000000000  2.00000000000000]

C=I
for i in range(1,1000):
    C=C+A**i
print C
        
[ 1.00000000000000 0.400000000000000]
[0.000000000000000  2.00000000000000]
  
#Therefore B=C i.e. (I-A)**(-1)=C{i.e. the sum of A**k }      

Strang-265-22-U (last edited 2010-12-16 12:31:24 by rupampy)