The problem is described in the picture, the solution is suppose to be a constructive proof, so you need to find an algorithm that works regardless of stuff like running time. Any help would be grate I can’t solve this and I’ve trying for a while
EDIT: My main direction was changing the sign on every raw with negative sum, now every raw is complete and the sum of all entries is nonnegative (since the sum of all raws is now nonnegative)
If any row or column has a negative sum, choose one and reverse the signs.
Iterate the process.
After each transition, the sum of all the entries in the matrix is increased.
But the absolute value of the entries remains unchanged, hence there are only finitely many possibilities for the total sum.
It follows that the process will eventually terminate.