How can I reverse C = mpower(A,B)

Armich Lottering (view profile)

on 15 Apr 2019
Latest activity Answered by John D'Errico

on 15 Apr 2019

John D'Errico (view profile)

For example: If I have x = mpower(A1,6), where A1 = [0 1 1 1 1 1; 0 0 1 1 1 1; 0 0 0 1 1 1; 0 0 0 0 1 1; 0 0 0 0 0 1; 0 0 0 0 0 0] ,then x = [0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 0]. How can I Reverse this equation so that I determine the magnitude of the power? For example: 0 = A1^x, calculating x.

John D'Errico (view profile)

on 15 Apr 2019

Um, you can't. Information tossed into the bit bucket is irretrievably lost.
In your example, A1 is upper triangular, with 0 on the main diagonal. Powers of such a matrix will go to an identically zero matrix.
A1
A1 =
0 1 1 1 1 1
0 0 1 1 1 1
0 0 0 1 1 1
0 0 0 0 1 1
0 0 0 0 0 1
0 0 0 0 0 0
>> A1^2
ans =
0 0 1 2 3 4
0 0 0 1 2 3
0 0 0 0 1 2
0 0 0 0 0 1
0 0 0 0 0 0
0 0 0 0 0 0
>> A1^3
ans =
0 0 0 1 3 6
0 0 0 0 1 3
0 0 0 0 0 1
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
>> A1^6
ans =
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
As you can see, each successive power kills off one more diagonal. After the 6th power, it is all gone. That last is not only all zero, it is IDENTICALLY vzero.
There is no scheme in the universe that will then allow you to take a fully zero matrix, and then to infer what was some parent matrix that was in fact used to produce it, as there would be infinitely many such solutions. In fact, A1^7==A1^123. All are identically zero. So you cannot also infer what power was used, because any power of 6 or above would do the same on such a matrix.