How can I find all the binary matrices $A$ that are a solution to an equation $$A^3=B$$ for some given, positive-integer matrix $B$? Is there a way to characterize all the solution to this problem?