Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Solving for a matrix.

I have an m x n matrix A and an m x n matrix of variables X. I want to solve for all possible X such that AX^T = XA^T and A^TX = X^TA. Is there any nice way to do this?

I've tried using various commands like "Solve" but "solve_right" but it doesn't seem to be working. Here is my code so far.

A = matrix([[0,1],[1,0],[1,1]])

xrownum = A.nrows() xcolnum = A.ncols()

X = matrix([[var("x_{}_{}".format(u,v), latex_name="a_{{{},{}}}".format(u,v)) for v in range(xcolnum)] for u in range(xrownum)]); for i in range(xrownum): for j in range(xcolnum): if A[i,j] != 0: X[i,j] = 0 XAT = XA.transpose() AXT = AX.transpose() ATX = A.transpose()X XTA = X.transpose()A

Solving for a matrix.

I have an m x n matrix A and an m x n matrix of variables X. I want to solve for all possible X such that AX^T = XA^T and A^TX = X^TA. Is there any nice way to do this?

I've tried using various commands like "Solve" but "solve_right" but it doesn't seem to be working. Here is my code so far.

A = matrix([[0,1],[1,0],[1,1]])

matrix([[0,1],[1,0],[1,1]])

xrownum = A.nrows() xcolnum = A.ncols()

A.ncols()

X = matrix([[var("x_{}_{}".format(u,v), latex_name="a_{{{},{}}}".format(u,v)) for v in range(xcolnum)] for u in range(xrownum)]); for i in range(xrownum): for j in range(xcolnum): if A[i,j] != 0: X[i,j] = 0 XAT = XA.transpose() X*A.transpose() AXT = AX.transpose() A*X.transpose() ATX = A.transpose()X A.transpose()*X XTA = X.transpose()A

X.transpose()*A

Solving for a matrix.

I have an m x n matrix A and an m x n matrix of variables X. I want to solve for all possible X such that AX^T = XA^T and A^TX = X^TA. Is there any nice way to do this?

I've tried using various commands like "Solve" but "solve_right" but it doesn't seem to be working. Here is my code so far.

A = matrix([[0,1],[1,0],[1,1]])

xrownum = A.nrows()
xcolnum = A.ncols()

X = matrix([[var("x_{}_{}".format(u,v), latex_name="a_{{{},{}}}".format(u,v)) for v in range(xcolnum)] for u in range(xrownum)]);
for i in range(xrownum):
    for j in range(xcolnum):
        if A[i,j] != 0:
            X[i,j] = 0
XAT = X*A.transpose()
AXT = A*X.transpose()
ATX = A.transpose()*X
XTA = X.transpose()*A

Of course, X = 0 will always work, but I am interested in knowing if it is the ONLY matrix which works.

Solving for a matrix.

I have an m x n matrix A and an m x n matrix of variables X. I want to solve for all possible X such that AX^T = XA^T and A^TX = X^TA. Is there any nice way to do this?

I've tried using various commands like "Solve" but "solve_right" but it doesn't seem to be working. Here is my code so far.

A = matrix([[0,1],[1,0],[1,1]])

xrownum = A.nrows()
xcolnum = A.ncols()

X = matrix([[var("x_{}_{}".format(u,v), latex_name="a_{{{},{}}}".format(u,v)) for v in range(xcolnum)] for u in range(xrownum)]);
for i in range(xrownum):
    for j in range(xcolnum):
        if A[i,j] != 0:
            X[i,j] = 0
XAT = X*A.transpose()
AXT = A*X.transpose()
ATX = A.transpose()*X
XTA = X.transpose()*A

Of course, X = 0 will always work, but I am interested in knowing if it is the ONLY matrix which works.