new to the forum and here's the question I'm pondering on:
I'm trying to use FindInstance in Mathematica to solve a symbolic matrix equation with quite a few assumptions. For example, quite frequently I need to find commuting matrices: so given a matrix find general matrices that commute with it subject to a few constraints.
MWE: Let's say you have two matrices M and C. C is a matrix that is given to us. M is symbolic. I want to put in some assumptions and then solve for M. The assumptions relate different matrix elements of M and its not clear to me how to put in the assumptions (If its were just a single variable or two it wouldn't be that difficult.)
For example: 1. I first put in some assumptions in M for example make M symmetric and also some entries are known to be zero.
- After that I solve for the remaining elements:
FindInstance[M*C == C*M,
{Matrix variables go here}, For[ a = 1, a < 10, a = a + 1,
For[b = 1 , b < 10 , b = b + 1,
M[[a, a]] + M[[b, b]] >= 2*M[[a, b]] ]], Integers]
I really don't think this is a nice way to include assumptions. Also I think if I had to include another assumption which would be M is made of positive integers, I guess I'd use another for loop.
So, in general, what's the suggested way to include multiple arguments for symbolic matrices?