I spend a lot of time on larger matrices (10x10, 20x20, etc.), which usually have some structure, but they are difficult to determine as they increase. Ideally, I would like Mathematica to automatically generate some representation of the matrix that will highlight its structure. For instance,
(A = {{1, 2 + 3 I}, {2 - 3 I, 4}})
will give
{{a, b}, {Conjugate[b], c}}
or even
{{a, b + c I}, {b - c I, d}}
is acceptable. Somewhat naive implementation
StructureForm[M_?MatrixQ] := MatrixForm @ Module[ {pos, chars}, pos = Reap[ Map[Sow[Position[M, #1], #1] &, M, {2}], _, Union[Flatten[#2, 1]] & ][[2]]; (* establishes equality relationship *) chars = CharacterRange["a", "z"][[;; Length @ pos ]]; SparseArray[Flatten[Thread /@ Thread[pos -> chars] ], Dimensions[M]] ]
only works for real number matrices, e.g.
StructureForm @ {{1, 2}, {2, 3}} == {{a, b}, {b, c}}
Obviously, I need to determine what relationships, in my opinion, can exist (equality, negation, conjugation, negative conjugation, etc.), but I'm not sure how to establish that these relations exist, at least in pure form. And, as soon as I have a relationship, the next question is how to determine which is the simplest, in a sense? Any thoughts?
One possibility that comes to mind is that each pair of elements generates a triple linking their positions, for example, {{1,2}, Conjugate, {2,1}} for A , above, then it becomes suitable for graphic algorithms.
Change By the way, my inspiration from the Matrix Algorithms ( 1 , 2 ) series is by Stuart.