why my code giving right anwer for T=power(T,n-2) instead of it should work for T=power(T,n-1)
Doubt in formula
@spagire4,
Because you have taken a different orientation of T matrix, basic linear algebra, if you take transpose of multiplicand matrixes, you get transpose of result as well.