Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am trying to expand or solve an equation that contains matrices for a certain matrix, but it is not working:

$Assumptions = 
  {Element[X, Vectors[n]], Element[Zu, Vectors[n]], 
   Element[Fu, DiagonalMatrix[n]], Element[Y, Matrices[{n, n}, Reals]]};

Solve[Y.Fu.(Zu + X.Y) + (Zu + X.Y).Fu.Y + 2 λ X == 0, X]

ExpandAll[Y.Fu.(Zu + X.Y) + (Zu + X.Y).Fu.Y + 2 λ X]

Simplify[Y.Fu.(Zu + X.Y) + (Zu + X.Y).Fu.Y + 2 λ X]

None of the above inputs works. Am I doing something wrong or is it that Mathematica cannot solve for matrix equation symbolically?

share|improve this question
1  
Anyway, Mathematica still lacks proper matrix symbolic manipulation, except for some basic stuff. You, me and many others are hoping it comes soon –  Rojo Jan 30 at 2:28
add comment

1 Answer

up vote 2 down vote accepted

Here is one way to proceed:

n = 3;
xvec = Array[x, n];
zvec = Array[z, n];
ymat = Array[y, {n, n}];
fumat = DiagonalMatrix[Array[fu, n]];

Solve[ymat.fumat.(zvec + xvec.ymat) + (zvec + xvec.ymat).fumat.ymat + 2 lam*xvec == 0, xvec]

The output is a fully symbolic answer for the terms of xvec, albeit not in as compact a form as one might wish.

The Assumptions command does not work as you wish. In particular, assumptions are not carried over from the first line to the later lines of your code. You can see this by looking at the FullForm of your variables.

share|improve this answer
    
Thank you very much I had already seen a similar answer, but I was looking if there is any way to gather them in matrices again? –  iassael Jan 30 at 2:18
    
I guess the only hope would be to try something in the Tensor commands: reference.wolfram.com/language/tutorial/SymbolicTensors.html –  bill s Jan 30 at 2:30
    
Thanks but it uses assumptions I though the were the right case. Could you please give me an example of how this would work in my case or a similar one? –  iassael Jan 30 at 2:55
    
The difficulty is that there is no TensorSolve and regular commands (like Solve) don't honor the tensor assumptions. I have never used these commands. Maybe someone else has figured it out. –  bill s Jan 30 at 3:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.